[
https://issues.apache.org/jira/browse/LIBCLOUD-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomaz Muraus resolved LIBCLOUD-325.
-----------------------------------
Resolution: Fixed
Assignee: Tomaz Muraus
Thanks for your patch, I've merged it into trunk and 0.12.x branch.
To reduce the confusion, I've changed the attribute name from "cpu" to "vcpus".
The actual value reflects number of virtual CPUs / cores and not number of CPUs
so calling it "vcpus" makes more sense.
Next time please also make sure the tests pass before submitting a patch.
Traceback (most recent call last):
File "/w/lc/t1/libcloud/test/compute/__init__.py", line 31, in
test_list_sizes_response
sizes = self.driver.list_sizes()
File "/w/lc/t1/libcloud/compute/drivers/openstack.py", line 224, in list_sizes
self.connection.request('/flavors/detail').object)
File "/w/lc/t1/libcloud/compute/drivers/openstack.py", line 793, in _to_sizes
return [self._to_size(el) for el in elements]
File "/w/lc/t1/libcloud/compute/drivers/openstack.py", line 801, in _to_size
cpu=int(el.get('vcpus')),
TypeError: int() argument must be a string or a number, not 'NoneType'
> CPU field in openstack driver
> ------------------------------
>
> Key: LIBCLOUD-325
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-325
> Project: Libcloud
> Issue Type: Improvement
> Components: Compute
> Reporter: Carlo
> Assignee: Tomaz Muraus
> Priority: Minor
> Attachments: cpu_in_openstack_driver.patch
>
>
> I draw inspiration from this :
> https://issues.apache.org/jira/browse/LIBCLOUD-119
> to add a little improvement to openstack driver, in fact CPU is missing in
> main openstack driver
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira