Skip to content

Must deal with unset image names #84

@bhagemeier

Description

@bhagemeier

When having an empty image name which can be created by running 'glance image-create' w/o further arguments the OCCI interface fails. This probably does not happen very often, but the code should be able to deal with it gracefully.

2014-11-10 09:12:35.271 INFO nova.occiapi.wsgi.server [req-4459bf8a-5142-4e0d-8314-71975959ed6e demo demo] Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in call
return app(environ, start_response)
File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 663, in call
return self.app(env, start_response)
File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in call
return resp(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/openstackocci_icehouse-1.0-py2.7.egg/occi_os_api/wsgi.py", line 152, in call
self._refresh_os_mixins(extras)
File "/usr/local/lib/python2.7/dist-packages/openstackocci_icehouse-1.0-py2.7.egg/occi_os_api/wsgi.py", line 170, in refresh_os_mixins
os_lst = [occify_terms(item['name']) for item in images]
File "/usr/local/lib/python2.7/dist-packages/openstackocci_icehouse-1.0-py2.7.egg/occi_os_api/wsgi.py", line 273, in occify_terms
term = term_name.strip().replace(' ', '
').replace('.', '-').lower()
AttributeError: 'NoneType' object has no attribute 'strip'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions