aristanetworks / cvprac

Other
46 stars 47 forks source link

add_devices_to_inventory does not create task to add device to container. #217

Open devrobo opened 1 year ago

devrobo commented 1 year ago

CVP Version: cvp2020.1.2

The add_devices_to_inventory method adds the devices to the parent container but does not create the task to complete the addition to the parent container. It would be useful if the method could create the task[s] and return the task_iid[s] so I can execute the tasks and complete the operation. The image below shows the state after the add_devices_to_inventory() call successfully completed.

image

Maybe I am missing something. Is there an easy way to deterministically queue up the task programmatically?

[device_list](https://github.com/aristanetworks/cvprac/blob/develop/cvprac/cvp_api.py#L628:~:text=def-,add_devices_to_inventory,-(self%2C)

[call to move_device_to_container()](https://github.com/aristanetworks/cvprac/blob/1a5e1ed47f1685ac43eacd5a8272632a777d712f/cvprac/cvp_api.py#L715)

Could set the create task flag to True on the call to move_device_to_container().

devrobo commented 1 year ago

Workaround is to specify the Undefined container for the devices to be placed in. Since they come in in ZTP mode there is no move to a container and therefore no proposed change wrt placement within the container.