statuf on load fixed?
This commit is contained in:
@@ -97,6 +97,9 @@ class ProxmoxAbstractModel(BaseModel, TaskAwareModelMixin):
|
||||
return self.write(**params)
|
||||
else:
|
||||
return params
|
||||
@property
|
||||
def vmstatus(self):
|
||||
raise NotImplemented('vmstatus not implemented')
|
||||
|
||||
|
||||
class Lxc(ProxmoxAbstractModel):
|
||||
@@ -123,6 +126,13 @@ class Lxc(ProxmoxAbstractModel):
|
||||
'rootfs': ('size', 'disksize', lambda x: int(no_int_re.sub('', x) or 0)),
|
||||
}
|
||||
|
||||
@property
|
||||
def synced_status(self):
|
||||
with Proxmox() as pm:
|
||||
if statusresponse := pm.lxc_get(f'{self.vmid}/status/current'):
|
||||
self.write(status=statusresponse['status'])
|
||||
return self.status
|
||||
|
||||
@property
|
||||
def proxmox_console_url(self):
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user