From d278d6b802ff131fa4d402fc5c1d39d33c95b873 Mon Sep 17 00:00:00 2001 From: "Saulo S. Toledo" Date: Tue, 27 Mar 2018 21:20:40 -0300 Subject: [PATCH] Adding roles, filters and configurations for Physical Switches support --- config/miq_expression.yml | 1 + db/fixtures/miq_product_features.yml | 29 ++++++++++++++++++++++++++++ db/fixtures/miq_searches.yml | 21 ++++++++++++++++++++ db/fixtures/miq_user_roles.yml | 9 +++++++++ locale/en.yml | 3 ++- 5 files changed, 62 insertions(+), 1 deletion(-) diff --git a/config/miq_expression.yml b/config/miq_expression.yml index 8cbcc22e667..6233032c01e 100644 --- a/config/miq_expression.yml +++ b/config/miq_expression.yml @@ -49,6 +49,7 @@ - MiqWorker - OrchestrationStack - OrchestrationTemplate +- PhysicalSwitch - PhysicalServer - PolicyEvent - ResourcePool diff --git a/db/fixtures/miq_product_features.yml b/db/fixtures/miq_product_features.yml index 427780e7da7..f5019e13af5 100644 --- a/db/fixtures/miq_product_features.yml +++ b/db/fixtures/miq_product_features.yml @@ -5848,6 +5848,35 @@ :feature_type: admin :identifier: ems_physical_infra_new +# Physical Switches +- :name: Physical Switches + :description: Everything under Physical Switches + :feature_type: node + :identifier: physical_switch + :children: + - :name: View + :description: View Physical Switch + :feature_type: view + :identifier: physical_switch_view + :children: + - :name: List + :description: Display Lists of Physical Switches + :feature_type: view + :identifier: physical_switch_show_list + - :name: Show + :description: Display Individual Physical Switch + :feature_type: view + :identifier: physical_switch_show + - :name: Operate + :description: Perform Operations on Physical Switches + :feature_type: control + :identifier: physical_switch_control + :children: + - :name: Refresh + :description: Refresh relationships and power states for all items related to Physical Switches / Nodes + :feature_type: control + :identifier: physical_switch_refresh + # Physical Servers - :name: Physical Servers :description: Everything under Physical Servers diff --git a/db/fixtures/miq_searches.yml b/db/fixtures/miq_searches.yml index 9db25fc27d7..ffcdb90b302 100644 --- a/db/fixtures/miq_searches.yml +++ b/db/fixtures/miq_searches.yml @@ -1301,6 +1301,27 @@ value: "waiting" search_type: default db: Container +- attributes: + name: default_Status / Running + description: Status / Running + filter: !ruby/object:MiqExpression + exp: + INCLUDES: + field: PhysicalSwitch-power_state + value: "on" + search_type: default + db: PhysicalSwitch +- attributes: + name: default_Status / Stopped + description: Status / Stopped + filter: !ruby/object:MiqExpression + exp: + not: + INCLUDES: + field: PhysicalSwitch-power_state + value: "on" + search_type: default + db: PhysicalSwitch - attributes: name: default_Over Sized description: Over Sized diff --git a/db/fixtures/miq_user_roles.yml b/db/fixtures/miq_user_roles.yml index 858bd26e19c..0eaa8e577be 100644 --- a/db/fixtures/miq_user_roles.yml +++ b/db/fixtures/miq_user_roles.yml @@ -66,6 +66,7 @@ - miq_request - miq_template - orchestration_stack + - physical_switch - physical_server - physical_infra_topology - planning @@ -133,6 +134,7 @@ - miq_template_tag - miq_template_timeline - physical_infra_topology_view + - physical_switch_view - physical_server_view - policy_log - policy_simulation @@ -227,6 +229,7 @@ - miq_template_snapshot_view - miq_template_tag - physical_infra_topology_view + - physical_switch_view - physical_server_view - planning - policy_log @@ -296,8 +299,10 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - physical_switch - physical_server - physical_infra_topology + - physical_switch_view - physical_server_view - provider_foreman_explorer - vm_clone @@ -373,6 +378,7 @@ - ems_physical_infra_refresh - ems_physical_infra_tag - ems_physical_infra_view + - physical_switch_view - physical_server_view - physical_infra_topology_view - host_new @@ -585,6 +591,7 @@ - miq_template_tag - miq_template_timeline - physical_infra_topology_view + - physical_switch_view - physical_server_view - policy_log - policy_simulation @@ -672,6 +679,7 @@ - miq_template_tag - miq_template_timeline - physical_infra_topology_view + - physical_switch_view - physical_server_view - resource_pool_show - resource_pool_show_list @@ -1178,6 +1186,7 @@ - orchestration_templates_view - persistent_volume_view - physical_infra_topology_view + - physical_switch_view - physical_server_view - planning - policy_log diff --git a/locale/en.yml b/locale/en.yml index 504b2b9fedb..4e2356b7d41 100644 --- a/locale/en.yml +++ b/locale/en.yml @@ -800,7 +800,7 @@ en: ManageIQ::Providers::InfraManager::Vm: Virtual Machine ManageIQ::Providers::InfraManager::Template: Template ManageIQ::Providers::NetworkManager: Network Manager - ManageIQ::Providers::PhysicalInfraManager: Physical Infrastructure Provider + ManageIQ::Providers::PhysicalInfraManager: Physical Infrastructure Provider ManageIQ::Providers::Openstack::InfraManager: Infrastructure Provider (OpenStack) ManageIQ::Providers::Microsoft::InfraManager: Infrastructure Provider (Microsoft) ManageIQ::Providers::Redhat::InfraManager: Infrastructure Provider (Red Hat) @@ -861,6 +861,7 @@ en: ManageIQ::Providers::Vmware::InfraManager::Host: Host (Vmware) ManageIQ::Providers::Vmware::InfraManager::HostEsx: Host (Vmware) ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalServer: Physical Server (Lenovo) + ManageIQ::Providers::Lenovo::PhysicalInfraManager::PhysicalSwitch: Physical Switch (Lenovo) MeteringContainerImage: Metering for Image MeteringContainerProject: Metering for Project MeteringVm: Metering for VM