Skip to content

Commit

Permalink
Merge pull request #21108 from h-kataria/automation_providers_features
Browse files Browse the repository at this point in the history
Automation providers features changes to support De-explorization of Ansible Tower Explorer
  • Loading branch information
Fryguy authored Apr 9, 2021
2 parents 6813cbd + 2dd443a commit 14682ff
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 59 deletions.
1 change: 1 addition & 0 deletions app/models/aliases/ems_automation.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::EmsAutomation = ::ManageIQ::Providers::AnsibleTower::AutomationManager
4 changes: 4 additions & 0 deletions app/models/manageiq/providers/automation_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ def total_configuration_profiles
def total_configured_systems
Rbac.filtered(configured_systems).count
end

def total_inventory_groups
Rbac.filtered(inventory_groups).count
end
end
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
class ManageIQ::Providers::AutomationManager::ConfiguredSystem < ::ConfiguredSystem
virtual_column :inventory_root_group_name, :type => :string, :uses => :inventory_root_group

def inventory_root_group_name
inventory_root_group.name
end
end
97 changes: 50 additions & 47 deletions db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5073,59 +5073,62 @@

# Automation Manager
- :name: Ansible Tower
:description: Everything under Ansible Tower
:description: Everything under Providers
:feature_type: node
:identifier: automation_manager
:identifier: ems_automation
:children:
- :name: Ansible Tower Providers
:description: Everything under the Providers accordion
:feature_type: node
:identifier: automation_manager_providers
- :name: View
:description: View Providers
:feature_type: view
:identifier: ems_automation_view
:children:
- :name: View
:description: View Providers, Inventory Groups, Configured Systems
- :name: List
:description: Display Lists of Providers
:identifier: ems_automation_manager_show_list
- :name: Show
:description: Display Individual Providers
:feature_type: view
:identifier: automation_manager_providers_view
- :name: Operate
:description: Perform Operations on Providers and Configured Systems
:identifier: ems_automation_manager_show
- :name: Operate
:description: Perform Operations on Providers
:feature_type: control
:identifier: ems_automation_control
:children:
- :name: Edit Tags
:description: Edit Tags of Ansible Tower Provider
:feature_type: control
:identifier: automation_manager_providers_control
:children:
- :name: Edit Tags
:description: Edit Tags of Ansible Tower Provider
:feature_type: control
:identifier: automation_manager_provider_tag
- :name: Refresh Providers
:description: Refresh relationships for all items related of Provider
:feature_type: control
:identifier: automation_manager_refresh_provider
- :name: Modify
:description: Modify Providers
:identifier: ems_automation_tag
- :name: Refresh Providers
:description: Refresh relationships for all items related of Provider
:feature_type: control
:identifier: ems_automation_refresh_provider
- :name: Modify
:description: Modify Providers
:feature_type: admin
:identifier: ems_automation_admin
:children:
- :name: Remove Providers
:description: Remove Provier
:feature_type: admin
:identifier: automation_manager_admin
:children:
- :name: Remove Providers
:description: Remove Provier
:feature_type: admin
:identifier: automation_manager_delete_provider
- :name: Edit Provider
:description: Edit a Provider
:feature_type: admin
:identifier: automation_manager_edit_provider
- :name: Pause
:description: Pause a Provider
:feature_type: admin
:identifier: automation_manager_pause
- :name: Resume
:description: Resume a Provider
:feature_type: admin
:identifier: automation_manager_resume
- :name: Add Provider
:description: Add a Provider
:feature_type: admin
:identifier: automation_manager_add_provider
:identifier: ems_automation_delete_provider
- :name: Edit Provider
:description: Edit a Provider
:feature_type: admin
:identifier: ems_automation_edit_provider
- :name: Pause
:description: Pause a Provider
:feature_type: admin
:identifier: ems_automation_pause
- :name: Resume
:description: Resume a Provider
:feature_type: admin
:identifier: ems_automation_resume
- :name: Add Provider
:description: Add a Provider
:feature_type: admin
:identifier: ems_automation_add_provider
- :name: Configured Systems
:description: Everything under Configured Systems accordion
:description: Everything under Configured Systems
:feature_type: node
:identifier: automation_manager_configured_system
:children:
Expand All @@ -5152,7 +5155,7 @@
:identifier: automation_manager_configured_system_tag

- :name: Templates
:description: Everything under Templates accordion
:description: Everything under Templates
:feature_type: node
:identifier: configuration_script
:children:
Expand Down
8 changes: 4 additions & 4 deletions db/fixtures/miq_shortcuts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,10 @@
:url: /ansible_credential
:rbac_feature_name: embedded_automation_manager_credentials
:startup: true
- :name: automation_manager
:description: Automation / Ansible Tower / Explorer
:url: /automation_manager/explorer
:rbac_feature_name: automation_manager
- :name: ems_automation
:description: Automation / Ansible Tower / Providers
:url: /ems_automation/show_list
:rbac_feature_name: ems_automation
:startup: true
- :name: configuration_job
:description: Automation / Ansible Tower / Jobs
Expand Down
30 changes: 22 additions & 8 deletions db/fixtures/miq_user_roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
- about
- add_global_filter
- all_vm_rules
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- embedded_automation_manager
- availability_zone
- host_aggregate
Expand Down Expand Up @@ -190,7 +192,7 @@
:read_only: true
:miq_product_feature_identifiers:
- about
- automation_manager
- ems_automation
- embedded_automation_manager
- chargeback
- chargeback_reports
Expand Down Expand Up @@ -290,7 +292,9 @@
:miq_product_feature_identifiers:
- about
- all_vm_rules
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- ems_configuration
- configuration_profile
- configured_system
Expand Down Expand Up @@ -363,7 +367,9 @@
:miq_product_feature_identifiers:
- about
- all_vm_rules
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- embedded_automation_manager
- chargeback
- chargeback_reports
Expand Down Expand Up @@ -888,7 +894,9 @@
:miq_product_feature_identifiers:
- about
- all_vm_rules
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- embedded_automation_manager
- ems_physical_infra_console
- catalog_items_view
Expand Down Expand Up @@ -950,7 +958,9 @@
:miq_product_feature_identifiers:
- about
- all_vm_rules
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- ems_configuration
- configuration_profile
- configured_system
Expand Down Expand Up @@ -1016,7 +1026,9 @@
:read_only: true
:miq_product_feature_identifiers:
- about
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- embedded_automation_manager
- availability_zone
- host_aggregate
Expand Down Expand Up @@ -1080,7 +1092,9 @@
:read_only: true
:miq_product_feature_identifiers:
- about
- automation_manager
- ems_automation
- automation_manager_configured_system
- configuration_script
- embedded_automation_manager
- availability_zone
- host_aggregate
Expand Down
2 changes: 2 additions & 0 deletions locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1755,6 +1755,8 @@ en:
container_templates: Templates
custom_button: Button
custom_button_set: Button Group
ems_automation: Automation Manager
ems_automations: Automation Managers
ems_block_storage: Block Storage Manager
ems_block_storages: Block Storage Managers
ems_cloud: Cloud Provider
Expand Down

0 comments on commit 14682ff

Please sign in to comment.