Flavors

Flavor interface.

class novaclient.v1_1.flavors.Flavor(manager, info, loaded=False)

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

A flavor is an available hardware configuration for a server.

HUMAN_ID = True
delete()

Delete this flavor.

ephemeral

Provide a user-friendly accessor to OS-FLV-EXT-DATA:ephemeral

get_keys()

Get extra specs from a flavor.

Parameters: flavor – The Flavor to get extra specs from
is_public

Provide a user-friendly accessor to os-flavor-access:is_public

set_keys(metadata)

Set extra specs on a flavor.

Parameters:
  • flavor – The Flavor to set extra spec on
  • metadata – A dict of key/value pairs to be set
unset_keys(keys)

Unset extra specs on a flavor.

Parameters:
  • flavor – The Flavor to unset extra spec on
  • keys – A list of keys to be unset
class novaclient.v1_1.flavors.FlavorManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Flavor resources.

create(name, ram, vcpus, disk, flavorid='auto', ephemeral=0, swap=0, rxtx_factor=1.0, is_public=True)

Create a flavor.

Parameters:
  • name – Descriptive name of the flavor
  • ram – Memory in MB for the flavor
  • vcpus – Number of VCPUs for the flavor
  • disk – Size of local disk in GB
  • flavorid – ID for the flavor (optional). You can use the reserved value "auto" to have Nova generate a UUID for the flavor in cases where you cannot simply pass None.
  • swap – Swap space in MB
  • rxtx_factor – RX/TX factor
Return type:

Flavor

delete(flavor)

Delete a specific flavor.

Parameters: flavor – The ID of the Flavor to get.
get(flavor)

Get a specific flavor.

Parameters: flavor – The ID of the Flavor to get.
Return type: Flavor
is_alphanum_id_allowed = True
list(detailed=True, is_public=True)

Get a list of all flavors.

Return type: list of Flavor.
resource_class

alias of Flavor

Flavors的更多相关文章

  1. Android Studio Flavors的妙用(转)

    这两天发现Android Studio 的Flavors用起来相当给力!这里跟大家分享下: Flavors中文翻译过来叫“口味”,不知道确切叫法是啥,它的功能就是允许你的APP有多个不同的版本,不同版 ...

  2. All flavors must now belong to a named flavor dimension

    FAQ: All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com/r/ ...

  3. Error:All flavors must now belong to a named flavor dimension.

    环境 android studio 3.0 错误 Error:All flavors must now belong to a named flavor dimension. 解决 在build.gr ...

  4. gradle配置flavors上传nexus服务器

    分拆代码的过程中需要把核心代码编译成一个库上传到内部maven服务器上,所以研究了一下上传私库的方法. 首先拆分的是工具类库,这个库和java的库类似,没有配置flavors,所以按照网上通用的方法引 ...

  5. Android开发:《Gradle Recipes for Android》阅读笔记(翻译)3.5——在flavors间合并java代码

    问题: 你想要在单独的product flavors里面增加Acitivity或者其它java类. 解决方案: 创建合适的代码目录,增加java类,将它们和main代码合并. 讨论: flavors和 ...

  6. Android开发:《Gradle Recipes for Android》阅读笔记(翻译)3.2——设置Flavors和Variants

    问题: 需要构建大体上一样,但是使用不同资源或者类的应用. 解决方案: 产品的flavors可以帮助你对同一个app创建不同的版本. 讨论: build types是开发过程的一部分,一般用来将app ...

  7. nova Flavors

    $ nova help | grep flavor- flavor-access-add Add flavor access for the given tenant. flavor-access-l ...

  8. 安卓 android studio 报错 All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com

    这个问题是Android studio升级到3.0之后,运行的时候会提示gradle要升级到3.5版本才能编译.于是我把我的gradle升级到了 gradle-4.1-milestone-1 版本,是 ...

  9. 解决Error:All flavors must now belong to a named flavor dimension. Learn more at...

    低版本的gradle里面不会出现这个错误,高版本出现,不多说,看如何解决 在defaultConfig{}中添加:flavorDimensions "default" 保证所有的f ...

随机推荐

  1. CSS3实现边框锯齿效果

    通过CSS3的linear-gradient实现的 <div class="bg"></div> .bg{ width:300px; height:50px ...

  2. 硬件抽象层:HAL

    本章主要讲硬件抽象层:HAL,它是建立在Linux驱动之上的一套程序库.刚开始介绍了为什么要在Android中加入HAL,目的有三个,一,统一硬件的调用接口.二,解决了GPL版权问题.三,针对一些特殊 ...

  3. h5调用摄像头

    <!DOCTYPE html><html lang="zh-CN"><head> <meta charset="UTF-8&qu ...

  4. Nutch插件原理

    本文目的:讲解Nutch的插件运行时加载原理

  5. oracle更新语句merge和update

    update: update语句更新需要根据索引或者数据列遍历所有行 语句举例: update table1  a set column1=(select column from table2 b w ...

  6. case when then else end 的用法

    case when then end 改语句的执行过程是:将case后面表达式的值与各when子句中的值进行比较,如果两者相等,则返回then后的表达式的值,然后跳出case语句,否则返回else子句 ...

  7. Install Debian note

    environment: already install xp,win7 and win8PE, left 87G space to install Debian, this space not fo ...

  8. 学习笔记-Java编程思想

    2016-01-03 Swith(整数选择因子):必须是int或char这样的整数值. Java中不包含goto语句,但是可以通过标识符实现类似的控制.

  9. LEETCODE —— Populating Next Right Pointers in Each Node

    Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode * ...

  10. GridView 行单击或双击事件绑定

    protected void gvTeacherTaskList_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.Comma ...