New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No revert for "active" snapshot #5
No revert for "active" snapshot #5
Conversation
In the snapshot screen when the "active" snapshot is selected the revert button should be disabled for RHV. If VM is up, the 'revert' button is disabled due to VM status not 'DOWN'. If VM is down and the active snapshot is selected, the 'revert' button is disabled due to selection of 'active' snapshot. http://bugzilla.redhat.com/1396068
Screenshots were added to ManageIQ/manageiq-ui-classic#845 |
Checked commit masayag@fd30285 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@miq-bot add_label bug |
@@ -55,12 +55,21 @@ def allowed_to_revert? | |||
current_state == 'off' | |||
end | |||
|
|||
def revert_to_snapshot_denied_message(active = false) |
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.
where is the active
param used? I only see the call to this method in the supports
block above
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.
@durandom the 'active' is passed from the UI call, when the information about the snapshot is available. See:
and I guess fine/yes according to the BZ? |
In addition, the patch was originally targeted to Euwe. Should we add a label for it as well ? I've prepared a dedicated PR for it, once this will be merged, I'll apply to comment on it: |
nope. Satoe is using the labels to backport. If you have a dedicated euwe PR (because you know the cherry picking will fail) you should not label this PR |
Fine backport (to manageiq repo) details:
|
Actually, what I'd prefer is to still mark the PR with |
@miq-bot add_label euwe/yes |
Euwe PR is here: |
@masayag is there a way to tell from the provider which snapshot represents the |
Backported to Euwe via ManageIQ/manageiq#14326 |
@agrare In order to find the active snapshot we should select the snapshot which complies to The validation 'revert_to_snapshot' is defined for the VM class, therefore the information about the selected snapshot is not available in that context. To enable that support, @durandom opened ManageIQ/manageiq#14740 If there was an option to pass the selected snapshot as an argument to the validation method, we could have check for that snapshot if it is the active one and report the proper reason via the Alternately, we can expose the selected snapshot as an instance variable and require it instead of the I assume that declaring |
In the snapshot screen when the "active" snapshot is selected
the revert button should be disabled for RHV.
If VM is up, the 'revert' button is disabled due to VM status not 'DOWN'.
If VM is down and the active snapshot is selected, the 'revert' button
is disabled due to selection of 'active' snapshot.
http://bugzilla.redhat.com/1396068