Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplication issue in LAN automation workflow manager #72

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/modules/lan_automation_workflow_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,12 @@ def extract_lan_automation(self, config):
msg="IP address: {} does not exist in Catalyst Center. Please provide a valid IP address for "
"'lan_automation -> peer_device_management_ip_address'!".format(peer_device_ip), response=[]
)
self.log("Validate peer device management IP address is not the same as primary device IP", "INFO")
if primary_device_ip == peer_device_ip:
self.module.fail_json(
msg="The primary device management IP address '{}' cannot be the same as the peer device IP "
"address '{}'.".format(primary_device_ip, peer_device_ip), response=[]
)
self.log("Peer device management IP address '{}' is valid.".format(peer_device_ip), "DEBUG")
else:
self.log("Peer device IP not provided. Skipping peer device checks.", "INFO")
Expand Down
Loading