Exam 200-901 | Question id=6175 | Software Development and Design |
Refer to the exhibit.
def process_devices (dnac, token):
url = "https://{}/api/v1/network-device" .format (dnac['host'])
headers["x-auth-token"] = token
response = requests.get(url, headers=headers, verify=False)
data = response.json()
for item in data['response']:
print(item("hostname")," ", item["managementIpAddress"])
What is the function of the Python script?
A. |
Loop through the returned list of network devices and, for each device, print the device name and management IP address. | |
B. |
Count and print the total number of available devices. | |
C. |
For each device that is returned, display the device type and associated management IP address. | |
D. |
Iterate over a list of network devices and write all device names and management IP addresses to an output file. |