From: tierno Date: Fri, 22 Mar 2019 13:27:12 +0000 (+0000) Subject: fix additionalParamsNs/Vnf for the slice X-Git-Tag: v6.0.0~56 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F56%2F7356%2F1;p=osm%2FNBI.git fix additionalParamsNs/Vnf for the slice Change-Id: I54906fc74ed798099815cc7a9165839039ea8eca Signed-off-by: tierno --- diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index 7ad252f..8b18f0f 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -1015,13 +1015,6 @@ class NsiTopic(BaseTopic): indata_ns["vimAccountId"] = slice_request.get("vimAccountId") indata_ns["nsDescription"] = service["description"] indata_ns["key-pair-ref"] = None - for additional_params_subnet in get_iterable(slice_request.get("additionalParamsForSubnet")): - if additional_params_subnet["id"] == service["id"]: - if additional_params_subnet.get("additionalParamsForNs"): - indata_ns["additionalParamsForNs"] = additional_params_subnet["additionalParamsForNs"] - if additional_params_subnet.get("additionalParamsForVnf"): - indata_ns["additionalParamsForVnf"] = additional_params_subnet["additionalParamsForVnf"] - break # NsrTopic(rollback, session, indata_ns, kwargs, headers, force) # Overwriting ns_params filtering by nsName == netslice-subnet.id @@ -1032,7 +1025,8 @@ class NsiTopic(BaseTopic): copy_ns_param = deepcopy(ns_param) del copy_ns_param["id"] indata_ns.update(copy_ns_param) - # TODO: Improve network selection via networkID + break + # Override the instantiation parameters for netslice-vld provided by user if nsi_vlds: indata_ns_list = [] diff --git a/osm_nbi/nbi.py b/osm_nbi/nbi.py index 0417c9e..a9e2b24 100644 --- a/osm_nbi/nbi.py +++ b/osm_nbi/nbi.py @@ -94,7 +94,7 @@ URL: /osm GET POST / 5 X /pdu/v1 - /pdu_descriptor O O + /pdu_descriptors O O / O O O O /admin/v1 diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py index 1dd70dc..7707a75 100644 --- a/osm_nbi/validation.py +++ b/osm_nbi/validation.py @@ -638,26 +638,10 @@ nbi_edit_input_schemas = { } # NETSLICE SCHEMAS -nsi_slice_instantiate = deepcopy(ns_instantiate) -nsi_slice_instantiate["title"] = "netslice subnet instantiation params input schema" -nsi_slice_instantiate["properties"]["id"] = name_schema -nsi_slice_instantiate["properties"]["additionalParamsForNsi"] = object_schema -nsi_slice_instantiate["properties"]["additionalParamsForSubnet"] = { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": name_schema, - "additionalParamsForNs": object_schema, - "additionalParamsForVnf": additional_params_for_vnf - }, - "required": ["id"], - "additionalProperties": False - } -} -del nsi_slice_instantiate["required"] -del nsi_slice_instantiate["properties"]["additionalParamsForNs"] -del nsi_slice_instantiate["properties"]["additionalParamsForVnf"] +nsi_subnet_instantiate = deepcopy(ns_instantiate) +nsi_subnet_instantiate["title"] = "netslice subnet instantiation params input schema" +nsi_subnet_instantiate["properties"]["id"] = name_schema +del nsi_subnet_instantiate["required"] nsi_vld_instantiate = { "title": "netslice vld instantiation params input schema", @@ -686,10 +670,11 @@ nsi_instantiate = { "vimAccountId": id_schema, "ssh_keys": {"type": "string"}, "nsi_id": id_schema, + "additionalParamsForNsi": object_schema, "netslice-subnet": { "type": "array", "minItems": 1, - "items": nsi_slice_instantiate + "items": nsi_subnet_instantiate }, "netslice-vld": { "type": "array",