Getting an error when trying to pass more than 10 parameters with CreateCustomProperty. This works with just 10 parameters. Also CreateCustomPropertyWithValues gets an error with more than 11 parameters. Trying to set mandatory and a default value.
Andy
Name: requests Version: 2.11.1
Name: orionsdk Version: 0.0.6
Python 2.7.5
NPM 12.0.1
Traceback (most recent call last):
File "create-custom-property-ITResource-test.py", line 30, in <module>
main()
File "create-custom-property-ITResource-test.py", line 24, in main
'null'
File "/usr/lib/python2.7/site-packages/orionsdk/swisclient.py", line 29, in invoke
"Invoke/{}/{}".format(entity, verb), args).json()
File "/usr/lib/python2.7/site-packages/orionsdk/swisclient.py", line 59, in _req
resp.raise_for_status()
File "/usr/lib/python2.7/site-packages/requests/models.py", line 862, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Verb Orion.NodesCustomProperties.CreateCustomProperty cannot unpackage parameter 10 with type System.Collections.Generic.Dictionary`2[System.String,System.Boolean] for url: https://10.96.254.85:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.NodesCustomProperties/CreateCustomProperty
#from __future__ import print_function
import re
import requests
import config
from orionsdk import SwisClient
def main():
swis = SwisClient(config.npm_server, config.username, config.password)
results = swis.invoke(
'Orion.NodesCustomProperties',
'CreateCustomProperty',
'ITResourceTest1',
'Excludes IT resources from alarms if set to NO',
'string',
4000,
'null',
'null',
'null',
'null',
'null',
'null',
'null',
'true',
'null'
)
requests.packages.urllib3.disable_warnings()
if __name__ == '__main__':
main()