X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=RO-VIM-vmware%2Fosm_rovim_vmware%2Fvimconn_vmware.py;h=68527470df41016542c7127078020ff705f06f23;hb=refs%2Fchanges%2F47%2F14147%2F1;hp=e06b2f91b4ea0adbc1d041ce93571c8e08d48f57;hpb=e634e9ea8027a9b12d6c983305a997a8c4d81e19;p=osm%2FRO.git diff --git a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py index e06b2f91..68527470 100644 --- a/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py +++ b/RO-VIM-vmware/osm_rovim_vmware/vimconn_vmware.py @@ -936,7 +936,8 @@ class vimconnector(vimconn.VimConnector): def get_network(self, net_id): """Method obtains network details of net_id VIM network - Return a dict with the fields at filter_dict (see get_network_list) plus some VIM specific>}, ...]""" + Return a dict with the fields at filter_dict (see get_network_list) plus some VIM specific>}, ...] + """ try: _, vdc = self.get_vdc_details() vdc_id = vdc.get("id").split(":")[3] @@ -5450,18 +5451,18 @@ class vimconnector(vimconn.VimConnector): return None if add_vdc_rest_url is not None and provider_vdc_ref is not None: - data = """ {1:s} - ReservationPool - MHz20482048 - MB20482048 - 0100 - trueMB20480true - - true""".format( - escape(vdc_name), escape(vdc_name), provider_vdc_ref - ) + data = ( + ' ' + "{1:s}" + "ReservationPool" + "MHz20482048" + "MB20482048" + "0100" + "trueMB20480" + "true" + '' + "true" + ).format(escape(vdc_name), escape(vdc_name), provider_vdc_ref) headers[ "Content-Type" ] = "application/vnd.vmware.admin.createVdcParams+xml" @@ -6329,7 +6330,7 @@ class vimconnector(vimconn.VimConnector): ].spec.ip.ipAddress for device in vm_obj.config.hardware.device: - if type(device) == vim.vm.device.VirtualPCIPassthrough: + if device.isinstance(vim.vm.device.VirtualPCIPassthrough): device_details = { "devide_id": device.backing.id, "pciSlotNumber": device.slotInfo.pciSlotNumber,