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"):
"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"}
},
"mac": mac_schema
},
"required": ["port"]
-}
\ No newline at end of file
+}
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"]
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']