tmetsch / occi-os

This is a clone and continuation of https://github.com/dizz/nova - it provides a python egg which can be easily deployed in OpenStack and will thereby add the 3rd party OCCI interface to OpenStack. For usage examples, see the OpenStack wiki.
Apache License 2.0
10 stars 23 forks source link

Must deal with unset image names #84

Open bhagemeier opened 10 years ago

bhagemeier commented 10 years ago

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 = termname.strip().replace(' ', '').replace('.', '-').lower() AttributeError: 'NoneType' object has no attribute 'strip'

tmetsch commented 10 years ago

Sure we can add this feature - which branch do you need it fastest?