Skip to content
This repository was archived by the owner on Aug 22, 2020. It is now read-only.
This repository was archived by the owner on Aug 22, 2020. It is now read-only.

BaseClient throwing RuntimeError: "ERROR: Unable to parse the response" #9

Description

@libowen9003

This is happening when I was trying to do 'addIpToNic' request. The secondary IP was successfully added but it threw an exception:

>>> cs_client.request('addIpToNic', args = {'nicid':'56ff09e3-17e2-48da-b340-6f7258d32bff','ipaddress':'192.168.0.200'}
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/Users/larstobi/Library/Python/2.7/site-packages/CloudStack/BaseClient.py", line 56, in request
    raise RuntimeError("ERROR: Unable to parse the response")
RuntimeError: ERROR: Unable to parse the response

After checking the response and BaseClient.py, I found that the the response to this request was:

{u'addiptovmnicresponse': {u'id': u'1efac9d5-4327-47f0-bc19-0a01bdfec6fb', u'jobid': u'4fa4bb9c-f27b-4d13-8958-4e3aa39cc731'}}

But base client was trying to parse the response and expecting the "addiptonicresponse"('addIpToNic'.lower()+'response'). Because there was a 'vm' before 'nic', it threw a RuntimeError.

This is not affecting the behavior of the function, only the job will not be returned after request is made, which makes it hard to check if the operation succeeds or not.

Let me know if anything is not clear..

Thanks!
Bowen

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions