Project

General

Profile

« Previous | Next » 

Revision b5cdd39a

Added by Justin Sherrill almost 10 years ago

fixes #6330 - using pulp & pulp_node features of smart proxy

  • to determine the default smart proxy
  • to determine whether to show the lifecycle env selection screen
  • to determine which proxies to who under the content source selection

View differences:

app/models/katello/concerns/smart_proxy_extensions.rb
module SmartProxyExtensions
extend ActiveSupport::Concern
PULP_FEATURE = "Pulp"
PULP_NODE_FEATURE = "Pulp Node"
included do
before_create :associate_organizations
before_create :associate_default_location
......
:inverse_of => :content_source
has_many :hostgroups, :class_name => "::Hostgroup", :foreign_key => :content_source_id,
:inverse_of => :content_source
scope :with_content, with_features(PULP_FEATURE, PULP_NODE_FEATURE)
end
def default_capsule?
server_fqdn = Facter.value(:fqdn) || SETTINGS[:fqdn]
self.name == server_fqdn
self.features.pluck(:name).include?(PULP_FEATURE)
end
def associate_organizations

Also available in: Unified diff