Heat 显示嵌套template

时间:2022-05-03 12:47:13

关键词: Openstack,heat template


有时想根据stack显示heat template的信息:

方法为:


(1) Heat resource-list <stack name>

[root@my-orch test]# heat resource-list ft001
+--------------------+--------------------------------------+-------------------------+-----------------+----------------------+
| resource_name      | physical_resource_id                 | resource_type           | resource_status | updated_time         |
+--------------------+--------------------------------------+-------------------------+-----------------+----------------------+
| Pair01     | a42d03cb-abf6-4ffd-8244-41ecf4de132f | OS::Heat::ResourceGroup | CREATE_COMPLETE | 2016-04-18T09:26:09Z |


(2) 如果为多层嵌套,可根据(1) 显示的resource ID 显示子template信息:

[root@my-orch test]# heat resource-list a42d03cb-abf6-4ffd-8244-41ecf4de132f

+---------------+--------------------------------------+-------------------------+-----------------+----------------------+
| resource_name | physical_resource_id                 | resource_type           | resource_status | updated_time         |
+---------------+--------------------------------------+-------------------------+-----------------+----------------------+
| 0             | 99d4fafa-af79-4a99-a474-0879087d37ba | VmGroupMember | CREATE_COMPLETE | 2016-04-18T09:26:44Z |


(3) 最后根据(2)中显示的resource_id 使用command heat template-show 将嵌套heat template显示出来。


[root@my-orch test]# heat template-show 99d4fafa-af79-4a99-a474-0879087d37ba | less
description: 'Wrapper used to create an OS::Nova::Server as a member of


  of a resource group.


  '
heat_template_version: '2014-10-16'