- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Netmri python API script_broker.run problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-19-2017 11:49 PM
Hello,
I would like to run a CSS script using Netmri Python API,
here an extract of the python script on my linux machine.
#!/usr/bin/python3.6
from infoblox_netmri.client import InfobloxNetMRI
client = InfobloxNetMRI(
defaults.get("host"),
defaults.get("username"),
defaults.get("password"),
)
# get Script broker
script_broker = client.get_broker('Script')
# Run script
job_id = script_broker.run(name='Script-Null',device_ids=[83,99])
the error is the following:
Traceback (most recent call last):
File "./netmri-api1.py", line 50, in <module>
job_id = script_broker.run(name='Script-Null',device_ids=[83,99])
File "/usr/lib/python3.6/site-packages/infoblox_netmri-3.2.0.0-py3.6.egg/infoblox_netmri/api/broker/v3_2_0/script_broker.py", line 1350, in run
return self.api_request(self._get_method_fullname("run"), kwargs)
File "/usr/lib/python3.6/site-packages/infoblox_netmri-3.2.0.0-py3.6.egg/infoblox_netmri/api/broker/broker.py", line 27, in api_request
if class_name in data:
TypeError: argument of type 'NoneType' is not iterable
What is wrong, in script_broker.run ?
I tried script_broker.index(name='Script-Null') and it work.
Solved! Go to Solution.
Re: Netmri python API script_broker.run problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
09-21-2017 12:06 AM
J got the problem. The user I was using to run the Job didn't had a min Role to be able to run Jobs !!
Re: Netmri python API script_broker.run problem
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Enables execution of RESTful API calls on the NetMRI via Python. HTTP and HTTPS Execute an arbitrary method.
Re: Netmri python API script_broker.run problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-25-2021 08:26 PM