From d8f16acd8a95a1554601c639f954027e4c83854f Mon Sep 17 00:00:00 2001 From: Pooja Singla Date: Wed, 15 Jun 2022 08:36:12 +0000 Subject: [PATCH] Implemented number format in additional params Number format value was giving error when passed in additional param section of instantiation json file. Added number type in keyvalue_pairs in parameter_types.py. Closes-Bug: #1978563 Change-Id: I4d87615ff106abf0e59ef45f0ff322d75fea0038 --- tacker/api/validation/parameter_types.py | 3 ++- tacker/tests/unit/vnflcm/test_controller.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tacker/api/validation/parameter_types.py b/tacker/api/validation/parameter_types.py index 42481385b..8a28bdab2 100644 --- a/tacker/api/validation/parameter_types.py +++ b/tacker/api/validation/parameter_types.py @@ -123,7 +123,8 @@ keyvalue_pairs = { {'type': 'string', 'maxLength': 1024}, {'type': 'object'}, {'type': 'null'}, - {'type': 'boolean'} + {'type': 'boolean'}, + {'type': 'number'} ] } }, diff --git a/tacker/tests/unit/vnflcm/test_controller.py b/tacker/tests/unit/vnflcm/test_controller.py index 9a4833c22..1a73e7f7d 100644 --- a/tacker/tests/unit/vnflcm/test_controller.py +++ b/tacker/tests/unit/vnflcm/test_controller.py @@ -596,6 +596,7 @@ class TestController(base.TestCase): status='INACTIVE') body = {"flavourId": "simple"} + body.update({"additionalParams": {"foo_number": 12}}) req = fake_request.HTTPRequest.blank( '/vnf_instances/%s/instantiate' % uuidsentinel.vnf_instance_id) req.body = jsonutils.dump_as_bytes(body)