"The Resource Type could not be found." 在使用模板组合时

"The Resource Type could not be found." while using template composition

我正在尝试将 template composition 与 OpenStack Heat 一起使用。

我创建了一个极简主义模板my-custom-resource.yml:

heat_template_version: 2016-04-08
description: My Custom Resource
resources:
  dummy:
    type: OS::Heat::None

此模板与我的环境文件 environment.yml 中的名称 My::Custom::Resource 关联:

resource_registry:
  My::Custom::Resource: my-custom-resource.yml

我在测试模板中使用它stack.yml:

heat_template_version: 2016-04-08
description: My Stack
resources:
  test:
    type: My::Custom::Resource

最后,我从命令行创建堆栈:

openstack stack create -t stack.yml -e environment.yml my-stack

我收到以下错误:

ERROR: The Resource Type (My::Custom::Resource) could not be found.

我检查了每个文件名和路径,一切正常。

事实上,the documentation 表示:

The template file extension must be .yaml or .template, or it will not be treated as a custom template resource.

因此,可以说这是理想的行为...

我真的不明白为什么存在这个限制以及为什么不支持 .yml 扩展。

此外,错误信息可以更明确!