Fix bad resource schema for Volume
Change-Id: Id8faa530fc7cdd1f3fc287c033ed61aa87fd9807
This commit is contained in:
parent
d0c7a5e98e
commit
e8c0a7ed6b
|
@ -50,8 +50,8 @@ class Volume(resource.Resource):
|
||||||
'Tags': {
|
'Tags': {
|
||||||
'Type': 'List',
|
'Type': 'List',
|
||||||
'Description': _('The list of tags to associate '
|
'Description': _('The list of tags to associate '
|
||||||
'with the volume.')},
|
'with the volume.'),
|
||||||
'Schema': {'Type': 'Map', 'Schema': tags_schema},
|
'Schema': {'Type': 'Map', 'Schema': tags_schema}},
|
||||||
}
|
}
|
||||||
|
|
||||||
_restore_property = 'SnapshotId'
|
_restore_property = 'SnapshotId'
|
||||||
|
|
|
@ -232,6 +232,18 @@ class VolumeTest(HeatTestCase):
|
||||||
|
|
||||||
self.m.VerifyAll()
|
self.m.VerifyAll()
|
||||||
|
|
||||||
|
def test_volume_bad_tags(self):
|
||||||
|
t = template_format.parse(volume_template)
|
||||||
|
t['Resources']['DataVolume']['Properties']['Tags'] = [{'Foo': 'bar'}]
|
||||||
|
stack = utils.parse_stack(t, stack_name='test_volume_bad_tags_stack')
|
||||||
|
|
||||||
|
rsrc = vol.Volume('DataVolume',
|
||||||
|
t['Resources']['DataVolume'],
|
||||||
|
stack)
|
||||||
|
self.assertRaises(exception.StackValidationFailed, rsrc.validate)
|
||||||
|
|
||||||
|
self.m.VerifyAll()
|
||||||
|
|
||||||
def test_volume_attachment_error(self):
|
def test_volume_attachment_error(self):
|
||||||
fv = FakeVolume('creating', 'available')
|
fv = FakeVolume('creating', 'available')
|
||||||
fva = FakeVolume('attaching', 'error')
|
fva = FakeVolume('attaching', 'error')
|
||||||
|
|
Loading…
Reference in New Issue