Skip to content

Commit

Permalink
Merge pull request #436 from sonalideepthi777/site_enhancement_module
Browse files Browse the repository at this point in the history
Modifications for site_enhancement_module
  • Loading branch information
madhansansel authored Oct 17, 2024
2 parents ebdd3d6 + 62de5a6 commit f7ea719
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions plugins/modules/site_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ class Site(DnacBase):
def __init__(self, module):
super().__init__(module)
self.supported_states = ["merged", "deleted"]
self.created_site_list, self.updated_site_list, self.update_not_neeeded_sites = [], [], []
self.created_site_list, self.updated_site_list, self.update_not_needed_sites = [], [], []
self.deleted_site_list, self.site_absent_list = [], []
self.keymap = {}

Expand Down Expand Up @@ -1308,7 +1308,7 @@ def get_diff_merged(self, config):
return {"error_message": error_message}

if not self.site_requires_update():
self.update_not_neeeded_sites.append(site_name)
self.update_not_needed_sites.append(site_name)
self.log("Site - {0} does not need any update".format(site_name), "INFO")

return self
Expand Down Expand Up @@ -1872,34 +1872,34 @@ def update_site_messages(self):
"""
if self.created_site_list and self.updated_site_list:
self.result['changed'] = True
if self.update_not_neeeded_sites:
if self.update_not_needed_sites:
msg = """Site(s) '{0}' created successfully as well as Site(s) '{1}' updated successully and the some site(s)
'{2}' needs no update in Cisco Catalyst Center"""
self.msg = msg.format(str(self.created_site_list), str(
self.updated_site_list), str(self.update_not_neeeded_sites))
self.updated_site_list), str(self.update_not_needed_sites))
else:
self.msg = """Site(s) '{0}' created successfully in Cisco Catalyst Center as well as Site(s) '{1}' updated successully in
Cisco Catalyst Center""".format(str(self.created_site_list), str(self.updated_site_list))
elif self.created_site_list:
self.result['changed'] = True
if self.update_not_neeeded_sites:
if self.update_not_needed_sites:
self.msg = """Site(s) '{0}' created successfully and some site(s) '{1}' not needs any update in Cisco Catalyst
Center.""".format(str(self.created_site_list), str(self.update_not_neeeded_sites))
Center.""".format(str(self.created_site_list), str(self.update_not_needed_sites))
else:
self.msg = "Site(s) '{0}' created successfully in Cisco Catalyst Center.".format(
str(self.created_site_list))
elif self.updated_site_list:
self.result['changed'] = True
if self.update_not_neeeded_sites:
if self.update_not_needed_sites:
self.msg = """Site(s) '{0}' updated successfully and some site(s) '{1}' not needs any update in Cisco Catalyst
Center.""".format(str(self.updated_site_list), str(self.update_not_neeeded_sites))
Center.""".format(str(self.updated_site_list), str(self.update_not_needed_sites))
else:
self.msg = "Site(s) '{0}' updated successfully in Cisco Catalyst Center.".format(
str(self.updated_site_list))
elif self.update_not_neeeded_sites:
elif self.update_not_needed_sites:
self.result['changed'] = False
self.msg = "Site(s) '{0}' not needs any update in Cisco Catalyst Center.".format(
str(self.update_not_neeeded_sites))
str(self.update_not_needed_sites))
elif self.deleted_site_list and self.site_absent_list:
self.result['changed'] = True
self.msg = """Given site(s) '{0}' deleted successfully from Cisco Catalyst Center and unable to deleted some site(s) '{1}' as they
Expand Down

0 comments on commit f7ea719

Please sign in to comment.