When decommissioned devices are in the device inventory, the facts module crashes as the cvprac API call api.get_device_image_info(key) returns type None, and this causes an error when returning the info. (Line 465, __device_get_image_bundle_name()).
Simple to fix - we just need an extra check on facts_tools.py, line 465 to handle if cvprac returns type None
>>> for device in inventory:
... resp = clnt.api.get_device_image_info(device['systemMacAddress'])
... if resp is None:
... pprint(device)
Relevant log output
>>> if resp['bundleName'] is not None:
... print("won't get here")
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not subscriptable
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Issue Summary
When decommissioned devices are in the device inventory, the facts module crashes as the cvprac API call api.get_device_image_info(key) returns type None, and this causes an error when returning the info. (Line 465, __device_get_image_bundle_name()).
Simple to fix - we just need an extra check on facts_tools.py, line 465 to handle if cvprac returns type None
Which component(s) of AVD impacted
cv_facts_v3
How do you run AVD ?
Ansible CLI (with virtual-env or native python)
Input variables
Steps to reproduce
Relevant log output
Code of Conduct