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

Add a relationship between generic objects and services. #15490

Merged
merged 1 commit into from
Aug 3, 2017

Conversation

lfu
Copy link
Member

@lfu lfu commented Jun 30, 2017

Add a relationship between generic objects and services.

@miq-bot assign @gmcculloug
@miq-bot add_label enhancement, services

@@ -203,6 +204,10 @@ def orchestration_stacks
service_resources.where(:resource_type => 'OrchestrationStack').collect(&:resource)
end

def generic_objects
service_resources.where(:resource_type => 'GenericObject').collect(&:resource)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be further optimized? Will it be called frequently?

@lfu lfu force-pushed the service_with_generic_object branch from b03b921 to 3fc4088 Compare August 3, 2017 14:10
@miq-bot
Copy link
Member

miq-bot commented Aug 3, 2017

Checked commit lfu@3fc4088 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. ⭐

@@ -203,6 +204,10 @@ def orchestration_stacks
service_resources.where(:resource_type => 'OrchestrationStack').collect(&:resource)
end

def generic_objects
service_resources.where(:resource_type => 'GenericObject').includes(:resource).collect(&:resource)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 A separate PR should be created to add .includes(:resource) to the orchestration_stacks methods above.

@gmcculloug gmcculloug merged commit e6c3784 into ManageIQ:master Aug 3, 2017
@gmcculloug gmcculloug added this to the Sprint 66 Ending Aug 7, 2017 milestone Aug 3, 2017
@lfu lfu deleted the service_with_generic_object branch October 16, 2017 20:15
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.

4 participants