Can set the number of VCPUs
This commit is contained in:
@ -172,6 +172,18 @@ export class ServerApi {
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get host supported vCPUs configurations
|
||||
*/
|
||||
static async NumberVCPUs(): Promise<number[]> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
method: "GET",
|
||||
uri: "/server/number_vcpus",
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get host networks card list
|
||||
*/
|
||||
|
@ -39,6 +39,7 @@ interface VMInfoInterface {
|
||||
boot_type: "UEFI" | "UEFISecureBoot";
|
||||
architecture: "i686" | "x86_64";
|
||||
memory: number;
|
||||
number_vcpu: number;
|
||||
vnc_access: boolean;
|
||||
iso_file?: string;
|
||||
disks: VMDisk[];
|
||||
@ -52,6 +53,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
description?: string;
|
||||
boot_type: "UEFI" | "UEFISecureBoot";
|
||||
architecture: "i686" | "x86_64";
|
||||
number_vcpu: number;
|
||||
memory: number;
|
||||
vnc_access: boolean;
|
||||
iso_file?: string;
|
||||
@ -65,6 +67,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
this.description = int.description;
|
||||
this.boot_type = int.boot_type;
|
||||
this.architecture = int.architecture;
|
||||
this.number_vcpu = int.number_vcpu;
|
||||
this.memory = int.memory;
|
||||
this.vnc_access = int.vnc_access;
|
||||
this.iso_file = int.iso_file;
|
||||
@ -77,6 +80,7 @@ export class VMInfo implements VMInfoInterface {
|
||||
boot_type: "UEFI",
|
||||
architecture: "x86_64",
|
||||
memory: 1024,
|
||||
number_vcpu: 1,
|
||||
vnc_access: true,
|
||||
disks: [],
|
||||
});
|
||||
|
Reference in New Issue
Block a user