码迷,mamicode.com
首页 > 编程语言 > 详细

openstack中Nova组件images的所有python API 汇总

时间:2015-06-24 12:57:03      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:

Images

Image interface.

class novaclient.v2.images.Image(manager, info, loaded=False)

Bases: novaclient.openstack.common.apiclient.base.Resource

An image is a collection of files used to create or rebuild a server.

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
HUMAN_ID = True

delete()

Delete this image.

class novaclient.v2.images.ImageManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Image resources.

delete(image)

Delete an image.

It should go without saying that you can’t delete an imagethat you didn’t create.

Parameters: image – The Image (or its ID) to delete.
delete_meta(image, keys)

Delete metadata from an image

Parameters:
  • image – The Image to delete metadata
  • keys – A list of metadata keys to delete from the image
get(image)

Get an image.

Parameters: image – The ID of the image to get.
Return type: Image
list(detailed=True, limit=None)

Get a list of all images.

Return type: list of Image
Parameters: limit – maximum number of images to return.
resource_class

alias of Image

set_meta(image, metadata)

Set an images metadata

Parameters:
  • image – The Image to add metadata to
  • metadata – A dict of metadata to add to the image

openstack中Nova组件images的所有python API 汇总

标签:

原文地址:http://blog.csdn.net/qq_21398167/article/details/46619965

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!