diff options
author | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2015-08-17 20:19:22 +0300 |
---|---|---|
committer | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2015-08-18 12:50:33 +0300 |
commit | 7d828bbd1a32841be2f7f08134d99955d0a4f999 (patch) | |
tree | f124f5b901cf14cbd55c7e7dbbc57bb826593fdf /heat | |
parent | a21614438c9ac4b0db05268c7f580f40bfaac264 (diff) | |
download | heat-7d828bbd1a32841be2f7f08134d99955d0a4f999.tar.gz |
Order type property should be required
Actually barbican (at least at client level) needs this property
to be defined.
Change-Id: I0b40dd5db48923f8a24661959a2b176b20ee3b37
Closes-Bug: #1485935
Diffstat (limited to 'heat')
-rw-r--r-- | heat/engine/resources/openstack/barbican/order.py | 1 | ||||
-rw-r--r-- | heat/tests/barbican/test_order.py | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/heat/engine/resources/openstack/barbican/order.py b/heat/engine/resources/openstack/barbican/order.py index 93e6e57aa..dd34929f3 100644 --- a/heat/engine/resources/openstack/barbican/order.py +++ b/heat/engine/resources/openstack/barbican/order.py @@ -85,6 +85,7 @@ class Order(resource.Resource): 'key', 'asymmetric', 'certificate' ]), ], + required=True, support_status=support.SupportStatus(version='5.0.0'), ), REQUEST_TYPE: properties.Schema( diff --git a/heat/tests/barbican/test_order.py b/heat/tests/barbican/test_order.py index c37fd4d5d..da9441f00 100644 --- a/heat/tests/barbican/test_order.py +++ b/heat/tests/barbican/test_order.py @@ -11,6 +11,8 @@ # License for the specific language governing permissions and limitations # under the License. +import copy + import mock import six @@ -33,6 +35,7 @@ resources: algorithm: aes bit_length: 256 mode: cbc + type: key ''' @@ -83,6 +86,15 @@ class TestOrder(common.HeatTestCase): self.assertEqual('cbc', args['mode']) self.assertEqual(256, args['bit_length']) + def test_create_order_without_type_fail(self): + snippet = copy.deepcopy(self.res_template) + del snippet['Properties']['type'] + self.assertRaisesRegexp(exception.ResourceFailure, + 'Property type not assigned', + self._create_resource, + 'foo', + snippet, self.stack) + def test_attributes(self): mock_order = mock.Mock() mock_order.status = 'test-status' |