Skip to content
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

Merged
merged 4 commits into from
Sep 6, 2017
Merged

Conversation

alexander-demicev
Copy link

Added interface methods for creating and deleting flavors and made small
refactoring of existing method. 0penstack part will be implemented in
manageiq-providers-openstack.

:method_name => 'delete_flavor',
:role => 'ems operations',
:zone => ext_management_system.my_zone,
:args => [ext_management_system.id, options]

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.

Copy link

@petrblaho petrblaho left a 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.

@@ -1,6 +1,8 @@
class Flavor < ApplicationRecord
include NewWithTypeStiMixin
include CloudTenancyMixin
include AvailabilityMixin

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...

Copy link

@petrblaho petrblaho left a 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.

Copy link

@petrblaho petrblaho left a 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 :-)

@@ -1,6 +1,9 @@
class Flavor < ApplicationRecord
include NewWithTypeStiMixin
include CloudTenancyMixin
include SupportsFeatureMixin

supports :create
Copy link
Member

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?

Copy link
Author

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

@miq-bot
Copy link
Member

miq-bot commented Aug 19, 2017

Checked commits alexander-demicev/manageiq@4e8cf39~...7521c70 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@aufi aufi left a 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 :-)

@alexander-demicev
Copy link
Author

alexander-demicev commented Sep 1, 2017

@blomquisg Can you merge? :-)

@blomquisg blomquisg merged commit d65d0a0 into ManageIQ:master Sep 6, 2017
@blomquisg blomquisg added this to the Sprint 69 Ending Sep 18, 2017 milestone Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants