zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Eclipse将引用了第三方jar包的Java项目打包成jar文件的两种方法
    Python2.x与Python3.x的区别
    oracle锁机制
    传统解析xml的方式
    利用jdbc连接oracle数据库
    XML的解析方式(DOM、SAX、StAX)
    软件或jar包等名字里的GA意思
    windows下nginx的安装及使用
    是时候选择一款富文本编辑器了(wangEditor)
    Golang代码实现HTTPs(HTTPS证书生成和部署)
  • 原文地址:https://www.cnblogs.com/lcchuguo/p/5147463.html
Copyright © 2011-2022 走看看