cvp_api fails to identify top level container
Closed this issue · 0 comments
Hugh-Adams commented
Traceback:
File "/usr/local/lib/python2.7/dist-packages/cvprac/cvp_api.py", line 592, in get_containers
full_cont_info['parentName'])
File "/usr/local/lib/python2.7/dist-packages/cvprac/cvp_api.py", line 619, in get_container_by_name
if conts['total'] > 0 and conts['containerList']:
KeyError: 'total'
Found the issue, the script cvp_api.py, it makes a bad assumption that the top level container is called "Tenant". As my top level container and many customers is not called "Tenant" the script crashes. The errant line is 657 - "container['Name'] != 'Tenant'):" my suggestion would be to amend this to "container['Key'] != 'root'):"