mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #8041 from zhaoxiangchun/bugfix/zxc-tk-vmware-master
bugfix:esxi collect metric
This commit is contained in:
@@ -187,6 +187,9 @@ func (cli *SESXiClient) getManagerEntityofVm(server jsonutils.JSONObject) (*mo.M
|
||||
}
|
||||
for _, virtualMachine := range virtualMachines {
|
||||
guest := NewVirtualMachine(cli, &virtualMachine, nil)
|
||||
if guest == nil {
|
||||
continue
|
||||
}
|
||||
ip := guest.GetGlobalId()
|
||||
if ip == extId {
|
||||
return virtualMachine.Entity(), nil
|
||||
@@ -204,6 +207,9 @@ func (cli *SESXiClient) getManagerEntityofHost(host jsonutils.JSONObject) (*mo.M
|
||||
}
|
||||
for _, hostSystem := range hostSystems {
|
||||
host := NewHost(cli, &hostSystem, nil)
|
||||
if host == nil {
|
||||
continue
|
||||
}
|
||||
ip := host.GetGlobalId()
|
||||
if ip == extId {
|
||||
return hostSystem.Entity(), nil
|
||||
|
||||
Reference in New Issue
Block a user