diff --git a/plugins/module_utils/network/dcnm/dcnm_vpc_pair_utils.py b/plugins/module_utils/network/dcnm/dcnm_vpc_pair_utils.py index 06d509054..d99aac632 100644 --- a/plugins/module_utils/network/dcnm/dcnm_vpc_pair_utils.py +++ b/plugins/module_utils/network/dcnm/dcnm_vpc_pair_utils.py @@ -65,41 +65,6 @@ def dcnm_vpc_pair_utils_validate_profile(self, profile, arg_spec): return vpc_pair_profile_info -def dcnm_vpc_pair_utils_check_if_meta(self, dev): - - for elem in self.meta_switches: - if dev in elem: - return True - return False - - -def dcnm_vpc_pair_utils_validate_devices(self, cfg): - - if (cfg.get("peerOneId", None) is not None) and ( - cfg["peerOneId"] not in self.managable - ): - mesg = "Switch {0} is not Manageable".format(cfg["peerOneId"]) - self.module.fail_json(msg=mesg) - - if (cfg.get("peerTwoId", None) is not None) and ( - cfg["peerTwoId"] not in self.managable - ): - mesg = "Switch {0} is not Manageable".format(cfg["peerTwoId"]) - self.module.fail_json(msg=mesg) - - if (cfg.get("peerOneId", None) is not None) and ( - dcnm_vpc_pair_utils_check_if_meta(self, cfg["peerOneId"]) is True - ): - mesg = "Switch {0} is not Manageable".format(cfg["peerOneId"]) - self.module.fail_json(msg=mesg) - - if (cfg.get("peerTwoId", None) is not None) and ( - dcnm_vpc_pair_utils_check_if_meta(self, cfg["peerTwoId"]) is True - ): - mesg = "Switch {0} is not Manageable".format(cfg["peerTwoId"]) - self.module.fail_json(msg=mesg) - - def dcnm_vpc_pair_utils_translate_config(self, cfg): if cfg.get("peerOneId", "") != "": diff --git a/plugins/modules/dcnm_vpc_pair.py b/plugins/modules/dcnm_vpc_pair.py index 0130db341..d6fbfb46d 100644 --- a/plugins/modules/dcnm_vpc_pair.py +++ b/plugins/modules/dcnm_vpc_pair.py @@ -436,7 +436,6 @@ dcnm_vpc_pair_utils_get_sync_status, dcnm_vpc_pair_utils_get_delete_list, dcnm_vpc_pair_utils_get_all_filtered_vpc_pair_pairs, - dcnm_vpc_pair_utils_validate_devices, ) @@ -1104,9 +1103,6 @@ def dcnm_vpc_pair_translate_playbook_info(self, config, ip_sn, hn_sn): # Add other translations as required dcnm_vpc_pair_utils_translate_config(self, cfg) - # Check if the switches included in the config are Manageable. - dcnm_vpc_pair_utils_validate_devices(self, cfg) - def dcnm_vpc_pair_fetch_template_details(self, template_info): """