fix(VM): cpuCap can be defined when cpuWeight is not
This commit is contained in:
parent
7d993e8319
commit
47d7561db4
@ -335,9 +335,10 @@ const TRANSFORMS = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj.VCPUs_params && obj.VCPUs_params.weight) {
|
let tmp
|
||||||
vm.cpuCap = obj.VCPUs_params.cap
|
if ((tmp = obj.VCPUs_params)) {
|
||||||
vm.cpuWeight = obj.VCPUs_params.weight
|
tmp.cap && (vm.cpuCap = tmp.cap)
|
||||||
|
tmp.weight && (vm.cpuWeight = tmp.weight)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isHvm) {
|
if (!isHvm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user