コード例 #1
0
 def create_image(cls, client, **kwargs):
     body = client.create_image(name=data_utils.rand_name('image'),
                                container_format='bare',
                                disk_format='raw',
                                **kwargs)
     # TODO(jswarren) Move ['image'] up to initial body value assignment
     # once both v1 and v2 glance clients include the full response
     # object.
     if 'image' in body:
         body = body['image']
     cls.image_ids.append(body['id'])
     return body
コード例 #2
0
ファイル: base.py プロジェクト: andymcc/ceilometer
 def create_image(cls, client, **kwargs):
     body = client.create_image(name=data_utils.rand_name('image'),
                                container_format='bare',
                                disk_format='raw',
                                **kwargs)
     # TODO(jswarren) Move ['image'] up to initial body value assignment
     # once both v1 and v2 glance clients include the full response
     # object.
     if 'image' in body:
         body = body['image']
     cls.image_ids.append(body['id'])
     return body