-
Notifications
You must be signed in to change notification settings - Fork 897
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
Flavors create and add methods #15552
Conversation
2380b4e
to
706cb65
Compare
app/models/flavor.rb
Outdated
:method_name => 'delete_flavor', | ||
:role => 'ems operations', | ||
:zone => ext_management_system.my_zone, | ||
:args => [ext_management_system.id, options] |
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.
options
variable should not be here as it is not defined in this scope.
[ext_management_system.id]
works well.
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.
Good work.
One place needs to be changed - that place with redundant options
variable.
Other than that I like it - it works, it looks clean.
Thank you.
app/models/flavor.rb
Outdated
@@ -1,6 +1,8 @@ | |||
class Flavor < ApplicationRecord | |||
include NewWithTypeStiMixin | |||
include CloudTenancyMixin | |||
include AvailabilityMixin |
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.
First comment in AvailabilityMixin
says # PLEASE PREFER supports_feature_mixin.rb OVER THIS
.
Is there reason why we should use AvailabilityMixin
instead of recommended SupportsFeatureMixin
from https://github.com/ManageIQ/manageiq/blob/master/app/models/mixins/supports_feature_mixin.rb ?
Maybe I am missing something...
af8d062
to
706cb65
Compare
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 like the code.
I suggest squashing fix commits into previous two.
0cbbea3
to
b5920e7
Compare
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.
Ack from me. See how @blomquisg see that :-)
de2ae81
to
d9925d3
Compare
d9925d3
to
32d15c6
Compare
@@ -1,6 +1,9 @@ | |||
class Flavor < ApplicationRecord | |||
include NewWithTypeStiMixin | |||
include CloudTenancyMixin | |||
include SupportsFeatureMixin | |||
|
|||
supports :create |
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.
@alexander-demichev Thanks for the PR!
Just curious, don't we need also supports :delete
?
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.
@aufi yeah, it`s there now
32d15c6
to
7521c70
Compare
Checked commits alexander-demicev/manageiq@4e8cf39~...7521c70 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.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.
Looks good to me, but needs core reviewer to merge. Maybe @blomquisg :-)
@blomquisg Can you merge? :-) |
Added interface methods for creating and deleting flavors and made small
refactoring of existing method. 0penstack part will be implemented in
manageiq-providers-openstack.