~0x44/nova/extdoc

« back to all changes in this revision

Viewing changes to nova/tests/glance/stubs.py

Update GlanceClient, GlanceImageService, and Glance Xen plugin to work with Glance keystone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
import StringIO
18
18
 
19
 
import nova.image
 
19
from nova.image import glance
20
20
 
21
21
 
22
22
def stubout_glance_client(stubs):
23
 
    def fake_get_glance_client(image_href):
 
23
    def fake_get_glance_client(context, image_href):
24
24
        image_id = int(str(image_href).split('/')[-1])
25
25
        return (FakeGlance('foo'), image_id)
26
 
    stubs.Set(nova.image, 'get_glance_client', fake_get_glance_client)
 
26
    stubs.Set(glance, 'get_glance_client', fake_get_glance_client)
27
27
 
28
28
 
29
29
class FakeGlance(object):