Changes to checkeddict for tuples and required
This commit is contained in:
parent
4c1adc193f
commit
84b6569ae6
|
@ -135,7 +135,9 @@ class Properties(CheckedDict):
|
|||
def validate(self):
|
||||
for key in self.data:
|
||||
# are there missing required Properties
|
||||
if 'Required' in self.data[key] and not 'Value' in self.data[key]:
|
||||
if 'Required' in self.data[key]:
|
||||
if self.data[key]['Required'] \
|
||||
and not 'Value' in self.data[key]:
|
||||
return {'Error': \
|
||||
'%s Property must be provided' % key}
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@ class SecurityGroup(Resource):
|
|||
'Required': True},
|
||||
'VpcId': {'Type': 'String',
|
||||
'Implemented': False},
|
||||
'SecurityGroupIngress': {'Type': 'CommaDelimitedList',
|
||||
'SecurityGroupIngress': {'Type': 'TuplesList',
|
||||
'Implemented': False},
|
||||
'SecurityGroupEgress': {'Type': 'CommaDelimitedList'}}
|
||||
'SecurityGroupEgress': {'Type': 'TuplesList'}}
|
||||
|
||||
def __init__(self, name, json_snippet, stack):
|
||||
super(SecurityGroup, self).__init__(name, json_snippet, stack)
|
||||
|
|
|
@ -28,7 +28,8 @@ class Volume(Resource):
|
|||
properties_schema = {'AvailabilityZone': {'Type': 'String',
|
||||
'Required': True},
|
||||
'Size': {'Type': 'Number'},
|
||||
'SnapshotId': {'Type': 'String'}}
|
||||
'SnapshotId': {'Type': 'String'},
|
||||
'Tags': {'Type': 'TuplesList'}}
|
||||
|
||||
def __init__(self, name, json_snippet, stack):
|
||||
super(Volume, self).__init__(name, json_snippet, stack)
|
||||
|
|
Loading…
Reference in New Issue