nsr_descriptor["vld"] = []
for nsd_vld in nsd.get("vld"):
nsr_descriptor["vld"].append(
- {key: nsd_vld[key] for key in ("id", "vim-network-name") if key in nsd_vld})
+ {key: nsd_vld[key] for key in ("id", "vim-network-name", "vim-network-id") if key in nsd_vld})
# Create VNFR
needed_vnfds = {}
vnfr_descriptor["vld"] = []
for vnfd_vld in vnfd.get("internal-vld"):
vnfr_descriptor["vld"].append(
- {key: vnfd_vld[key] for key in ("id", "vim-network-name") if key in vnfd_vld})
+ {key: vnfd_vld[key] for key in ("id", "vim-network-name", "vim-network-id") if key in
+ vnfd_vld})
vnfd_mgmt_cp = vnfd["mgmt-interface"].get("cp")
for cp in vnfd.get("connection-point", ()):
if vdur_interface.get("mgmt-vnf"):
vnfr_update_rollback["ip-address"] = vnfr.get("ip-address")
vnfr_update["ip-address"] = pdu_interface["ip-address"]
- if pdu_interface.get("vim-network-name"): # or pdu_interface.get("vim-network-id"):
+ if pdu_interface.get("vim-network-name") or pdu_interface.get("vim-network-id"):
ifaces_forcing_vim_network.append({
- # "vim-network-id": pdu_interface.get("vim-network-id"),
- "vim-network-name": pdu_interface.get("vim-network-name"),
"name": vdur_interface.get("vnf-vld-id") or vdur_interface.get("ns-vld-id"),
"vnf-vld-id": vdur_interface.get("vnf-vld-id"),
"ns-vld-id": vdur_interface.get("ns-vld-id")})
+ if pdu_interface.get("vim-network-id"):
+ ifaces_forcing_vim_network.append({
+ "vim-network-id": pdu_interface.get("vim-network-id")})
+ if pdu_interface.get("vim-network-name"):
+ ifaces_forcing_vim_network.append({
+ "vim-network-name": pdu_interface.get("vim-network-name")})
break
return ifaces_forcing_vim_network
# Adding vim-network-name defined by the user to vld
if instantiation_parameters.get("netslice-vld"):
for ins_param in instantiation_parameters["netslice-vld"]:
- if ins_param["name"] == netslice_vlds["name"] and ins_param.get("vim-network-name"):
+ if ins_param["name"] == netslice_vlds["name"]:
+ if ins_param.get("vim-network-name"):
nsi_vld["vim-network-name"] = ins_param.get("vim-network-name")
+ if ins_param.get("vim-network-id"):
+ nsi_vld["vim-network-id"] = ins_param.get("vim-network-id")
nsi_vlds.append(nsi_vld)
nsi_descriptor["_admin"]["netslice-vld"] = nsi_vlds
"properties": {
"name": name_schema,
"vim-network-name": name_schema,
+ "vim-network-id": name_schema,
"ip-profile": ip_profile_update_schema,
"internal-connection-point": {
"type": "array",
"properties": {
"name": string_schema,
"vim-network-name": {"OneOf": [string_schema, object_schema]},
+ "vim-network-id": {"OneOf": [string_schema, object_schema]},
"ip-profile": object_schema,
"vnfd-connection-point-ref": {
"type": "array",
# TODO, add user, password, ssh-key
"mac-address": mac_schema,
"vim-network-name": nameshort_schema, # interface is connected to one vim network, or switch port
- # TODO "vim-network-id": nameshort_schema,
+ "vim-network-id": nameshort_schema,
# # provide this in case SDN assist must deal with this interface
# "switch-dpid": dpid_Schema,
# "switch-port": nameshort_schema,
"properties": {
"name": string_schema,
"vim-network-name": {"OneOf": [string_schema, object_schema]},
+ "vim-network-id": {"OneOf": [string_schema, object_schema]},
"ip-profile": object_schema,
},
"required": ["name"],