Python: ApiHost.set_rack_id() fails with Type Error
Closed this issue · 2 comments
lhrc-mikeyp commented
calling set_rack_id()fails with a type error because of an errror in ApiHost._put(). Typical trace is:
File "./set_rackid.py", line 90, in <module>
h.set_rack_id(new_rack_id)
File "/mnt/development/Projects/bugfix/cm_api/python/src/cm_api/endpoints/hosts.py", line 187, in set_rack_id
self._put()
File "/mnt/development/Projects//bugfix/cm_api/python/src/cm_api/endpoints/hosts.py", line 100, in _put
return self._put('', ApiHost, data=self)
TypeError: _put() takes exactly 1 non-keyword argument (3 given)
lhrc-mikeyp commented
What is the resolution ?
philipl commented
This was fixed quite a while ago. See the commit history. The fix is in the released 6.0.2, 8 and 9 python bindings on pypi.