Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7776 from jan-zmeskal/retirement_state_fix
Browse files Browse the repository at this point in the history
[1LP][RFR] Fixing getting retirement state
  • Loading branch information
mshriver authored Sep 12, 2018
2 parents a908d31 + 710ad55 commit 6536d12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cfme/common/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from cfme.utils.rest import assert_response
from cfme.utils.timeutil import parsetime
from cfme.utils.update import Updateable
from cfme.utils.version import LOWEST, VersionPicker
from cfme.utils.virtual_machines import deploy_template
from cfme.utils.wait import wait_for
from . import PolicyProfileAssignable
Expand Down Expand Up @@ -183,7 +184,11 @@ def is_retired(self):
view = navigate_to(self, "Details", use_resetter=False)
if view.entities.summary('Lifecycle').get_text_of('Retirement Date').lower() != 'never':
try:
status = view.entities.summary('Lifecycle').get_text_of('Retirement state').lower()
retirement_state = VersionPicker({
LOWEST: 'Retirement state',
'5.10': 'Retirement State'
})
status = view.entities.summary('Lifecycle').get_text_of(retirement_state).lower()
return status == 'retired'
except NameError:
return False
Expand Down
1 change: 1 addition & 0 deletions cfme/tests/cloud_infra_common/test_retirement.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

pytestmark = [
pytest.mark.usefixtures('setup_provider'),
pytest.mark.meta(blockers=[BZ(1626971, forced_streams=['5.10'])]),
pytest.mark.tier(1),
pytest.mark.long_running,
test_requirements.retirement,
Expand Down

0 comments on commit 6536d12

Please sign in to comment.