Fix user provider template registration
Trying to use an external template as a resource fails in obscure path in the environment because TemplateResourceInfo value is not required. Enforcing a value (with the template path) fixes the issue. Change-Id: Ib92bc0827e9a94a3735493eb47cd227449552990 Closes-Bug: #1288541
This commit is contained in:
parent
96f427b592
commit
0649a00e66
|
@ -111,6 +111,7 @@ class TemplateResourceInfo(ResourceInfo):
|
|||
self.template_name = self.name
|
||||
else:
|
||||
self.template_name = value
|
||||
self.value = self.template_name
|
||||
|
||||
def get_class(self):
|
||||
from heat.engine.resources import template_resource
|
||||
|
|
|
@ -428,6 +428,10 @@ class ProviderTemplateTest(HeatTestCase):
|
|||
self.assertIn(attrib, templ_resource.attributes)
|
||||
for k, v in json_snippet.get("Properties").items():
|
||||
self.assertEqual(v, templ_resource.properties[k])
|
||||
self.assertEqual(
|
||||
{'WordPress_Single_Instance.yaml':
|
||||
'WordPress_Single_Instance.yaml', 'resources': {}},
|
||||
stack.env.user_env_as_dict()["resource_registry"])
|
||||
|
||||
def test_persisted_unregistered_provider_templates(self):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue