Class: Katello::Pulp::Consumer

Inherits:
Object
  • Object
show all
Includes:
LazyAccessor
Defined in:
app/services/katello/pulp/consumer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from LazyAccessor

included

Constructor Details

#initialize(uuid) ⇒ Consumer

Returns a new instance of Consumer.



15
16
17
# File 'app/services/katello/pulp/consumer.rb', line 15

def initialize(uuid)
  self.uuid = uuid
end

Instance Attribute Details

#uuidObject

Returns the value of attribute uuid.



6
7
8
# File 'app/services/katello/pulp/consumer.rb', line 6

def uuid
  @uuid
end

Instance Method Details

#applicable_errata_idsObject



23
24
25
26
27
# File 'app/services/katello/pulp/consumer.rb', line 23

def applicable_errata_ids
  response = Katello.pulp_server.extensions.consumer.applicable_errata([self.uuid])
  return [] if response.empty?
  response[0]['applicability']['erratum'] || []
end

#bind_yum_repositories(ids) ⇒ Object



29
30
31
# File 'app/services/katello/pulp/consumer.rb', line 29

def bind_yum_repositories(ids)
  bind_repos(Runcible::Models::YumDistributor.type_id, bound_yum_repositories, ids, :notify_agent => false)
end

#bound_yum_repositoriesObject



33
34
35
# File 'app/services/katello/pulp/consumer.rb', line 33

def bound_yum_repositories
  bindings(Runcible::Models::YumDistributor.type_id)
end

#upload_package_profile(profile) ⇒ Object



19
20
21
# File 'app/services/katello/pulp/consumer.rb', line 19

def upload_package_profile(profile)
  Katello.pulp_server.extensions.consumer.upload_profile(self.uuid, 'rpm', profile)
end