Change of Additional Properties on LCM operation

Modified additional properties on LCM operation in order to
change "don't care" setting on validating unsupported attribute.

Change-Id: I87abdb9147a0a8824c8fb1fd457f578398061a2c
changes/30/751230/13
Koichi Edagawa 2 years ago committed by Aldinson C. Esto
parent 3213241570
commit 0db10beb6c
  1. 34
      tacker/api/schemas/vnf_lcm.py
  2. 8
      tacker/api/schemas/vnf_packages.py
  3. 5
      tacker/tests/unit/vnflcm/test_controller.py

@ -32,7 +32,7 @@ _extManagedVirtualLinkData = {
'vimConnectionId': parameter_types.identifier
},
'required': ['id', 'vnfVirtualLinkDescId', 'resourceId'],
'additionalProperties': False,
'additionalProperties': True,
},
}
@ -63,7 +63,7 @@ _ipaddresses = {
}
},
'required': ['type', 'fixedAddresses'],
'additionalProperties': False
'additionalProperties': True
}
}
@ -77,7 +77,7 @@ _ipOverEthernetAddressData = {
{'required': ['macAddress']},
{'required': ['ipAddresses']}
],
'additionalProperties': False
'additionalProperties': True
}
_cpProtocolData = {
@ -91,7 +91,7 @@ _cpProtocolData = {
'ipOverEthernet': _ipOverEthernetAddressData,
},
'required': ['layerProtocol'],
'additionalProperties': False,
'additionalProperties': True,
}
}
@ -104,7 +104,7 @@ _vnfExtCpConfig = {
'linkPortId': parameter_types.identifier,
'cpProtocolData': _cpProtocolData,
},
'additionalProperties': False,
'additionalProperties': True,
}
}
@ -117,7 +117,7 @@ _vnfExtCpData = {
'cpConfig': _vnfExtCpConfig,
},
'required': ['cpdId', 'cpConfig'],
'additionalProperties': False,
'additionalProperties': True,
},
}
@ -129,7 +129,7 @@ _resourceHandle = {
'vimLevelResourceType': {'type': 'string', 'maxLength': 255},
},
'required': ['resourceId'],
'additionalProperties': False,
'additionalProperties': True,
}
_extLinkPortData = {
@ -141,7 +141,7 @@ _extLinkPortData = {
'resourceHandle': _resourceHandle,
},
'required': ['id', 'resourceHandle'],
'additionalProperties': False,
'additionalProperties': True,
}
}
@ -158,7 +158,7 @@ _extVirtualLinkData = {
},
'required': ['id', 'resourceId', 'extCps'],
'additionalProperties': False,
'additionalProperties': True,
}
}
@ -174,7 +174,7 @@ _vimConnectionInfo = {
'accessInfo': parameter_types.keyvalue_pairs,
},
'required': ['id', 'vimType'],
'additionalProperties': False,
'additionalProperties': True,
}
}
@ -187,7 +187,7 @@ create = {
'metadata': parameter_types.keyvalue_pairs,
},
'required': ['vnfdId'],
'additionalProperties': False,
'additionalProperties': True,
}
instantiate = {
@ -201,7 +201,7 @@ instantiate = {
'additionalParams': parameter_types.keyvalue_pairs,
},
'required': ['flavourId'],
'additionalProperties': False,
'additionalProperties': True,
}
terminate = {
@ -213,7 +213,7 @@ terminate = {
'additionalParams': parameter_types.keyvalue_pairs,
},
'required': ['terminationType'],
'additionalProperties': False,
'additionalProperties': True,
}
heal = {
@ -229,7 +229,7 @@ heal = {
}
},
'additionalProperties': False,
'additionalProperties': True,
}
register_subscription = {
@ -240,7 +240,7 @@ register_subscription = {
'authentication': parameter_types.keyvalue_pairs,
},
'required': ['callbackUri'],
'additionalProperties': False,
'additionalProperties': True,
}
update = {
@ -253,7 +253,7 @@ update = {
'metadata': parameter_types.keyvalue_pairs,
'vimConnectionInfo': _vimConnectionInfo,
},
'additionalProperties': False,
'additionalProperties': True,
}
scale = {
@ -266,5 +266,5 @@ scale = {
'additionalParams': parameter_types.keyvalue_pairs
},
'required': ['type', 'aspectId'],
'additionalProperties': False,
'additionalProperties': True,
}

@ -26,7 +26,7 @@ create = {
'properties': {
'userDefinedData': parameter_types.keyvalue_pairs
},
'additionalProperties': False,
'additionalProperties': True,
}
upload_from_uri = {
@ -47,7 +47,7 @@ upload_from_uri = {
},
'required': ['addressInformation'],
'additionalProperties': False,
'additionalProperties': True,
}
"""
@ -65,7 +65,7 @@ patch = {
},
'anyOf': [{'required': ['operationalState']},
{'required': ['userDefinedData']}],
'additionalProperties': False
'additionalProperties': True
}
query_params_v1 = {
@ -77,5 +77,5 @@ query_params_v1 = {
'all_fields': {'format': 'all_fields'},
'exclude_default': {'format': 'exclude_default'},
},
'additionalProperties': False,
'additionalProperties': True,
}

@ -1086,10 +1086,7 @@ class TestController(base.TestCase):
# Call Instantiate API
resp = req.get_response(self.app)
self.assertEqual(http_client.BAD_REQUEST, resp.status_code)
self.assertEqual("Additional properties are not allowed "
"('additional_property' was unexpected)",
resp.json['badRequest']['message'])
self.assertEqual(http_client.INTERNAL_SERVER_ERROR, resp.status_code)
@mock.patch.object(TackerManager, 'get_service_plugins',
return_value={'VNFM':

Loading…
Cancel
Save