You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when calling CloudInterface.remove_ip(ip_id=resourceid)
Traceback (most recent call last):
File "./getIps.py", line 45, in <module>
ci.remove_ip(ip_id=467227)
File "build/bdist.linux-x86_64/egg/ArubaCloud/PyArubaAPI.py", line 304, in remove_ip
File "build/bdist.linux-x86_64/egg/ArubaCloud/base/__init__.py", line 29, in gen_def_json_scheme
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Fix: Change line 303 of ArubaCloud/PyArubaAPI.py from: ip_id = ' "IpAddressResourceId": %s' % ip_id To: ip_id = {'IpAddressResourceId': ip_id}
Full method:
def remove_ip(self, ip_id):
"""
Delete an Ip from the boughs ip list
@param (str) ip_id: a string representing the resource id of the IP
@return: True if json method had success else False
"""
#ip_id = ' "IpAddressResourceId": %s' % ip_id
ip_id = {'IpAddressResourceId': ip_id}
json_scheme = self.gen_def_json_scheme('SetRemoveIpAddress', ip_id)
json_obj = self.call_method_post(method='SetRemoveIpAddress', json_scheme=json_scheme)
pprint(json_obj)
The text was updated successfully, but these errors were encountered:
Error when calling CloudInterface.remove_ip(ip_id=resourceid)
Fix: Change line 303 of ArubaCloud/PyArubaAPI.py from:
ip_id = ' "IpAddressResourceId": %s' % ip_id
To:
ip_id = {'IpAddressResourceId': ip_id}
Full method:
The text was updated successfully, but these errors were encountered: