mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #2699 from ioito/hotfix/qx-baremetal-server-delete
fix: 忽略裸金属器删除条件
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user