-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #897 from agrare/fix_vm_destroy_allowed_when_running
Fix VM terminate showing supported when running (cherry picked from commit 74fc1b0)
- Loading branch information
Showing
4 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
app/models/manageiq/providers/vmware/infra_manager/template/operations.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module ManageIQ::Providers::Vmware::InfraManager::Template::Operations | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
supports :terminate do | ||
if retired? | ||
_('The VM is retired') | ||
elsif terminated? | ||
_('The VM is terminated') | ||
elsif disconnected? | ||
_('The VM does not have a valid connection state') | ||
elsif !has_active_ems? | ||
_("The VM is not connected to an active Provider") | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters