-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] De-duplicate code for VM / VMCollection retirement #9839
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comment, but overall LGTM, awesome work @tpapaioa
One PRT test in the latest commit failed with a TimedOutError exception, but it's unrelated to this PR, so I'm changing the status back to RFR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small things to discuss, otherwise these changes look great, thanks @tpapaioa !
I detected some fixture changes in commit cc2e271 The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
This is a follow-up to #9540, making some additional changes that were suggested in review.
1.) cleanup of code that loops over vm instances, e.g.,
2.) De-duplication of the common code shared by the set_retirement_date methods in the VM and VMCollection classes. The parameter validation and form filling is the same in both classes, and the only differences are in:
I've created a RetirementMixin class and moved the set_retirement_date method there. The code that needs to be overridden at the VM or VMCollection level is moved to the new navigate_to_set_retirement and post_set_retirement methods.
{{ pytest: cfme/tests/cloud_infra_common/test_retirement.py -v --long-running --use-provider vsphere67-nested --use-provider ec2west -k 'test_retirement_now or test_set_retirement or test_unset_retirement_date or test_resume_retired_instance' }}