Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Deploy #64

Open
jasonyates opened this issue Feb 3, 2022 · 2 comments
Open

How to Deploy #64

jasonyates opened this issue Feb 3, 2022 · 2 comments

Comments

@jasonyates
Copy link

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?

@kaisero kaisero mentioned this issue Feb 19, 2022
kaisero added a commit that referenced this issue Feb 19, 2022
# 1.0.10 [2022-02-19]

## Fixed

* incorrect api endpoint for object.dynamicobject (#57, #64). thanks @dheule for providing a fix
* missing refs in devicerecord for physicalinterface (#61)
* incorrect api endpoint for object.continent (#60)
* uuid check issues with object.applicationcategory (#59)
* removed incorrect delete calls for device.devicerecord.redundantinterface
* removed incorrect delete calls for device.devicerecord.subinterface
* removed incorrect delete calls for device.devicerecord.virtualswitch
* removed incorrect delete calls for device.devicerecord.virtualtunnelinterface
* removed incorrect delete calls for device.devicerecord.vlaninterface
@kaisero kaisero reopened this Feb 19, 2022
@kaisero
Copy link
Owner

kaisero commented Feb 19, 2022

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

@iurikura
Copy link

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.

How to get deployable devices

>>> dd = fmc.deployment.deployabledevices.get()
>>> print(dd)
[{'isDeploying': False, .....(snip).....
>>> print(dd[0]['device']['id'])
1fae3094-b632-11ec-87bd-eb4724961310

How to deploy

>>> 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)

Confirmation

>>> dd = fmc.deployment.deployabledevices.get()
>>> print(dd)
[{'isDeploying': True, .....(snip).....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants