clh: update api calls for latest master

cpu api changed, update to latest API

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2019-12-10 06:38:07 +00:00
parent 1a7539c1f5
commit e9a852dd79

View File

@ -176,9 +176,10 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
clh.vmconfig.Memory.Size = int64(clh.config.MemorySize) << utils.MibToBytesShift clh.vmconfig.Memory.Size = int64(clh.config.MemorySize) << utils.MibToBytesShift
clh.vmconfig.Memory.File = "/dev/shm" clh.vmconfig.Memory.File = "/dev/shm"
// Set initial amount of cpu's for the virtual machine // Set initial amount of cpu's for the virtual machine
clh.vmconfig.Cpus = chclient.CpuConfig{ clh.vmconfig.Cpus = chclient.CpusConfig{
// cast to int32, as openAPI has a limitation that it does not support unsigned values // cast to int32, as openAPI has a limitation that it does not support unsigned values
CpuCount: int32(clh.config.NumVCPUs), BootVcpus: int32(clh.config.NumVCPUs),
MaxVcpus: int32(clh.config.DefaultMaxVCPUs),
} }
// Add the kernel path // Add the kernel path