Can create NAT networks

This commit is contained in:
2023-12-07 20:03:11 +01:00
parent 5f0f56a9f9
commit 54a3013c59
7 changed files with 210 additions and 12 deletions

View File

@ -30,6 +30,12 @@ export interface VMDisk {
deleteType?: "keepfile" | "deletefile";
}
export type VMNetInterface = VMNetUserspaceSLIRPStack;
export interface VMNetUserspaceSLIRPStack {
type: "UserspaceSLIRPStack";
}
interface VMInfoInterface {
name: string;
uuid?: string;
@ -43,6 +49,7 @@ interface VMInfoInterface {
vnc_access: boolean;
iso_file?: string;
disks: VMDisk[];
networks: VMNetInterface[];
}
export class VMInfo implements VMInfoInterface {
@ -58,6 +65,7 @@ export class VMInfo implements VMInfoInterface {
vnc_access: boolean;
iso_file?: string;
disks: VMDisk[];
networks: VMNetUserspaceSLIRPStack[];
constructor(int: VMInfoInterface) {
this.name = int.name;
@ -72,6 +80,7 @@ export class VMInfo implements VMInfoInterface {
this.vnc_access = int.vnc_access;
this.iso_file = int.iso_file;
this.disks = int.disks;
this.networks = int.networks;
}
static NewEmpty(): VMInfo {
@ -83,6 +92,7 @@ export class VMInfo implements VMInfoInterface {
number_vcpu: 1,
vnc_access: true,
disks: [],
networks: [],
});
}