def testTargetHostUUIDConfig(self): hostname, network, vdi = testsetup.setup_host_and_network(templates=1, vdi_mb=10) if self.REMOVE_TEMPLATE: #Remove the TVM template to catch errors that would occur on first run (when the template doesn't exist) testsetup.remove_tvm_template(hostname) host_uuid = get_host_uuids(hostname) transfer_mode=self.TRANSFER_MODE asyncexpose = ExposeThread(hostname, network, vdi, transfer_mode=transfer_mode, target_host_uuid=host_uuid) asyncexpose.start() while asyncexpose.isAlive(): time.sleep(1) record = transferclient.get_record(hostname, vdi_uuid=vdi) logging.debug(record) transferclient.unexpose(hostname, vdi_uuid=vdi) testsetup.clean_host(hostname)
def clean_up(): hostname = testsetup.HOST testsetup.clean_host(hostname)