Tim Slot created LIBCLOUD-777:
---------------------------------
Summary: Openstack compute parsing error
Key: LIBCLOUD-777
URL: https://issues.apache.org/jira/browse/LIBCLOUD-777
Project: Libcloud
Issue Type: Bug
Components: Compute
Reporter: Tim Slot
Hi,
I'm using the openstack driver and authentication goes well. When I do a
driver.list_images() or list_sizes() I'm getting a parse error from the
openstack parser.
This is my config:
OpenStack = get_driver(Provider.OPENSTACK)
driver = OpenStack('USER', 'PASS',
ex_tenant_name='TENANT_ID',
ex_force_auth_url='https://identity.stack.cloudvps.com/v2.0/tokens',
ex_force_service_region='NL',
ex_force_service_type='computev3',
ex_force_service_name='nova compute v3',
ex_force_auth_version='2.0_password')
This is the error:
# -------- begin 4449709904:4449372064 response ----------
HTTP/1.1 300 Multiple Choices
Content-Length: 580
Strict-Transport-Security: max-age=31536000
Content-Type: application/json
{"choices": [{"status": "EXPERIMENTAL", "media-types": [{"base":
"application/json", "type":
"application/vnd.openstack.compute+json;version=3"}], "id": "v3.0", "links":
[{"href": "http://compute.stack.cloudvps.com/v3/v3/images/detail", "rel":
"self"}]}, {"status": "CURRENT", "media-types": [{"base": "application/xml",
"type": "application/vnd.openstack.compute+xml;version=2"}, {"base":
"application/json", "type":
"application/vnd.openstack.compute+json;version=2"}], "id": "v2.0", "links":
[{"href": "http://compute.stack.cloudvps.com/v2/v3/images/detail", "rel":
"self"}]}]}
# -------- end 4449709904:4449372064 response ----------
Traceback (most recent call last):
File "app.py", line 17, in <module>
images = driver.list_images()
File
"/usr/local/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py",
line 268, in list_images
self.connection.request('/images/detail').object, ex_only_active)
File "/usr/local/lib/python2.7/site-packages/libcloud/common/openstack.py",
line 202, in request
raw=raw)
File "/usr/local/lib/python2.7/site-packages/libcloud/common/base.py", line
799, in request
response = responseCls(**kwargs)
File
"/usr/local/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py",
line 1001, in __init__
super(OpenStack_1_1_Response, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/libcloud/common/base.py", line
142, in __init__
message=self.parse_error(),
File "/usr/local/lib/python2.7/site-packages/libcloud/common/openstack.py",
line 359, in parse_error
if len(values) > 0 and values[0]['code'] == 404 and key_pair_name:
TypeError: list indices must be integers, not str
I think its because of the multiple choices, but I'm not sure. Any idea how to
solve this?
Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)