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

Container Volumes should honour tag visibility #14517

Merged
merged 1 commit into from
Apr 24, 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
1 change: 1 addition & 0 deletions app/models/container_volume.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class ContainerVolume < ApplicationRecord
acts_as_miq_taggable
belongs_to :parent, :polymorphic => true
belongs_to :persistent_volume_claim, :dependent => :destroy
end
4 changes: 3 additions & 1 deletion lib/miq_expression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class MiqExpression
ContainerRoute
ContainerService
ContainerTemplate
PersistentVolume
Copy link
Member

Choose a reason for hiding this comment

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

s/Persistent/Container/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well actually I believe we want here PersistentVolume and not ContainerVolume which is the base class and basing reports on it will include other unrelated records (pods volumes).

ManageIQ::Providers::CloudManager
EmsCluster
EmsClusterPerformance
Expand Down Expand Up @@ -265,7 +266,8 @@ class MiqExpression
'ContainerReplicator' => 'container_replicator',
'ContainerRoute' => 'container_route',
'ContainerService' => 'container_service',
'ContainerTemplate' => 'container_template'
'ContainerTemplate' => 'container_template',
'PersistentVolume' => 'persistent_volume'
}
EXCLUDE_FROM_RELATS = {
"ManageIQ::Providers::CloudManager" => ["hosts", "ems_clusters", "resource_pools"]
Expand Down
1 change: 1 addition & 0 deletions lib/rbac/filterer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Filterer
ContainerRoute
ContainerService
ContainerTemplate
ContainerVolume
EmsCluster
EmsFolder
ExtManagementSystem
Expand Down