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

Update resource pool feature identifiers to infrastructure-specific #718

Merged

Conversation

Guddetisandeep
Copy link
Contributor

@Guddetisandeep Guddetisandeep commented Feb 19, 2024

Dependent PR for enabling Resource Pool feature under Clouds section(Compute > Clouds > Resource Pools)

Comment on lines 16 to 14
FEATURE_MAPPING_CREATE = {
"resource_pool_infra" => {:name => "Infrastructure Resource Pools", :description => "Access Everything under Infrastructure Resource Pools", :feature_type => "node"},
"resource_pool_infra_view" => {:name => "View", :description => "Display Lists of Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra"},
"resource_pool_infra_show_list" => {:name => "List", :description => "Display Lists of Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra_view"},
"resource_pool_infra_show" => {:name => "Show", :description => "Display Individual Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra_view"},
"resource_pool_infra_control" => {:name => "Operate", :description => "Perform Operations on Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra"},
"resource_pool_infra_tag" => {:name => "Edit Tags", :description => "Edit Tags of Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra_control"},
"resource_pool_infra_protect" => {:name => "Manage Policies", :description => "Manage Policies of Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra_control"},
"resource_pool_infra_admin" => {:name => "Modify", :description => "Modify Infrastructure Resource Pools", :feature_type => "admin", :parent => "resource_pool_infra"},
"resource_pool_infra_delete" => {:name => "Remove", :description => "Remove Infrastructure Resource Pools", :feature_type => "admin", :parent => "resource_pool_infra_admin"}
}.freeze
Copy link
Member

Choose a reason for hiding this comment

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

@Guddetisandeep you don't need to create the new features in this PR, that will be done when we seed the database. The only reason we need schema migration for existing product features is because users might have used the existing records for user/group permissions already and we can't just delete them.

Comment on lines 4 to 14
FEATURE_MAPPING_UPDATE = {
'resource_pool' => 'resource_pool_cloud',
'resource_pool_view' => 'resource_pool_cloud_view',
'resource_pool_show_list' => 'resource_pool_cloud_show_list',
'resource_pool_show' => 'resource_pool_cloud_show',
'resource_pool_control' => 'resource_pool_cloud_control',
'resource_pool_tag' => 'resource_pool_cloud_tag',
'resource_pool_protect' => 'resource_pool_cloud_protect',
'resource_pool_admin' => 'resource_pool_cloud_admin',
'resource_pool_delete' => 'resource_pool_cloud_delete'
}.freeze
Copy link
Member

Choose a reason for hiding this comment

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

@Guddetisandeep since the existing product feature was for infrastructure providers we should update the existing records to _infra not _cloud

@Guddetisandeep Guddetisandeep force-pushed the update_resource_pool_identifiers branch from f52eb46 to 81dcc8b Compare May 16, 2024 14:50
@miq-bot
Copy link
Member

miq-bot commented May 16, 2024

Checked commit Guddetisandeep@81dcc8b with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@kbrock
Copy link
Member

kbrock commented Jul 29, 2024

@Guddetisandeep Do we still need these PRs now that you are using collection class?

@Guddetisandeep
Copy link
Contributor Author

@Guddetisandeep Do we still need these PRs now that you are using collection class?

These PRs are essential as they separate the Cloud and Infrastructure resource pools, ensuring they are displayed separately on the UI.
This schema PR is necessary to resolve the navigation issue mentioned in the UI PR. By separating the Cloud and Infra resource pools, this PR addresses the navigation issues I faced when using the old resource pool identifiers on the UI.

@agrare agrare merged commit 2b2c76d into ManageIQ:master Aug 22, 2024
3 checks passed
agrare added a commit to agrare/manageiq-schema that referenced this pull request Aug 30, 2024
…source_pool_identifiers"

This reverts commit 2b2c76d, reversing
changes made to 075c33a.
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.

5 participants