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

AnneTheAgile edited comment on LIBCLOUD-230 at 10/18/13 2:30 AM:
-----------------------------------------------------------------

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 this implementation tweak 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.

Also, more generally, would returning the attributes as a list be sufficient, 
or would one need to also return the data from the other two elements? Later I 
can check what is returned for amazon. 

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! It seems like this bug is significant 
in that allowing a node to self-report its details seems like a very helpful 
feature. Perhaps it was not prioritized due to people's using Saltstack/Puppet 
to do the same thing.


was (Author: annetheagile):
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)

Reply via email to