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

[WIP] hide ancestry from the api #20936

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions app/models/miq_ae_namespace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class MiqAeNamespace < ApplicationRecord
has_ancestry
hide_attribute :ancestry

include MiqAeSetUserInfoMixin
include MiqAeYamlImportExportMixin
include RelativePathMixin
Expand Down
1 change: 1 addition & 0 deletions app/models/orchestration_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class OrchestrationStack < ApplicationRecord
acts_as_miq_taggable

has_ancestry
hide_attribute :ancestry

belongs_to :ext_management_system, :foreign_key => :ems_id
belongs_to :tenant
Expand Down
1 change: 1 addition & 0 deletions app/models/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

class Relationship < ApplicationRecord
has_ancestry
hide_attribute :ancestry

belongs_to :resource, :polymorphic => true

Expand Down
1 change: 1 addition & 0 deletions app/models/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Service < ApplicationRecord
}.freeze

has_ancestry :orphan_strategy => :destroy
hide_attribute :ancestry

belongs_to :service_template # Template this service was cloned from
belongs_to :tenant
Expand Down
1 change: 1 addition & 0 deletions app/models/tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Tenant < ApplicationRecord
before_destroy :ensure_can_be_destroyed

has_ancestry(:orphan_strategy => :restrict)
hide_attribute :ancestry

has_many :providers
has_many :ext_management_systems
Expand Down