pynautobot
pynautobot copied to clipboard
Add method to easily run a Job from pynautobot
it would be useful to have a method to easily start the execution of a Job with pynautobot
Something like that
>>> import pynautobot
>>> nautobot = pynautobot.api( url="https://demo.nautobot.com/", token="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
>>>
>>> job = nautobot.extras.jobs.run(class_path="xxx", commit=False, data=None, schedule=None)
Also, maybe a separate request but it would be nice to have a way to execute a Job and wait for it to finish Something like that
>>> import pynautobot
>>> nautobot = pynautobot.api( url="https://demo.nautobot.com/", token="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
>>> job_result = nautobot.extras.jobs.run_and_wait(class_path="xxx", commit=False)
@jvanderaa @jeffkala Would this be considered completed with #56 merged?
@Renrut5 it looks like the original ask was for 2 items, the second one being a way for it to run a job and wait for the result. This has not been implemented yet.