Which version of Libcloud are you using? Libcloud 0.6.0-beta1 contains support for new OpenStack 1.1 API.
On Thu, Oct 27, 2011 at 4:52 PM, Sergey Kashaba <skash...@mirantis.com>wrote: > Hi, > > I recently started to work with OpenCloud using libcloud as a high > level wrapper. > I started with the examples and almost immediately got a problem - > after creating driver (using OpenStack provider) I wasn't able to > perform list_sizes. The same time list_images works fine. > The error - it can't get any parameter - RackspaceNodeDriver._to_size > gets None instead of all the parameters. > Looks that the reason can be in the response from nova-api > I fixed the problem by changing this function to: > > def _to_size(self, el): > def get_node_value(elem, name): > childs = list(elem) > > for child in childs: > if child.tag.endswith(name): > val = re.sub("\n[ ]+", "", child.text) > return val > > s = NodeSize(id=get_node_value(el, 'id'), > name=get_node_value(el, 'name'), > ram=int(get_node_value(el, 'ram')), > disk=int(get_node_value(el, 'disk')), > bandwidth=None, # XXX: needs hardcode > price=self._get_size_price(get_node_value(el, > 'id')), # Hardcoded, > driver=self.connection.driver) > return s > > > Libvirt version - 0.5.2 > Nova version 2011.3 > I expect that something can be missed in packets installed or wrong > configuration, would be great to get any help. > > Thanks in advance > -- > Sergii Kashaba > Senior developer, Mirantis, Kharkiv > SkypeID: sergii_kashaba >