cloudera / cm_api

Cloudera Manager API Client
Apache License 2.0
307 stars 284 forks source link

Python: ApiHost.set_rack_id() fails with Type Error #21

Closed lhrc-mikeyp closed 9 years ago

lhrc-mikeyp commented 10 years ago

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 9 years ago

What is the resolution ?

philipl commented 9 years ago

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.