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

Added container components for service model. #12863

Merged
merged 1 commit into from
Jan 16, 2017
Merged
Show file tree
Hide file tree
Changes from all 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,20 @@
module MiqAeMethodService
class MiqAeServiceContainer < MiqAeServiceModelBase
Copy link
Contributor

Choose a reason for hiding this comment

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

@kevensen
From the service model are you planning on exposing its relationships or just the attributes.
With the current implementation only the attributes are going to be exposed and not any relationships.
https://github.com/ManageIQ/manageiq/blob/master/lib/miq_automation_engine/service_models/miq_ae_service_host.rb#L6 shows how we expose relationships

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkanoor I want to expose some of the relationships. Thank you for the tip. I'll update the pull request in the next day or two. Or would you rather me close this request and open a new one?

Copy link
Contributor

Choose a reason for hiding this comment

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

@kevensen
You can just add new commits to this PR

expose :container_group, :association => true
expose :ext_management_system, :association => true
expose :container_node, :association => true
expose :container_replicator, :association => true
expose :container_project, :association => true
expose :old_container_project, :association => true
expose :container_definition, :association => true
expose :container_image, :association => true
expose :container_image_registry, :association => true
expose :security_context, :association => true
expose :metrics
expose :metric_rollups
expose :vim_performance_states

expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

module MiqAeMethodService
class MiqAeServiceContainerBuild < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_project, :association => true
expose :labels, :association => true
expose :container_build_pods, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

module MiqAeMethodService
class MiqAeServiceContainerBuildPod < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_build, :association => true
expose :labels, :association => true
expose :container_group, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

module MiqAeMethodService
class MiqAeServiceContainerCondition < MiqAeServiceModelBase
expose :container_entity, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

module MiqAeMethodService
class MiqAeServiceContainerDefinition < MiqAeServiceModelBase
expose :container_group, :association => true
expose :ext_management_system, :association => true
expose :container_port_configs, :association => true
expose :container_env_vars, :association => true
expose :container, :association => true
expose :security_context, :association => true
expose :container_image, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceContainerEnvVar < MiqAeServiceModelBase
expose :container_definition, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module MiqAeMethodService
class MiqAeServiceContainerGroup < MiqAeServiceModelBase
expose :containers, :association => true
expose :container_definitions, :association => true
expose :container_images, :association => true
expose :ext_management_system, :association => true
expose :labels, :association => true
expose :node_selector_parts, :association => true
expose :container_node, :association => true
expose :container_services, :association => true
expose :container_replicator, :association => true
expose :container_project, :association => true
expose :container_build_pod, :association => true
expose :container_volumes, :association => true
expose :metrics, :association => true
expose :metric_rollups, :association => true
expose :vim_performance_states, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module MiqAeMethodService
class MiqAeServiceContainerImage < MiqAeServiceModelBase
expose :container_image_registry, :association => true
expose :ext_management_system, :association => true
expose :containers, :association => true
expose :container_nodes, :association => true
expose :container_groups, :association => true
expose :container_projects, :association => true
expose :guest_applications, :association => true
expose :computer_system, :association => true
expose :operating_system, :association => true
expose :openscap_result, :association => true
expose :openscap_rule_results, :association => true
expose :exposed_ports, :association => true
expose :environment_variables, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module MiqAeMethodService
class MiqAeServiceContainerImageRegistry < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_images, :association => true
expose :containers, :association => true
expose :container_services, :association => true
expose :container_groups, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module MiqAeMethodService
class MiqAeServiceContainerLimit < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_project, :association => true
expose :container_limit_items, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceContainerLimitItem < MiqAeServiceModelBase
expose :container_limit, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module MiqAeMethodService
class MiqAeServiceContainerNode < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_groups, :association => true
expose :container_conditions, :association => true
expose :containers, :association => true
expose :container_images, :association => true
expose :container_services, :association => true
expose :container_routes, :association => true
expose :container_replicators, :association => true
expose :labels, :association => true
expose :computer_system, :association => true
expose :lives_on, :association => true
expose :hardware, :association => true
expose :metrics, :association => true
expose :metric_rollups, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MiqAeMethodService
class MiqAeServiceContainerPortConfig < MiqAeServiceModelBase
expose :container_definition, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module MiqAeMethodService
class MiqAeServiceContainerProject < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_groups, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module MiqAeMethodService
class MiqAeServiceContainerQuota < MiqAeServiceModelBase
expose :ext_management_system, association => true
expose :container_project, association => true
expose :container_quota_items, association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module MiqAeMethodService
class MiqAeServiceContainerReplicator < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_groups, :association => true
expose :container_project, :association => true
expose :labels, :association => true
expose :selector_parts, :association => true
expose :container_nodes, :association => true
expose :metrics, :association => true
expose :metric_zones, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module MiqAeMethodService
class MiqAeServiceContainerRoute < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_project, :association => true
expose :container_service, :association => true
expose :container_nodes, :association => true
expose :container_groups, :association => true
expose :labels, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module MiqAeMethodService
class MiqAeServiceContainerService < MiqAeServiceModelBase
expose :ext_management_system, :association => true
expose :container_groups, :association => true
expose :container_routes, :association => true
expose :container_service_port_configs, :association => true
expose :container_project, :association => true
expose :labels, :association => true
expose :selector_parts, :association => true
expose :container_nodes, :association => true
expose :container_image_registry, :association => true
expose :metrics, :association => true
expose :metric_rollups, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module MiqAeMethodService
class MiqAeServiceContainerVolume < MiqAeServiceModelBase
expose :parent, :association => true
expose :persistent_volume_claim, :association => true
expose :is_tagged_with?
expose :tags
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServiceContainerVolumeKubernetes < MiqAeServiceContainerVolume
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_Kubernetes_ContainerManager_Container < MiqAeServiceContainer
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_Kubernetes_ContainerManager_ContainerGroup < MiqAeServiceProvider
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_Kubernetes_ContainerManager_ContainerNode < MiqAeServiceContainerNode
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module MiqAeMethodService
class MiqAeServiceManageIQ_Providers_OpenshiftEnterprise_ContainerManager < MiqAeServiceManageIQ_Providers_ContainerManager
expose :container_image_registries, :association => true
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServicePersistentVolume < MiqAeServiceModelBase
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module MiqAeMethodService
class MiqAeServicePersistentVolumeClaim < MiqAeServiceModelBase
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module MiqAeServiceContainerBuildPodSpec
describe MiqAeMethodService::MiqAeServiceContainerBuildPod do
it "#ext_management_system" do
expect(described_class.instance_methods).to include(:ext_management_system)
end

it "#container_build" do
expect(described_class.instance_methods).to include(:container_build)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module MiqAeServiceContainerBuildSpec
describe MiqAeMethodService::MiqAeServiceContainerBuild do
it "#ext_management_system" do
expect(described_class.instance_methods).to include(:ext_management_system)
end

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

it "#container_build_pods" do
expect(described_class.instance_methods).to include(:container_build_pods)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module MiqAeServiceContainerSpec
describe MiqAeMethodService::MiqAeServiceContainerCondition do
it "#container_entity" do
expect(described_class.instance_methods).to include(:container_entity)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module MiqAeServiceContainerSpec
describe MiqAeMethodService::MiqAeServiceContainerDefinition do
it "#container_group" do
expect(described_class.instance_methods).to include(:container_group)
end

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

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

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

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

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

it "#container_image" do
expect(described_class.instance_methods).to include(:container_image)
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module MiqAeServiceContainerSpec
describe MiqAeMethodService::MiqAeServiceContainerEnvVar do
it "#container_definition" do
expect(described_class.instance_methods).to include(:container_definition)
end
end
end
Loading