Merge pull request #2699 from ioito/hotfix/qx-baremetal-server-delete

fix: 忽略裸金属器删除条件
This commit is contained in:
yunion-ci-robot
2019-09-02 17:24:18 +08:00
committed by GitHub
+1 -1
View File
@@ -528,7 +528,7 @@ func (guest *SGuest) ValidatePurgeCondition(ctx context.Context) error {
func (guest *SGuest) ValidateDeleteCondition(ctx context.Context) error {
host := guest.GetHost()
if host != nil {
if host != nil && guest.GetHypervisor() != api.HYPERVISOR_BAREMETAL {
if !host.Enabled {
return httperrors.NewInputParameterError("Cannot delete server on disabled host")
}