Added support of PARAVIRT interface type following IM change 6688 65/6765/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Thu, 25 Oct 2018 16:33:19 +0000 (18:33 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 26 Oct 2018 09:48:47 +0000 (11:48 +0200)
Change-Id: If6d9d486c2a78b55e6c1218b6292896b0707ca78
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_ro/nfvo.py
osm_ro/openmano_schemas.py
osm_ro/vimconn_openvim.py
osm_ro/vimconn_vmware.py

index c956f95..f4a2d79 100644 (file)
@@ -1072,7 +1072,7 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor):
 
                     if iface.get("virtual-interface").get("type") == "OM-MGMT":
                         db_interface["type"] = "mgmt"
-                    elif iface.get("virtual-interface").get("type") in ("VIRTIO", "E1000"):
+                    elif iface.get("virtual-interface").get("type") in ("VIRTIO", "E1000", "PARAVIRT"):
                         db_interface["type"] = "bridge"
                         db_interface["model"] = get_str(iface.get("virtual-interface"), "type", 12)
                     elif iface.get("virtual-interface").get("type") in ("SR-IOV", "PCI-PASSTHROUGH"):
index 00a5b51..f717a4a 100644 (file)
@@ -465,7 +465,7 @@ bridge_interfaces_schema={
             "bandwidth":bandwidth_schema,
             "vpci":pci_schema,
             "mac_address": mac_schema,
-            "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139"]},
+            "model": {"type":"string", "enum":["virtio","e1000","ne2k_pci","pcnet","rtl8139", "paravirt"]},
             "port-security": {"type" : "boolean"},
             "floating-ip": {"type" : "boolean"}
         },
@@ -1220,4 +1220,4 @@ sdn_external_port_schema = {
         "mac": mac_schema
     },
     "required": ["port"]
-}
\ No newline at end of file
+}
index 34c1b8c..f6d2237 100644 (file)
@@ -846,7 +846,7 @@ class vimconnector(vimconn.vimconnector):
                 if net.get("vpci"):
                     net_dict["vpci"] = net["vpci"]
                 if net.get("model"):
-                    if net["model"] == "VIRTIO":
+                    if net["model"] == "VIRTIO" or net["model"] == "paravirt":
                         net_dict["model"] = "virtio"
                     else:
                         net_dict["model"] = net["model"]
index 169df3a..dd3bba5 100644 (file)
@@ -1917,8 +1917,9 @@ class vimconnector(vimconn.vimconnector):
                         if 'type' in net and net['type'] not in type_list:
                             # fetching nic type from vnf
                             if 'model' in net:
-                                if net['model'] is not None and net['model'].lower() == 'virtio':
-                                    nic_type = 'VMXNET3'
+                                if net['model'] is not None:
+                                    if net['model'].lower() == 'paravirt' or net['model'].lower() == 'virtio':
+                                        nic_type = 'VMXNET3'
                                 else:
                                     nic_type = net['model']