diff --git a/heat/engine/environment.py b/heat/engine/environment.py index 2385423a7..0421e7f99 100644 --- a/heat/engine/environment.py +++ b/heat/engine/environment.py @@ -310,15 +310,17 @@ class ResourceRegistry(object): def get_types(self, support_status): '''Return a list of valid resource types.''' - def is_plugin(key): - return isinstance(self._registry[key], ClassResourceInfo) + def is_resource(key): + return isinstance(self._registry[key], (ClassResourceInfo, + TemplateResourceInfo)) def status_matches(cls): - return support_status is None or \ - cls.value.support_status.status == support_status.encode() + return (support_status is None or + cls.get_class().support_status.status == + support_status.encode()) return [name for name, cls in self._registry.iteritems() - if is_plugin(name) and status_matches(cls)] + if is_resource(name) and status_matches(cls)] SECTIONS = (PARAMETERS, RESOURCE_REGISTRY) = \ diff --git a/heat/tests/test_engine_service.py b/heat/tests/test_engine_service.py index a43d2f606..4e663c4de 100644 --- a/heat/tests/test_engine_service.py +++ b/heat/tests/test_engine_service.py @@ -1791,6 +1791,7 @@ class StackServiceTest(HeatTestCase): resources = self.eng.list_resource_types(self.ctx) self.assertIsInstance(resources, list) self.assertIn('AWS::EC2::Instance', resources) + self.assertIn('AWS::RDS::DBInstance', resources) def test_list_resource_types_deprecated(self): resources = self.eng.list_resource_types(self.ctx, "DEPRECATED")