New Features
- (125) Adds Update Method based on ID to keep within the pynautobot experience to update a device (jamesharr)
python
import os
from pynautobot import api
url = os.environ["NAUTOBOT_URL"]
token = os.environ["NAUTOBOT_TOKEN"]
nautobot = api(url=url, token=token)
Update status and name fields
result = nautobot.dcim.devices.update(
id="491d799a-eeee-bbbb-aaaa-7c5cbb5b71b6",
data={
"comments": "removed from service",
"status": "decommissioned",
},
)
v.1.4.0
New Features
- (56) Adds ability to execute a job via pynautobot
> Run an instance of the job
python
Gets the job from the list of all jobs
>>> gc_backup_job = nautobot.extras.jobs.all()[14]
>>> job_result = gc_backup_job.run()
>>> job_result.result.id
'1838f8bd-440f-434e-9f29-82b46549a31d' <-- Job Result ID.
> Running the job with inputs
python
job = nautobot.extras.jobs.all()[7]
job.run(data={"hostname_regex": ".*"})
Package Updates
- Updates `gitpython` to 3.1.30
-