|
catch (error) console.error('Failed to poll task status:', error);
// Clean up after download await axios.delete(`/api/v1/download/cleanup/$taskId`);
if task.state == 'SUCCESS': file_path = task.result['file_path'] if os.path.exists(file_path): os.remove(file_path) return "message": "File cleaned up successfully"
def disconnect(self): """Close vCenter connection""" if self.connection: Disconnect(self.connection)
app = FastAPI(title="VMDK Download Service")
|
||||||||||||||||||||||||||
|
|
|
|
catch (error) console.error('Failed to poll task status:', error);
// Clean up after download await axios.delete(`/api/v1/download/cleanup/$taskId`); how to download vmdk file from datastore
if task.state == 'SUCCESS': file_path = task.result['file_path'] if os.path.exists(file_path): os.remove(file_path) return "message": "File cleaned up successfully" catch (error) console
def disconnect(self): """Close vCenter connection""" if self.connection: Disconnect(self.connection) how to download vmdk file from datastore
app = FastAPI(title="VMDK Download Service")