[
https://issues.apache.org/jira/browse/LIBCLOUD-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13177620#comment-13177620
]
Gary Wilson commented on LIBCLOUD-137:
--------------------------------------
Hi Tomaz
Once again thanks for the useful feedback. Apologies just started looking at
libcloud and was just going off the examples and the API docs and obviously
that was not getting me very far.
This is great, exactly what I wanted :)
nodes = driver.list_nodes()
for node in nodes:
print(node.__dict__)
I will make sure that I read through the actual relevant python files and the
API docs in future. Nice to see that the .py files are well commented.
Why am I using various unix tools, well they work and I sometimes find it
easier to just handle and manipulate results in the shell and then feed that
data into other "things" like puppet or config files, etc and I have not really
used python, so just quicker for me to manipulate and evaluate.
Thanks very much for your feedback. I am looking forward to getting libcloud
handling all my cloud operations, it is going to be very useful I think.
> Return uuid and provider id
> ---------------------------
>
> Key: LIBCLOUD-137
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-137
> Project: Libcloud
> Issue Type: Improvement
> Components: Compute
> Affects Versions: 0.7.1
> Reporter: Gary Wilson
> Labels: compute, id,, node, uuid
>
> libcloud.compute.drivers.rackspace.RackspaceUKNodeDriver inherits
> OpenStack_1_0_NodeDriver and this does not return the required data with
> regards to node details that are required to manage rackspace nodes, not with
> the OpenStack driver in any case. Specifically driver.list.nodes() returns
> uuid stings for nodes e.g.:
> <Node: uuid=a05c637f548f64d1c847d85abe50bfda46789bec,
> name=zpf-controller-dev-2-10g-ruk, state=0, public_ips=[xxx.xxx.xxx.xxx'],
> provider=Rackspace (UK) ...>
> The uuid is not usable in the Rackspace Server or Server Action operations
> (as defined in their API) as they all require the id parameter.
> The inherited OpenStack ex_rebuild errors with:
> <snip>
> /usr/bin/python /opt/zpf/scripts/libcloud.rebuild.ruk.node $NODE_UUID
> $NODEIMAGE_UUID
> /opt/zpf/scripts/libcloud.rebuild.ruk.node
> a05c637f548f64d1c847d85abe50bfda46789bec
> 10458692
> Traceback (most recent call last):
> File "/opt/zpf/scripts/libcloud.rebuild.ruk.node", line 33, in <module>
> driver.ex_rebuild(sys.argv[1], sys.argv[2])
> File
> "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py",
> line 467, in ex_rebuild
> data=ET.tostring(elm))
> File
> "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py",
> line 139, in request
> method=method, headers=headers)
> File "/usr/lib/python2.6/site-packages/libcloud/common/openstack.py", line
> 267, in request
> return super(OpenStackBaseConnection, self).request(**kwargs)
> File "/usr/lib/python2.6/site-packages/libcloud/common/base.py", line 509,
> in request
> connection=self)
> File
> "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/openstack.py",
> line 242, in __init__
> super(OpenStack_1_0_Response, self).__init__(*args, **kwargs)
> File "/usr/lib/python2.6/site-packages/libcloud/common/base.py", line 74,
> in __init__
> raise Exception(self.parse_error())
> Exception: 404 Not Found The requested path could not be found.;
> javax.ws.rs.WebApplicationException: java.lang.NumberFormatException: For
> input string: "a05c637f548f64d1c847d85abe50bfda46789bec"
> </snip>
> The Rackspace API returns id on all "server" requests e.g.
> wget --no-check-certificate --server-response -O ruk.servers.no.detail
> --header "X-Auth-Token: xxxxxxxxxxx"
> https://lon.servers.api.rackspacecloud.com/v1.0/xxxxx/servers
> {"servers":[{"id":10085881,"name":"base-centos-6-ruk"},{"id":10087553,"name":"zpf-controller-dev-1-10g-ruk"},{"id":10087643,"name":"zpf-controller-dev-2-10g-ruk"}]}
> Am I doing something incorrect or is the OpenStack driver not compatible with
> Rackspace? If not then surely libcloud should remove Rackspace from this
> list of Providers. It would at least save people the time and effort of
> figuring that out themselves.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira