Created first disk

This commit is contained in:
2023-10-26 11:43:05 +02:00
parent 081b0f7784
commit bdb2f6427d
14 changed files with 393 additions and 25 deletions

View File

@ -17,6 +17,18 @@ export type VMState =
| "PowerManagementSuspended"
| "Other";
export type DiskAllocType = "Sparse" | "Fixed";
export interface VMDisk {
size: number;
name: string;
alloc_type: DiskAllocType;
delete: boolean;
// application attribute
new?: boolean;
}
interface VMInfoInterface {
name: string;
uuid?: string;
@ -28,6 +40,7 @@ interface VMInfoInterface {
memory: number;
vnc_access: boolean;
iso_file?: string;
disks: VMDisk[];
}
export class VMInfo implements VMInfoInterface {
@ -41,6 +54,7 @@ export class VMInfo implements VMInfoInterface {
memory: number;
vnc_access: boolean;
iso_file?: string;
disks: VMDisk[];
constructor(int: VMInfoInterface) {
this.name = int.name;
@ -53,6 +67,7 @@ export class VMInfo implements VMInfoInterface {
this.memory = int.memory;
this.vnc_access = int.vnc_access;
this.iso_file = int.iso_file;
this.disks = int.disks;
}
static NewEmpty(): VMInfo {
@ -62,6 +77,7 @@ export class VMInfo implements VMInfoInterface {
architecture: "x86_64",
memory: 1024,
vnc_access: true,
disks: [],
});
}