Module: Glue::Candlepin::Owner::InstanceMethods

Defined in:
app/models/katello/glue/candlepin/owner.rb

Instance Method Summary collapse

Instance Method Details

#generate_debug_certObject



43
44
45
# File 'app/models/katello/glue/candlepin/owner.rb', line 43

def generate_debug_cert
  Resources::Candlepin::Owner.generate_ueber_cert(label)
end

#importsObject



53
54
55
# File 'app/models/katello/glue/candlepin/owner.rb', line 53

def imports
  Resources::Candlepin::Owner.imports(self.label)
end

#load_debug_certObject



47
48
49
50
51
# File 'app/models/katello/glue/candlepin/owner.rb', line 47

def load_debug_cert
  return Resources::Candlepin::Owner.get_ueber_cert(label)
rescue RestClient::ResourceNotFound
  return generate_debug_cert
end

#owner_detailsObject



23
24
25
# File 'app/models/katello/glue/candlepin/owner.rb', line 23

def owner_details
  Resources::Candlepin::Owner.find self.label
end

#owner_infoObject



19
20
21
# File 'app/models/katello/glue/candlepin/owner.rb', line 19

def owner_info
  Glue::Candlepin::OwnerInfo.new(self)
end

#pools(consumer_uuid = nil) ⇒ Object



35
36
37
38
39
40
41
# File 'app/models/katello/glue/candlepin/owner.rb', line 35

def pools(consumer_uuid = nil)
  if consumer_uuid
    Resources::Candlepin::Owner.pools self.label, :consumer => consumer_uuid
  else
    Resources::Candlepin::Owner.pools self.label
  end
end

#service_levelObject



27
28
29
# File 'app/models/katello/glue/candlepin/owner.rb', line 27

def service_level
  self.owner_details['defaultServiceLevel']
end

#service_level=(level) ⇒ Object



31
32
33
# File 'app/models/katello/glue/candlepin/owner.rb', line 31

def service_level=(level)
  Resources::Candlepin::Owner.update(self.label, :defaultServiceLevel => level)
end