cvprac 1.4.0
Python 3.10.12
CVP is CVAAS
While using the apply_configlets_to_device method, we observed an issue where a task is not created if the configlet is new.
This behavior occurs even when the create_task=True flag is explicitly set.
In other words if we create a configlet using
configlet_key = client.api.add_configlet(
configlet_name, configlet_content
)
and then apply the configlet using:
response_data = client.api.apply_configlets_to_device(
"COMP",
device_info,
[configlet_info],
create_task=True,
validate=True
)
Then the configlet is created and assigned to the device but no task is created.
On the other hand, if we update an already existing configlet (that is already applied to a device) using:
result = client.api.update_configlet(
config=configlet_content,
key=configlet_key,
name=configlet_name
)
And then apply the configlet using the same apply_configlets_to_device:
response_data = client.api.apply_configlets_to_device(
"COMP",
device_info,
[configlet_info],
create_task=True,
validate=True
)
Then a task is created.
After some troubleshooting I found that:
- if we run the apply_configlets_to_device again another time, the task is created, this only afftects the first time the method is called.
- apply_configlets_to_device returns success the first time with no task ID so I conclude the method is not failing.
- This issue does not happen when validate=False
cvprac 1.4.0
Python 3.10.12
CVP is CVAAS
While using the apply_configlets_to_device method, we observed an issue where a task is not created if the configlet is new.
This behavior occurs even when the create_task=True flag is explicitly set.
In other words if we create a configlet using
and then apply the configlet using:
Then the configlet is created and assigned to the device but no task is created.
On the other hand, if we update an already existing configlet (that is already applied to a device) using:
And then apply the configlet using the same apply_configlets_to_device:
Then a task is created.
After some troubleshooting I found that: