1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-03-27 06:50:25 +03:00

Added "purge" to delete vm from UDS on proxmox

This commit is contained in:
Adolfo Gómez García 2021-06-25 13:51:24 +02:00
parent 109783a430
commit 906901753e

View File

@ -198,7 +198,7 @@ class ProxmoxClient:
)
logger.debug(
'DELETE result to %s: %s -- %s', path, result.status_code, result.content
'DELETE result to %s: %s -- %s -- %s', path, result.status_code, result.content, result.headers
)
return ProxmoxClient.checkError(result)
@ -390,7 +390,7 @@ class ProxmoxClient:
self, vmId: int, node: typing.Optional[str] = None, purge: bool = True
) -> types.UPID:
node = node or self.getVmInfo(vmId).node
return types.UPID.fromDict(self._delete('nodes/{}/qemu/{}'.format(node, vmId)))
return types.UPID.fromDict(self._delete('nodes/{}/qemu/{}?purge=1'.format(node, vmId)))
@ensureConected
def getTask(self, node: str, upid: str) -> types.TaskStatus: