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

Extend container service model #14233

Merged
merged 3 commits into from
Mar 13, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module MiqAeMethodService
class MiqAeServiceContainerTemplate < MiqAeServiceModelBase
expose :container_template_parameters, :association => true
expose :ext_management_system, :association => true
expose :is_tagged_with?
expose :tags
Copy link
Member

Choose a reason for hiding this comment

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

I realized these tag methods got into a lot of the container models, but they need to be removed. You should be using the tag methods defined for at the base service model level here:
https://github.com/ManageIQ/manageiq/blob/master/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb#L218

Will need to open a git issue to clean up the other service models that added these methods:
miq_ae_service_container.rb
miq_ae_service_container_build.rb
miq_ae_service_container_build_pod.rb
miq_ae_service_container_deployment_node.rb
miq_ae_service_container_group.rb
miq_ae_service_container_image.rb
miq_ae_service_container_image_registry.rb
miq_ae_service_container_node.rb
miq_ae_service_container_replicator.rb
miq_ae_service_container_route.rb
miq_ae_service_container_service.rb
miq_ae_service_container_volume.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tag methods removed.

end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServiceContainerTemplateParameter < MiqAeServiceModelBase
end
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_OpenshiftEnterprise_ContainerManager < MiqAeServiceManageIQ_Providers_ContainerManager
expose :container_image_registries, :association => true
expose :container_projects, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module MiqAeServiceContainerSpec
describe MiqAeMethodService::MiqAeServiceContainerTemplate do
it "#ext_management_system" do
expect(described_class.instance_methods).to include(:ext_management_system)
end

it "#container_template_parameters" do
expect(described_class.instance_methods).to include(:container_template_parameters)
end
end
end