Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if record supports retirement task only for VM or Template records
Made changes to code to not check for retirement task eligibility for Service & Orchestration template records. This check should only be for VmOrTemplate records. Added model methods to check if record type supports retirement. Having service record with a same id as a MiqTemple record in database was causing an issue while trying to retire the service and incorrectly going thru the code path trying to render a flash message that "Retire does not apply to selected xxxx" https://bugzilla.redhat.com/show_bug.cgi?id=1344678 https://bugzilla.redhat.com/show_bug.cgi?id=1349989
- Loading branch information
Showing
5 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,8 @@ def self.eligible_for_provisioning | |
end | ||
|
||
def active?; false; end | ||
|
||
def supports_retirement? | ||
false | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,4 +88,8 @@ def running_processes | |
end | ||
pl | ||
end | ||
|
||
def supports_retirement? | ||
true | ||
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