Merge pull request #139 from cloudbuilders/glance_type_image
Make dashboard look for a service of type 'image'
This commit is contained in:
commit
bd917f3541
@ -352,7 +352,7 @@ def account_api(request):
|
||||
|
||||
|
||||
def glance_api(request):
|
||||
o = urlparse(url_for(request, 'glance'))
|
||||
o = urlparse(url_for(request, 'image'))
|
||||
LOG.debug('glance_api connection created for host "%s:%d"' %
|
||||
(o.hostname, o.port))
|
||||
return glance.client.Client(o.hostname, o.port, auth_tok=request.user.token)
|
||||
|
@ -57,7 +57,7 @@ class TestCase(test.TestCase):
|
||||
"internalURL": "http://glance/glanceapi/internal",
|
||||
"publicURL": "http://glance/glanceapi/piblic"
|
||||
}],
|
||||
"type": "glance",
|
||||
"type": "image",
|
||||
"name": "glance"
|
||||
}, {
|
||||
"endpoints": [{
|
||||
|
@ -309,13 +309,13 @@ class ApiHelperTests(test.TestCase):
|
||||
GLANCE_URL = 'http://glance/glanceapi/'
|
||||
NOVA_URL = 'http://nova/novapi/'
|
||||
|
||||
url = api.url_for(self.request, 'glance')
|
||||
url = api.url_for(self.request, 'image')
|
||||
self.assertEqual(url, GLANCE_URL + 'internal')
|
||||
|
||||
url = api.url_for(self.request, 'glance', admin=False)
|
||||
url = api.url_for(self.request, 'image', admin=False)
|
||||
self.assertEqual(url, GLANCE_URL + 'internal')
|
||||
|
||||
url = api.url_for(self.request, 'glance', admin=True)
|
||||
url = api.url_for(self.request, 'image', admin=True)
|
||||
self.assertEqual(url, GLANCE_URL + 'admin')
|
||||
|
||||
url = api.url_for(self.request, 'compute')
|
||||
@ -1225,7 +1225,7 @@ class GlanceApiTests(test.TestCase):
|
||||
client_instance.auth_tok = TEST_TOKEN
|
||||
|
||||
self.mox.StubOutWithMock(api, 'url_for')
|
||||
api.url_for(IsA(http.HttpRequest), 'glance').AndReturn(TEST_URL)
|
||||
api.url_for(IsA(http.HttpRequest), 'image').AndReturn(TEST_URL)
|
||||
|
||||
self.mox.ReplayAll()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user