2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Fix proxmox power reporting while off

This commit is contained in:
Jarrod Johnson
2025-04-28 19:09:56 -04:00
parent 4c90d431b6
commit 797b5fc478

View File

@@ -137,7 +137,7 @@ class PmxApiClient:
if currstatus == 'running':
return 'on'
elif currstatus == 'stopped':
return off
return 'off'
raise Exception("Unknnown response to status query")
def set_vm_power(self, vm, state):
@@ -153,7 +153,6 @@ class PmxApiClient:
elif state == 'off':
state = 'stop'
rsp = self.wc.grab_json_response_with_status(f'/api2/json/nodes/{host}/{guest}/status/{state}', method='POST')
print(repr(rsp))
def set_vm_bootdev(self, vm, bootdev):
host, guest = self.get_vm(vm)