def export_ovf(self):
<EOL>soap_cookie = self.vcenter_conn._stub.cookie<EOL>cookies = break_down_cookie(soap_cookie)<EOL>headers = {'<STR_LIT>': '<STR_LIT>'}  <EOL>http_nfc_lease = self.vm_obj.ExportVm()<EOL>lease_updater = LeaseProgressUpdater(http_nfc_lease, <NUM_LIT:30>)<EOL>lease_updater.start()<EOL>ovf_files = list()<EOL>total_bytes_written = <NUM_LIT:0><EOL>total_bytes_to_write = self.vm_obj.summary.storage.unshared<EOL>while True:<EOL><INDENT>if http_nfc_lease.state == vim.HttpNfcLease.State.ready:<EOL><INDENT>print('<STR_LIT>')<EOL>print_http_nfc_lease_info(http_nfc_lease.info)<EOL>for deviceUrl in http_nfc_lease.info.deviceUrl:<EOL><INDENT>if not deviceUrl.targetId:<EOL><INDENT>continue<EOL><DEDENT>temp_target_disk = os.path.join(self.vm_dl_path,<EOL>self.name)<EOL>temp_target_disk += "<STR_LIT>"<EOL>print('<STR_LIT>'.format(deviceUrl.url,<EOL>temp_target_disk))<EOL>current_bytes_written = download_device(<EOL>headers=headers, cookies=cookies,<EOL>temp_target_disk=temp_target_disk,<EOL>device_url=deviceUrl.url,<EOL>lease_updater=lease_updater,<EOL>total_bytes_written=total_bytes_written,<EOL>total_bytes_to_write=total_bytes_to_write)<EOL>total_bytes_written += current_bytes_written<EOL>print('<STR_LIT>'.format(temp_target_disk))<EOL>ovf_file = vim.OvfManager.OvfFile()<EOL>ovf_file.deviceId = deviceUrl.key<EOL>ovf_file.path = deviceUrl.targetId<EOL>ovf_file.size = current_bytes_written<EOL>ovf_files.append(ovf_file)<EOL><DEDENT>break<EOL><DEDENT>elif http_nfc_lease.state == vim.HttpNfcLease.State.initializing:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>elif http_nfc_lease.state == vim.HttpNfcLease.State.error:<EOL><INDENT>raise Exception("<STR_LIT>".format(<EOL>http_nfc_lease.state.error))<EOL><DEDENT>sleep(<NUM_LIT:2>)<EOL>self.write_ovf_descriptor(ovf_files)<EOL>http_nfc_lease.HttpNfcLeaseProgress(<NUM_LIT:100>)<EOL>http_nfc_lease.HttpNfcLeaseComplete()<EOL>lease_updater.stop()<EOL><DEDENT>print('<STR_LIT>'.format(temp_target_disk))<EOL>return temp_target_disk<EOL>
Exports OVf of currently iterated VM (dictated by api.env.hosts)
:return: ovf location