-
Notifications
You must be signed in to change notification settings - Fork 2
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
swim bug fixed - image activation for all the child sites devices - V2.3.7.6 #67
swim bug fixed - image activation for all the child sites devices - V2.3.7.6 #67
Conversation
response = response.get('response') | ||
site_names = site_name + ".*" | ||
get_site_names = self.get_site(site_names) | ||
self.log(get_site_names) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.log("Fetched site names: {0}".format(str(get_site_names)), "DEBUG")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the code
response = self.dnac._exec( | ||
family="site_design", | ||
function='get_site_assigned_network_devices', | ||
op_modifies=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True or False?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have removed the op_modifies as it is not required for get
params={"site_id": site_id}, | ||
) | ||
self.log("Received API response from 'get_site_assigned_network_devices': {0}".format(str(response)), "DEBUG") | ||
response = response.get('response') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead:
devices = response.get('response')
if not devices:
self.log("No devices found for site - '{0}'.".format(site_name), "WARNING")
continue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the code
except Exception as e: | ||
self.log("Unable to fetch the device(s) associated to the site '{0}' due to '{1}'".format(site_name, str(e)), "WARNING") | ||
return device_uuid_list | ||
for device_id in response: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for device in devices:
device_id_list.append(device.get("deviceId"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the code
offset = offset + 1 | ||
self.log("Received API response from 'device_list_response': {0}".format(str(device_list_response)), "DEBUG") | ||
device_response = device_list_response.get('response') | ||
self.log("Received API response: {0}".format(str(device_list_response)), "DEBUG") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.log("Received API response from 'get_device_list': {0}".format(str(device_list_response)), "DEBUG")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the code
8573416
into
cisco-en-programmability:main
Description
image activation for all the child sites devices - V2.3.7.6
Type of Change
Checklist
Ansible Best Practices
ansible-vault
or environment variables)Documentation
Screenshots (if applicable)
Notes to Reviewers