Exemplo n.º 1
0
 def image_name(self):
     import glanceclient.exc as glance_exceptions
     from hpcloud.api import glance
     if not self.image:
         return "(not found)"
     if hasattr(self.image, 'name'):
         return self.image.name
     if 'name' in self.image:
         return self.image['name']
     else:
         try:
             image = glance.image_get(self.request, self.image['id'])
             return image.name
         except glance_exceptions.ClientException:
             return "(not found)"
Exemplo n.º 2
0
 def image_name(self):
     import glanceclient.exc as glance_exceptions
     from hpcloud.api import glance
     if not self.image:
         return "(not found)"
     if hasattr(self.image, 'name'):
         return self.image.name
     if 'name' in self.image:
         return self.image['name']
     else:
         try:
             image = glance.image_get(self.request, self.image['id'])
             return image.name
         except glance_exceptions.ClientException:
             return "(not found)"
Exemplo n.º 3
0
 def get_image(self, request, id):
     return glance.image_get(request, id)
Exemplo n.º 4
0
 def get_image(self, request, id):
     return glance.image_get(request, id)