From: Ravi Chamarty Date: Fri, 26 Oct 2018 13:47:14 +0000 (+0000) Subject: Fix VCD VIMconn when model_type is not present for SR-IOV, use net['type'] X-Git-Tag: v5.0.0~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=5063a98e91afdbd9478566f24a0f40ab9acd0660;hp=b0ab2c088608015a68fb0332da927f07a73450a4;p=osm%2FRO.git Fix VCD VIMconn when model_type is not present for SR-IOV, use net['type'] Change-Id: I865ccf6b77713f596defeacec3b6cfb17655a5ff Signed-off-by: Ravi Chamarty --- diff --git a/osm_ro/vimconn_vmware.py b/osm_ro/vimconn_vmware.py index 20ff8227..30c9908e 100644 --- a/osm_ro/vimconn_vmware.py +++ b/osm_ro/vimconn_vmware.py @@ -1938,10 +1938,14 @@ class vimconnector(vimconn.vimconnector): else: self.logger.info("new_vminstance(): adding network adapter "\ "to a network {}".format(nets[0].get('name'))) + nic_type = 'VMXNET3' + if net['type'] in ['SR-IOV', 'VF']: + nic_type = net['type'] self.add_network_adapter_to_vms(vapp, nets[0].get('name'), primary_nic_index, nicIndex, - net) + net, + nic_type=nic_type) nicIndex += 1 # cloud-init for ssh-key injection