Merge "Include support status in resource schema"
This commit is contained in:
commit
7ebef029c6
@ -1054,6 +1054,8 @@ class EngineService(service.Service):
|
|||||||
rpc_api.RES_SCHEMA_RES_TYPE: type_name,
|
rpc_api.RES_SCHEMA_RES_TYPE: type_name,
|
||||||
rpc_api.RES_SCHEMA_PROPERTIES: dict(properties_schema()),
|
rpc_api.RES_SCHEMA_PROPERTIES: dict(properties_schema()),
|
||||||
rpc_api.RES_SCHEMA_ATTRIBUTES: dict(attributes_schema()),
|
rpc_api.RES_SCHEMA_ATTRIBUTES: dict(attributes_schema()),
|
||||||
|
rpc_api.RES_SCHEMA_SUPPORT_STATUS:
|
||||||
|
resource_class.support_status.to_dict(),
|
||||||
}
|
}
|
||||||
|
|
||||||
def generate_template(self, cnxt, type_name, template_type='cfn'):
|
def generate_template(self, cnxt, type_name, template_type='cfn'):
|
||||||
|
@ -76,8 +76,9 @@ RES_KEYS = (
|
|||||||
|
|
||||||
RES_SCHEMA_KEYS = (
|
RES_SCHEMA_KEYS = (
|
||||||
RES_SCHEMA_RES_TYPE, RES_SCHEMA_PROPERTIES, RES_SCHEMA_ATTRIBUTES,
|
RES_SCHEMA_RES_TYPE, RES_SCHEMA_PROPERTIES, RES_SCHEMA_ATTRIBUTES,
|
||||||
|
RES_SCHEMA_SUPPORT_STATUS,
|
||||||
) = (
|
) = (
|
||||||
RES_TYPE, 'properties', 'attributes',
|
RES_TYPE, 'properties', 'attributes', 'support_status'
|
||||||
)
|
)
|
||||||
|
|
||||||
EVENT_KEYS = (
|
EVENT_KEYS = (
|
||||||
|
@ -2036,6 +2036,11 @@ class StackControllerTest(ControllerTest, common.HeatTestCase):
|
|||||||
'foo': {'description': 'A generic attribute'},
|
'foo': {'description': 'A generic attribute'},
|
||||||
'Foo': {'description': 'Another generic attribute'},
|
'Foo': {'description': 'Another generic attribute'},
|
||||||
},
|
},
|
||||||
|
'support_status': {
|
||||||
|
'status': 'SUPPORTED',
|
||||||
|
'version': None,
|
||||||
|
'message': None,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
self.m.StubOutWithMock(rpc_client.EngineClient, 'call')
|
self.m.StubOutWithMock(rpc_client.EngineClient, 'call')
|
||||||
rpc_client.EngineClient.call(
|
rpc_client.EngineClient.call(
|
||||||
|
@ -2328,6 +2328,11 @@ class StackServiceTest(common.HeatTestCase):
|
|||||||
'foo': {'description': 'A generic attribute'},
|
'foo': {'description': 'A generic attribute'},
|
||||||
'Foo': {'description': 'Another generic attribute'},
|
'Foo': {'description': 'Another generic attribute'},
|
||||||
},
|
},
|
||||||
|
'support_status': {
|
||||||
|
'status': 'SUPPORTED',
|
||||||
|
'version': None,
|
||||||
|
'message': None,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
schema = self.eng.resource_schema(self.ctx, type_name=type_name)
|
schema = self.eng.resource_schema(self.ctx, type_name=type_name)
|
||||||
@ -2347,6 +2352,11 @@ class StackServiceTest(common.HeatTestCase):
|
|||||||
'attr2': {'description': 'Another generic attribute',
|
'attr2': {'description': 'Another generic attribute',
|
||||||
'type': 'map'},
|
'type': 'map'},
|
||||||
},
|
},
|
||||||
|
'support_status': {
|
||||||
|
'status': 'SUPPORTED',
|
||||||
|
'version': None,
|
||||||
|
'message': None,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
schema = self.eng.resource_schema(self.ctx, type_name=type_name)
|
schema = self.eng.resource_schema(self.ctx, type_name=type_name)
|
||||||
self.assertEqual(expected, schema)
|
self.assertEqual(expected, schema)
|
||||||
|
Loading…
Reference in New Issue
Block a user