X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=NG-RO%2Fosm_ng_ro%2Fns.py;h=317579be59f2535951686e6b9020b27787e85b66;hb=da707570cd34a3102a8f3d6228a6cbe3210a4e83;hp=6cab53aa5d6c08bf6936d017435cee64e4288ce9;hpb=df48655ed39c3b5202289bcc84cd1618ce5464af;p=osm%2FRO.git diff --git a/NG-RO/osm_ng_ro/ns.py b/NG-RO/osm_ng_ro/ns.py index 6cab53aa..317579be 100644 --- a/NG-RO/osm_ng_ro/ns.py +++ b/NG-RO/osm_ng_ro/ns.py @@ -737,9 +737,11 @@ class Ns(object): # Pinning policy "ISOLATE" uses cores as host should not support SMT architecture # Pinning policy "PREFER" uses threads in case host supports SMT architecture numa[ - "cores" - if guest_epa_quota.get("cpu-thread-pinning-policy") == "ISOLATE" - else "threads" + ( + "cores" + if guest_epa_quota.get("cpu-thread-pinning-policy") == "ISOLATE" + else "threads" + ) ] = max(vcpu_count, 1) local_epa_vcpu_set = True @@ -1999,7 +2001,11 @@ class Ns(object): net_item["model"] = interface.get("type") if interface.get("ip-address"): - net_item["ip_address"] = interface["ip-address"] + dual_ip = interface.get("ip-address").split(";") + if len(dual_ip) == 2: + net_item["ip_address"] = dual_ip + else: + net_item["ip_address"] = interface["ip-address"] if interface.get("mac-address"): net_item["mac_address"] = interface["mac-address"] @@ -3393,9 +3399,9 @@ class Ns(object): return_data = { "status": global_status, - "details": ". ".join(details) - if details - else "progress {}/{}".format(done, total), + "details": ( + ". ".join(details) if details else "progress {}/{}".format(done, total) + ), "nsr_id": nsr_id, "action_id": action_id, "tasks": task_list,