You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "Anne Moroney (JIRA)" <ji...@apache.org> on 2013/10/18 04:25:41 UTC

[jira] [Commented] (LIBCLOUD-230) xml parsing error in get node details function of open stack driver (rackspace)

    [ https://issues.apache.org/jira/browse/LIBCLOUD-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13798726#comment-13798726 ] 

Anne Moroney commented on LIBCLOUD-230:
---------------------------------------

I diffed today's code and though I do not use Rackspace, it seems like this bug is still active according to the LibCloud code. In other words, LibCloud hasn't changed this method since 2012.05. 

Since it is a nominally private method, yet the implementation should be specific to Rackspace, what would be the correct way to solve this? If the Rackspace class overwrote the details method, the mildly large method would then be duplicate code. If the grandparent class includes a switch on if node=Rackspace, then the idea of abstraction is lost. So I'm  not sure what apache would prefer to do in this case.

I'm  looking for a small bug to fix to add to my vita so I would be happy to help, though I am very much new to this!

> xml parsing error in get node details function of open stack driver (rackspace)
> -------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-230
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-230
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.10.1
>            Reporter: Jayy Vis
>            Priority: Minor
>
> Problem
> While trying retrieve a rackspace node, ex_get_node_details() function of openstack driver throws "IndexError: list index out of range"
> Investigation
> The xml response from rackspace has the root element as <server>..</server> . Confirmed the same with rackspace & openstack api documentation.
> But _to_node_from_obj() function tries to find the 'server' subelements out of the response xml and thus resulting in empty list.
> Stacktrace:
> node = driver.ex_get_node_details(node_id)
>   File "/home/jay/workspace/dev/pickled/py_modules/libcloud/compute/drivers/openstack.py", line 233, in ex_get_node_details
>     return self._to_node_from_obj(resp.object)
>   File "/home/jay/workspace/dev/pickled/py_modules/libcloud/compute/drivers/openstack.py", line 598, in _to_node_from_obj
>     self.XML_NAMESPACE)[0])
> IndexError: list index out of range



--
This message was sent by Atlassian JIRA
(v6.1#6144)