improve datacenter name handling
This commit is contained in:
1 parent
4f8aff1ab8
commit
5affdb8eb1
2 files changed
+17
-6
No files matched your search
@@ -79,8 +79,13 @@ func (h *Handler) VmCreate(w http.ResponseWriter, r *http.Request) {
|
||||
//prettyPrint(vmObject)
|
||||
|
||||
// calculate VM properties we want to store
|
||||
numRam = vmObject.Vm.Config.Hardware.MemoryMB
|
||||
numVcpus = vmObject.Vm.Config.Hardware.NumCPU * vmObject.Vm.Config.Hardware.NumCoresPerSocket
|
||||
if vmObject.Vm.Config != nil {
|
||||
numRam = vmObject.Vm.Config.Hardware.MemoryMB
|
||||
numVcpus = vmObject.Vm.Config.Hardware.NumCPU * vmObject.Vm.Config.Hardware.NumCoresPerSocket
|
||||
} else {
|
||||
h.Logger.Error("Empty VM config")
|
||||
}
|
||||
|
||||
}
|
||||
err = vc.Logout()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user