summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Razumovsky <prazumovsky@mirantis.com>2015-03-30 12:14:21 +0300
committerPeter Razumovsky <prazumovsky@mirantis.com>2015-03-30 12:14:21 +0300
commit83f0ae1590c1951479fda598426f1a6e12bb7153 (patch)
treecc8da59ca23170007072aa90f7f753669b3bf9c1
parentaf568d1c926b680f35277e92056eb396fb14f6b6 (diff)
downloadheat-83f0ae1590c1951479fda598426f1a6e12bb7153.tar.gz
Move generic resources to properties schema
Not all resources in generic_resources file on properties schema. Use properties.Schema instead of dictionary. Change-Id: I558b33c304f38a5819b7b54c780181430ee7b1be
-rw-r--r--heat/tests/generic_resource.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/heat/tests/generic_resource.py b/heat/tests/generic_resource.py
index 598b3eb1b..456e67dab 100644
--- a/heat/tests/generic_resource.py
+++ b/heat/tests/generic_resource.py
@@ -59,10 +59,11 @@ class GenericResource(resource.Resource):
class ResWithComplexPropsAndAttrs(GenericResource):
- properties_schema = {'a_string': {'Type': 'String'},
- 'a_list': {'Type': 'List'},
- 'a_map': {'Type': 'Map'},
- 'an_int': {'Type': 'Integer'}}
+ properties_schema = {
+ 'a_string': properties.Schema(properties.Schema.STRING),
+ 'a_list': properties.Schema(properties.Schema.LIST),
+ 'a_map': properties.Schema(properties.Schema.MAP),
+ 'an_int': properties.Schema(properties.Schema.INTEGER)}
attributes_schema = {'list': attributes.Schema('A list'),
'map': attributes.Schema('A map'),
@@ -77,8 +78,9 @@ class ResWithComplexPropsAndAttrs(GenericResource):
class ResourceWithProps(GenericResource):
- properties_schema = {'Foo': {'Type': 'String'},
- 'FooInt': {'Type': 'Integer'}}
+ properties_schema = {
+ 'Foo': properties.Schema(properties.Schema.STRING),
+ 'FooInt': properties.Schema(properties.Schema.INTEGER)}
class ResourceWithPropsAndAttrs(ResourceWithProps):
@@ -86,7 +88,7 @@ class ResourceWithPropsAndAttrs(ResourceWithProps):
class ResourceWithResourceID(GenericResource):
- properties_schema = {'ID': {'Type': 'String'}}
+ properties_schema = {'ID': properties.Schema(properties.Schema.STRING)}
def handle_create(self):
super(ResourceWithResourceID, self).handle_create()
@@ -125,8 +127,8 @@ class ResourceWithComplexAttributes(GenericResource):
class ResourceWithRequiredProps(GenericResource):
- properties_schema = {'Foo': {'Type': 'String',
- 'Required': True}}
+ properties_schema = {'Foo': properties.Schema(properties.Schema.STRING,
+ required=True)}
class SignalResource(signal_responder.SignalResponder):