Exemple #1
0
 def test_glance_client_image_ref(self):
     fixture = self._make_fixture(name='test image')
     image_id = self.service.create(self.context, fixture)['id']
     image_url = 'http://something-less-likely/%s' % image_id
     (service, same_id) = glance.get_remote_image_service(self.context,
                                                          image_url)
     self.assertEquals(same_id, image_id)
     self.assertEquals(service._client.host,
                       'something-less-likely')
Exemple #2
0
 def test_glance_client_image_id(self):
     fixture = self._make_fixture(name='test image')
     image_id = self.service.create(self.context, fixture)['id']
     (service, same_id) = glance.get_remote_image_service(self.context,
                                                          image_id)
     self.assertEquals(same_id, image_id)