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
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 = []
}
# 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",
"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",