fix(region): baremetal host ping forbidden

This commit is contained in:
Zexi Li
2022-07-28 14:44:52 +08:00
parent c5c6d55f95
commit 46c555cbe9
+3
View File
@@ -4038,6 +4038,9 @@ func (self *SHost) StartSyncAllGuestsStatusTask(ctx context.Context, userCred mc
}
func (self *SHost) PerformPing(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.SHostPingInput) (jsonutils.JSONObject, error) {
if self.HostType == api.HOST_TYPE_BAREMETAL {
return nil, httperrors.NewNotSupportedError("ping host type %s not support", self.HostType)
}
if input.WithData {
// piggyback storage stats info
log.Debugf("host ping %s", jsonutils.Marshal(input))