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

感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正!
如果转载,请保留作者信息。
博客地址:http://blog.csdn.net/qq_21398167

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

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值