OpenStack Heat模板详解
Heat模板全称为heat orchestration template,简称为HOT。
1 典型Heat模板结构
heat_template_version: 2015-04-30 description:# a description of the template parameter_groups:# a declaration of input parameter groups and order parameters:# declaration of input parameters resources:# declaration of template resources outputs:# declaration of output parameters
2 heat_template_version
每个HOT需要包含 heat_template_version 字段,指明所使用的 HOT 版本。
每个版本支持的内置方法不同,比如2016-04-08版本支持的内置方法如下:
digest、 get_attr、get_file、get_param、get_resource、list_join、
map_merge、repeat、resource_façade、str_replace、str_split
3 parameter groups
用于指定参数的顺序,每个参数只能与指定的group关联一次。
parameter_groups: - label: <human-readable label of parameter group>description: <description of the parameter group>parameters:- <param name>- <param name>
4 parameter
parameters:<param name>:type: <string | number | json | comma_delimited_list | boolean>label: <human-readable name of the parameter>description: <description of the parameter>default: <default value for parameter>hidden: <true | false>constraints:<parameter constraints>immutable: <true | false>
示例:
parameters:user_name:type: stringlabel: User Namedescription: User name to be configured for the applicationport_number:type: numberlabel: Port Numberdescription: Port number to be configured for the web server
parameter type:
Type |
Description |
Examples |
string |
A literal string. |
“String param” |
number |
An integer or float. |
“2”; “0.2” |
comma_delimited_list |
An array of literal strings that are separated by commas. The total number of strings should be one more than the total number of commas. |
[“one”, “two”]; “one, two”; Note: “one, two” returns [“one”, ” two”] |
json |
A JSON-formatted map or list. |
{“key”: “value”} |
boolean |
Boolean type value, which can be equal “t”, “true”, “on”, “y”, “yes”, or “1” for true value and “f”, “false”, “off”, “n”, “no”, or “0” for false value. |
“on”; “n” |
hidden:隐藏用户输入的信息,如密码,将 hidden 属性置为 true。
constraints:已有的内置参数:OS::stack_name、OS::stack_id、OS::project_id。
constraints:- <constraint type>: <constraint definition>description: <constraint description>
5 resources
resources:<resource ID>:type: <resource type>properties:<property name>: <property value>metadata:<resource specific metadata>depends_on: <resource ID or list of ID>update_policy: <update policy>deletion_policy: <deletion policy>
示例:
resources:my_instance:type: OS::Nova::Serverproperties:flavor: m1.smallimage: F18-x86_64-cfntools
资源依赖的示例:
resources:server1:type: OS::Nova::Serverdepends_on: [ server2, server3 ]server2:type: OS::Nova::Server
6 outputs
outputs:<parameter name>:description: <description>value: <parameter value>
示例:
outputs:instance_ip:description: IP address of the deployed compute instancevalue: { get_attr: [my_instance, first_address] }
编者注:本文来自OpenStack开源团队工程师陈曾
转载于:https://www.cnblogs.com/openstackteam/p/5533034.html
OpenStack Heat模板详解相关推荐
- 26.C++- 泛型编程之类模板(详解)
在上章25.C++- 泛型编程之函数模板(详解) 学习了后,本章继续来学习类模板 类模板介绍 和函数模板一样,将泛型思想应用于类. 编译器对类模板处理方式和函数模板相同,都是进行2次编译 类模板通 ...
- html 自定义打印模板,HTML+CSS入门 自定义模板详解
本篇教程介绍了HTML+CSS入门 自定义模板详解,希望阅读本篇文章以后大家有所收获,帮助大家HTML+CSS入门.< 首先总的stylecss和大模板都是当初angel_Kitty学姐的,嗯, ...
- 25.C++- 泛型编程之函数模板(详解)
本章学习: 1)初探函数模板 2)深入理解函数模板 3)多参函数模板 4)重载函数模板 当我们想写个Swap()交换函数时,通常这样写: void Swap(int& a, int& ...
- 新闻类APP模板详解(android版)
1.概述 本文将介绍一个android版新闻类app模板,是本人整合了网上各类资源后整理出来的,希望对大家有所帮助! iOS版新闻类app模板详见: 新闻类APP模板详解(iOS版) 本模板app截图 ...
- android组件模板,提高效率必备神器 ---- Android Studio模板详解
原标题:提高效率必备神器 ---- Android Studio模板详解 Android Studio模板大家应该很熟悉,你新建一个project或者module的时候,AS会帮你提供几个选项供你选择 ...
- 【无标题】类模板详解\n类模板的定义及实例化\ntemplate\u003Cclass 模板参数>\nclass 类名 {\n // 类定义\n};\n\ntemplate\u003Ctypen
类模板详解\n类模板的定义及实例化\ntemplate\u003Cclass 模板参数>\nclass 类名 {\n // 类定义\n};\n\ntemplate\u003Ctypenam ...
- 【带你吃透C++】模板详解
本文收录于专栏:C++ 关注作者,持续阅读作者的文章,学习更多知识! https://blog.csdn.net/weixin_53306029?spm=1001.2014.3001.5343 模板详 ...
- 类模板详解\n类模板的定义及实例化 模板参数
类模板详解\n类模板的定义及实例化\ntemplate\u003Cclass 模板参数>\nclass 类名 {\n // 类定义\n};\n\ntemplate\u003Ctypenam ...
- CentOS 7.1结合openstack L版本详解
1-OpenStack介绍 环境准备: ################################################################################ ...
最新文章
- Java程序员从阿里拿到offer回来,这些面试题你会吗?
- mysql开启binlog
- python中读写excel的扩展库_Python读写Excel文件第三方库汇总,你想要的都在这儿!...
- 命令行的基本使用方法(权限)
- Linux学习中压缩包格式有哪些?
- 【Qt】QModbusDataUnit类
- linux 切图软件下载,学会23个linux常用命令,不做前端切图仔~
- 前端学习(2706):重读vue电商网站26之JSON格式的配置文件
- 【牛客 - 125A】灰魔法师(打表,暴力)
- 腾讯三面:40亿个QQ号码如何去重?
- Knight Moves(信息学奥赛一本通-T1257)
- Ionic4.x 中自定义公共模块
- vue 实现文本的拖拽_基于Vue实现拖拽功能
- Java 学习路线一条龙版
- 从《华为的冬天》到AI的冬天 | 甲子光年
- visual studio 2019/2022 安装时卡住,一直正在提取文件时的亲测有效的解决方案
- 什么是SOCKS5代理 它的原理是什么
- gmx editconf命令
- shell之常用工具(cut、sort、uniq、tr)
- java计算机毕业设计web家庭财务管理系统MyBatis+系统+LW文档+源码+调试部署
热门文章
- 如何改变一个地图的Zoom单位
- 三星android获取root权限,三星G9250(S6 Edge公开版全网通 Android 5.1)获取ROOT权限详解教程...
- forkjoin rxjs_如何通过吃披萨来理解RxJS运算符:zip,forkJoin和Combine
- 通过构建城市来解释HTML,CSS和JavaScript之间的关系
- SDK安装报错HTTP Status 416
- navicat for mysql如何在更新记录时自动记录更新时间
- python和idl_有前辈对比过IDL和Python的速度吗,哪个会快点?
- JAVA中的并发工具 -- CountDownLatch、CyclicBarrier、Semaphore
- BZOJ 4817: [Sdoi2017]树点涂色(LCT+树剖+线段树)
- 2017海克斯康拉斯维加斯美国大会 精彩即将开始