From 95091fb0774abd9ddf7a7ee385af50003a4c83e9 Mon Sep 17 00:00:00 2001 From: skesali Date: Thu, 17 Oct 2024 11:35:19 +0530 Subject: [PATCH 1/2] Modifications for site_enhancement_module --- plugins/modules/site_workflow_manager.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/modules/site_workflow_manager.py b/plugins/modules/site_workflow_manager.py index da10da80e..1eff7f065 100644 --- a/plugins/modules/site_workflow_manager.py +++ b/plugins/modules/site_workflow_manager.py @@ -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 = {} @@ -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 @@ -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 @@ -1971,7 +1971,7 @@ def main(): ccc_site.reset_values() ccc_site.get_want(config).check_return_status() ccc_site.get_have(config).check_return_status() - ccc_site.upload_floor_image(config) + # ccc_site.upload_floor_image(config) ccc_site.get_diff_state_apply[state](config).check_return_status() if config_verify: ccc_site.verify_diff_state_apply[state]( From 62de5a6755f3143770e701769fae63ff83881a27 Mon Sep 17 00:00:00 2001 From: skesali Date: Thu, 17 Oct 2024 15:29:58 +0530 Subject: [PATCH 2/2] Modifications for site_enhancement_module --- plugins/modules/site_workflow_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/site_workflow_manager.py b/plugins/modules/site_workflow_manager.py index 1eff7f065..a7567d29b 100644 --- a/plugins/modules/site_workflow_manager.py +++ b/plugins/modules/site_workflow_manager.py @@ -1971,7 +1971,7 @@ def main(): ccc_site.reset_values() ccc_site.get_want(config).check_return_status() ccc_site.get_have(config).check_return_status() - # ccc_site.upload_floor_image(config) + ccc_site.upload_floor_image(config) ccc_site.get_diff_state_apply[state](config).check_return_status() if config_verify: ccc_site.verify_diff_state_apply[state](