summaryrefslogtreecommitdiff
path: root/nova/tests/api/openstack/fakes.py
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2011-08-02 22:57:24 +0000
committerTarmac <>2011-08-02 22:57:24 +0000
commit84b7fb7e27904deafba8bff2fd9179013ec30e30 (patch)
treeb6f6d09ef23e30c07740c622c13a9614d9c187c9 /nova/tests/api/openstack/fakes.py
parent3821904c962ac0826d42660898b20b8413c727f2 (diff)
parent0e5b2b0bfb7f6b0af7f2c962a963830a8691410e (diff)
downloadnova-84b7fb7e27904deafba8bff2fd9179013ec30e30.tar.gz
fix for lp816713: In instance creation, when nova-api is passed imageRefs generated by itself, strip the url down to an id so that default glance connection params are used
Diffstat (limited to 'nova/tests/api/openstack/fakes.py')
-rw-r--r--nova/tests/api/openstack/fakes.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py
index 28969d5f89..a67a28a4e7 100644
--- a/nova/tests/api/openstack/fakes.py
+++ b/nova/tests/api/openstack/fakes.py
@@ -113,8 +113,7 @@ def stub_out_key_pair_funcs(stubs, have_key_pair=True):
def stub_out_image_service(stubs):
def fake_get_image_service(image_href):
- image_id = int(str(image_href).split('/')[-1])
- return (nova.image.fake.FakeImageService(), image_id)
+ return (nova.image.fake.FakeImageService(), image_href)
stubs.Set(nova.image, 'get_image_service', fake_get_image_service)
stubs.Set(nova.image, 'get_default_image_service',
lambda: nova.image.fake.FakeImageService())