Generate cloud init disk image
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -82,6 +82,14 @@ export interface VMNetBridge {
|
||||
bridge: string;
|
||||
}
|
||||
|
||||
export interface VMCloudInit {
|
||||
attach_config: boolean;
|
||||
user_data: string;
|
||||
instance_id?: string;
|
||||
local_hostname?: string;
|
||||
network_configuration?: string;
|
||||
}
|
||||
|
||||
export type VMBootType = "UEFI" | "UEFISecureBoot" | "Legacy";
|
||||
|
||||
interface VMInfoInterface {
|
||||
@ -101,6 +109,7 @@ interface VMInfoInterface {
|
||||
networks: VMNetInterface[];
|
||||
tpm_module: boolean;
|
||||
oem_strings: string[];
|
||||
cloud_init: VMCloudInit;
|
||||
}
|
||||
|
||||
export class VMInfo implements VMInfoInterface {
|
||||
@ -120,6 +129,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
networks: VMNetInterface[];
|
||||
tpm_module: boolean;
|
||||
oem_strings: string[];
|
||||
cloud_init: VMCloudInit;
|
||||
|
||||
constructor(int: VMInfoInterface) {
|
||||
this.name = int.name;
|
||||
@ -138,6 +148,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
this.networks = int.networks;
|
||||
this.tpm_module = int.tpm_module;
|
||||
this.oem_strings = int.oem_strings;
|
||||
this.cloud_init = int.cloud_init;
|
||||
}
|
||||
|
||||
static NewEmpty(): VMInfo {
|
||||
@ -153,6 +164,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
networks: [],
|
||||
tpm_module: true,
|
||||
oem_strings: [],
|
||||
cloud_init: { attach_config: false, user_data: "" },
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user