diff options
| author | Anthony Young <sleepsonthefloor@gmail.com> | 2011-07-27 11:08:44 -0700 |
|---|---|---|
| committer | Anthony Young <sleepsonthefloor@gmail.com> | 2011-07-27 11:08:44 -0700 |
| commit | f1830708f823a9de9c2f1cd24af5bed80302788f (patch) | |
| tree | e05f5e69faeef8a9da01fb5ac4f7199cafb6dc13 /nova/api | |
| parent | c95ee1625a6a88afdb77d305077d1ee7eeaae854 (diff) | |
Some work on testing. Two cases related to lp816713 have some coverage already: using an id as an imageRef (test_create_instance_v1_1_local_href), and using a nova href as a url (test_create_instance_v1_1)
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/create_instance_helper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/create_instance_helper.py b/nova/api/openstack/create_instance_helper.py index 0e6c0a87c..234c16bcc 100644 --- a/nova/api/openstack/create_instance_helper.py +++ b/nova/api/openstack/create_instance_helper.py @@ -89,7 +89,9 @@ class CreateInstanceHelper(object): image_href = self.controller._image_ref_from_req_data(body) # If the image href was generated by nova api, strip image_href # down to an id and use the default glance connection params - if image_href.startswith(req.application_url): + + if isinstance(image_href, basestring) and\ + image_href.startswith(req.application_url): image_href = image_href.split('/').pop() try: image_service, image_id = nova.image.get_image_service(image_href) |
