Merge pull request #10761 from rainzm/esxi/sync_network

fix(region): Remind that cloud account synchronization failed due to network synchronization failure
This commit is contained in:
Zexi Li
2021-04-16 10:06:26 +08:00
committed by GitHub
+3
View File
@@ -2842,6 +2842,9 @@ func (cd *SCloudaccount) GetHost2Wire(ctx context.Context, userCred mcclient.Tok
return cd.vmwareHostWireCache, nil
}
hwJson := cd.GetMetadataJson(METADATA_EXT_HOST2WIRE_KEY, userCred)
if hwJson == nil {
return nil, fmt.Errorf("The cloud account synchronization network may have failed, please check the operation log first and solve the synchronization network problem")
}
ret := make(map[string][]SVs2Wire)
err := hwJson.Unmarshal(&ret)
if err != nil {