X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=NG-RO%2Fosm_ng_ro%2Fns.py;h=aa1040d782c511a5b1ac7a928f530ff3f26e4778;hb=refs%2Ftags%2Fv9.0.0rc1;hp=a9c5ec0a894c231af940147767fde4fe265698d3;hpb=70eeb18e4fcbb8bc3c81c88f270b59966ae4d463;p=osm%2FRO.git diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index a9c5ec0a..aa1040d7 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -413,10 +413,8 @@ class Ns(object): flavor_data = { "disk": int(target_flavor["storage-gb"]), - # "ram": max(int(target_flavor["memory-mb"]) // 1024, 1), - # ^ TODO manage at vim_connectors MB instead of GB "ram": int(target_flavor["memory-mb"]), - "vcpus": target_flavor["vcpu-count"], + "vcpus": int(target_flavor["vcpu-count"]), } numa = {} extended = {} @@ -550,8 +548,12 @@ class Ns(object): for iface_index, interface in enumerate(target_vdu["interfaces"]): if interface.get("ns-vld-id"): net_text = ns_preffix + ":vld." + interface["ns-vld-id"] - else: + elif interface.get("vnf-vld-id"): net_text = vnf_preffix + ":vld." + interface["vnf-vld-id"] + else: + self.logger.error("Interface {} from vdu {} not connected to any vld".format( + iface_index, target_vdu["vdu-name"])) + continue # interface not connected to any vld extra_dict["depends_on"].append(net_text) net_item = {x: v for x, v in interface.items() if x in ("name", "vpci", "port_security", "port_security_disable_strategy", "floating_ip")}