We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b14411 commit 3410d57Copy full SHA for 3410d57
lib/vdi.py
@@ -47,6 +47,13 @@ def clone(self):
47
def readonly(self) -> bool:
48
return strtobool(self.param_get("read-only"))
49
50
+ def size(self) -> int:
51
+ return int(self.param_get("virtual-size"))
52
+
53
+ def resize(self, new_size: int) -> None:
54
+ logging.info(f"Resizing VDI {self.uuid} to {new_size}")
55
+ self.sr.pool.master.xe("vdi-resize", {"uuid": self.uuid, "disk-size": str(new_size)})
56
57
def __str__(self):
58
return f"VDI {self.uuid} on SR {self.sr.uuid}"
59
0 commit comments