Open jasonyates opened 2 years ago
There is currently no detailed documentation available. I plan to create doc samples for the upcoming release which should arrive by the end of March
I did a quick try with interaction shell with single ftd device. *Not considered about complex topology and errer handling. Minimal fields have not been scrutinized for fields in the data payload. I am also looking forward more detailed documentation from the author for deployment.
>>> dd = fmc.deployment.deployabledevices.get()
>>> print(dd)
[{'isDeploying': False, .....(snip).....
>>> print(dd[0]['device']['id'])
1fae3094-b632-11ec-87bd-eb4724961310
>>> from datetime import datetime
>>> data = {
... "type": "DeploymentRequest",
... "version": datetime.now().strftime('%s') + "000",
... "forceDeploy": True,
... "ignoreWarning": True,
... "deviceList": [
... "1fae3094-b632-11ec-87bd-eb4724961310"
... ]
... }
>>> request = fmc.deployment.deploymentrequest.create(data=data)
>>> dd = fmc.deployment.deployabledevices.get()
>>> print(dd)
[{'isDeploying': True, .....(snip).....
Are there any code examples available for best practice on how to check if changes made to FMC and deployable and to trigger a deployment?