Пример #1
0
 def GET(self, image_id=''):
 # User needs to authenticate to get details for image(s)
     auth_token = web.ctx.get('environ').get('HTTP_X_AUTH_TOKEN', None)
     auth_tenant_id = web.ctx.get('environ').get('HTTP_X_AUTH_TENANT_ID', None)
     
     if len(image_id) <= 0:
         return json.dumps(image.get_images(auth_token), indent=4)
     else:
         return json.dumps(image.get_image_meta(image_id, auth_token), indent=4)
Пример #2
0
 def test_7get_image_meta(self):
     data = image.get_image_meta(image_id, token)
     print "\nImage Data: ", data
     self.assertIsNotNone(data, 'No data')