Can attach defined networks to domains

This commit is contained in:
2023-12-08 13:10:53 +01:00
parent 54a3013c59
commit f05ae9fd52
5 changed files with 77 additions and 13 deletions

View File

@ -30,12 +30,17 @@ export interface VMDisk {
deleteType?: "keepfile" | "deletefile";
}
export type VMNetInterface = VMNetUserspaceSLIRPStack;
export type VMNetInterface = VMNetUserspaceSLIRPStack | VMNetDefinedNetwork;
export interface VMNetUserspaceSLIRPStack {
type: "UserspaceSLIRPStack";
}
export interface VMNetDefinedNetwork {
type: "DefinedNetwork";
network: string;
}
interface VMInfoInterface {
name: string;
uuid?: string;
@ -65,7 +70,7 @@ export class VMInfo implements VMInfoInterface {
vnc_access: boolean;
iso_file?: string;
disks: VMDisk[];
networks: VMNetUserspaceSLIRPStack[];
networks: VMNetInterface[];
constructor(int: VMInfoInterface) {
this.name = int.name;