Nova Server VNC 控制台属性¶
Launchpad蓝图
https://blueprints.launchpad.net/heat/+spec/vnc-console-attr
问题描述¶
作为最终用户,如果我想检索 heat 堆栈中服务器资源的 vnc 控制台 url,我需要结合 heat resource-list 和 nova get-vnc-console 来获取结果。例如
heat resource-list <stack_name> # get physical_resource_id
nova get-vnc-console <physical_resource_id> <vnc_console_type>
我们应该提供一种方式让模板开发者在堆栈输出中显示控制台 url(例如,vnc、rdp 和 spice)。
使用场景¶
获取 novnc 控制台 url
heat_template_version: 2013-05-23
resources:
server:
type: "OS::Nova::Server"
properties:
image: fedora
key_name: heat_key
flavor: m1.small
outputs:
vnc_console_url:
value:
get_attr: [server, console_urls, novnc]
因此,可以通过 heat output-show <stack> vnc_console_url 来检索 novnc 控制台 url。
获取 xvpvnc 控制台 url
heat_template_version: 2013-05-23
resources:
server:
type: "OS::Nova::Server"
properties:
image: fedora
key_name: heat_key
flavor: m1.small
outputs:
vnc_console_url:
value:
get_attr: [server, console_urls, xvpvnc]
因此,可以通过 heat output-show <stack> vnc_console_url 来检索 xvpvnc 控制台 url。
获取 spice 控制台 url
heat_template_version: 2013-05-23
resources:
server:
type: "OS::Nova::Server"
properties:
image: fedora
key_name: heat_key
flavor: m1.small
outputs:
spice_console_url:
value:
get_attr: [server, console_urls, spice-html5]
提议的变更¶
向 OS::Nova::Server 资源添加复合属性 console_urls。当调用 get_attr 时,根据提供给此属性的键返回控制台 URL,或者在未提供键时返回所有支持类型的 URL。优雅地处理请求的控制台类型在当前部署中不可用的情况。
备选方案¶
无
实现¶
负责人¶
- 主要负责人
pshchelo
里程碑¶
- 完成目标里程碑
Kilo-1
工作项¶
在 Nova 客户端插件中实现 get_console_urls 方法;
向 OS::Nova::Server 资源添加 console_urls 属性。
依赖项¶
不依赖于其他规范或额外的库。