Class: Katello::Pulp::Consumer
- Inherits:
-
Object
- Object
- Katello::Pulp::Consumer
- Includes:
- LazyAccessor
- Defined in:
- app/services/katello/pulp/consumer.rb
Instance Attribute Summary collapse
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
- #applicable_errata_ids ⇒ Object
- #bind_yum_repositories(ids) ⇒ Object
- #bound_yum_repositories ⇒ Object
-
#initialize(uuid) ⇒ Consumer
constructor
A new instance of Consumer.
- #upload_package_profile(profile) ⇒ Object
Methods included from LazyAccessor
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
#uuid ⇒ Object
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_ids ⇒ Object
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_repositories ⇒ Object
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 |