X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fvimconn_vmware.py;h=4a5ab972415bfd92c61341a42d1b9b75c1cee6e3;hb=0ea9b0f0cbd4c5567289c4c80c73de94901d7047;hp=96ea181288bf13019c86044a300ec90fb4921a09;hpb=e21c9ccf74e8a343f4e33658a1385af96a19957e;p=osm%2FRO.git diff --git a/osm_ro/vimconn_vmware.py b/osm_ro/vimconn_vmware.py index 96ea1812..4a5ab972 100644 --- a/osm_ro/vimconn_vmware.py +++ b/osm_ro/vimconn_vmware.py @@ -1917,6 +1917,7 @@ class vimconnector(vimconn.vimconnector): self.connect_vapp_to_org_vdc_network(vapp_id, nets[0].get('name')) type_list = ('PF', 'PCI-PASSTHROUGH', 'VFnotShared') + nic_type = 'VMXNET3' if 'type' in net and net['type'] not in type_list: # fetching nic type from vnf if 'model' in net: @@ -1936,7 +1937,6 @@ 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'), @@ -2610,13 +2610,12 @@ class vimconnector(vimconn.vimconnector): try: vapp_name = self.get_namebyvappid(vm__vim_uuid) - vapp_resource = vdc_obj.get_vapp(vapp_name) - vapp = VApp(self.client, resource=vapp_resource) if vapp_name is None: self.logger.debug("delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid)) return -1, "delete_vminstance(): Failed to get vm by given {} vm uuid".format(vm__vim_uuid) - else: - self.logger.info("Deleting vApp {} and UUID {}".format(vapp_name, vm__vim_uuid)) + self.logger.info("Deleting vApp {} and UUID {}".format(vapp_name, vm__vim_uuid)) + vapp_resource = vdc_obj.get_vapp(vapp_name) + vapp = VApp(self.client, resource=vapp_resource) # Delete vApp and wait for status change if task executed and vApp is None. @@ -3696,7 +3695,7 @@ class vimconnector(vimconn.vimconnector): #Creating all networks as Direct Org VDC type networks. #Unused in case of Underlay (data/ptp) network interface. - fence_mode="bridged" + fence_mode="isolated" is_inherited='false' dns_list = dns_address.split(";") dns1 = dns_list[0] @@ -3721,13 +3720,12 @@ class vimconnector(vimconn.vimconnector): - - {10:s} + {9:s} - {11:s} + {10:s} """.format(escape(network_name), is_inherited, gateway_address, subnet_address, dns1, dns2_text, dhcp_enabled, - dhcp_start_address, dhcp_end_address, available_networks, + dhcp_start_address, dhcp_end_address, fence_mode, isshared) headers['Content-Type'] = 'application/vnd.vmware.vcloud.orgVdcNetwork+xml'