-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fix enabling Power operations for a template #5128
Fix enabling Power operations for a template #5128
Conversation
@miq-bot add_label bug, hammer/yes, blocker |
@hstastna The current CI failures seem related. |
52dc0a9
to
fe275bb
Compare
So you are removing @romanblanco added that exceptions for some reason. I am not sure why. I assume that the We need to check what toolbars include these actions. Make a list of pairs entity (such as Instance, VM, Image, ...), action, that can be called (from the buttons below For each such pair (that can be called) we must make sure that the code works. I cannot think about any other reason why @romanblanco added the exceptions (and I dimly remember that there was some problem with checking the availability of those actions on the backend via If all the combination are ok, we can merge this. W/o this thorough testing we cannot be sure that we are not breaking something here. |
Seems that due to the test However there will be toolbars for nested entities and these need to be checked too. |
It looks like it is only about And I've found couple of bugs while testing, but unrelated to this PR, for example:
Maybe some other operations will not work properly there. And maybe the BZ for this already exists. |
Ok, will you remove the "WIP label and fix the specs so that we can move this one forward? Thx! |
e2443fb
to
b197195
Compare
1f22bf8
to
09b7f3a
Compare
11179cc
to
2a84f8c
Compare
@skateman I think you can review the specs ;) Thank you! |
@@ -9,7 +9,7 @@ | |||
controller.instance_variable_set(:@protect_tree, OpenStruct.new(:name => "name")) | |||
|
|||
MiqRegion.seed | |||
EvmSpecHelper.create_guid_miq_server_zone | |||
_, _, @zone = EvmSpecHelper.create_guid_miq_server_zone |
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.
Hmm, what about not doing this, and just adding something like:
Zone.my_zone
Maybe the method name is not the right one, but I'm pretty sure there's a method to retrieve the current zone.
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.
I realized that this was not necessarry. Thank you, David.
2a84f8c
to
9e0707c
Compare
@miq-bot remove_label wip |
I like it now, but I don't see any tests that cover the power operations for the template. Can you please point them out for me, or if they're not there add them? |
The 2nd commit takes care of it but not directly so probably this is not exactly what you expect and maybe I should add very similar specs as there are already for VMs, for |
9e0707c
to
681ccc1
Compare
@hstastna please do so |
70bbc36
to
11144d5
Compare
11144d5
to
0643df5
Compare
Checked commits hstastna/manageiq-ui-classic@74b2cf8~...0643df5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
…plate Fix enabling Power operations for a template (cherry picked from commit 8bf2ad4) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1686012 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1686015
Hammer backport details:
|
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1634713
https://bugzilla.redhat.com/show_bug.cgi?id=1655477
What:
This PR fixes the problem about the Power operations which were enabled for a template. And Power operations don't make sense for a template. They should be enabled only for VMs.
Steps to reproduce:
=> flash message about the start (for example) which was initiated successfully appears and it shouldn't
Before:
![start_before](https://user-images.githubusercontent.com/13417815/50769287-cc5a5a80-1283-11e9-9b56-7f5c728f8bb3.png)
After:
![start_after](https://user-images.githubusercontent.com/13417815/50769299-d11f0e80-1283-11e9-9d6d-f5078cfa8e3f.png)
Note:
I've removed appropriate power actions from untestable actions array in
testable_action
method which did not make sense to be there. Now the power actions should work properly for VMs and Templates. I've tested power operations for VMs and everything works as usually. And for Templates, the right flash message appears.