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

本文档详细介绍了如何使用 Glance V1 API 进行图像管理,包括创建、获取、更新、删除图像等操作,并提供了具体参数说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

原博文地址:http://blog.youkuaiyun.com/qq_21398167/article/details/46620025

Images

class glanceclient.v1.images.Image(manager,info, loaded=False)

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

data(**kwargs)

delete(**kwargs)

update(**fields)

class glanceclient.v1.images.ImageManager(client)

Bases: glanceclient.openstack.common.apiclient.base.ManagerWithFind

create(**kwargs)

Create an image

TODO(bcwaldon): document accepted params

data(image, do_checksum=True, **kwargs)

Get the raw data for a specific image.

Parameters:
  • image – image object or id to look up
  • do_checksum – Enable/disable checksum validation
Return type:

iterable containing image data

delete(image,**kwargs)

Delete an image.

get(image, **kwargs)

Get the metadata for a specific image.

Parameters:image – image object or id to look up
Return type:Image
list(**kwargs)

Get a list of images.

Parameters:
  • page_size – number of items to request in each paginated request
  • limit – maximum number of images to return
  • marker – begin returning images that appear later in the imagelist than that represented by this image id
  • filters – dict of direct comparison filters that mimics thestructure of an image object
  • owner – If provided, only images with this owner (tenant id)will be listed. An empty string (‘’) matches ownerlessimages.
  • return_request_id – If an empty list is provided, populate thislist with the request ID value from the headerx-openstack-request-id
Return type:

list of Image

resource_class

alias of Image

update(image,**kwargs)

Update an image

TODO(bcwaldon): document accepted params

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值