Sha256: 0be019f5fab0e09b2f18bc30d3e660d0d3beea03f2f898318ef7dc70f97ef062
Contents?: true
Size: 939 Bytes
Versions: 15
Compression:
Stored size: 939 Bytes
Contents
module Katello class PurposeAddonsStatus < HostStatus::Status VALID = 0 INVALID = 1 UNKNOWN = 2 def self.status_name N_('Addons') end def self.humanized_name 'purpose_addons' end def to_label(_options = {}) case status when VALID N_('Matched') when INVALID N_('Mismatched') else N_('Unknown') end end def to_status(options = {}) return UNKNOWN unless relevant? status_override = options[:status_override] return INVALID if status_override == false return VALID if status_override || consumer.compliant_addons? INVALID end def relevant?(_options = {}) host.subscription_facet.try(:uuid) end def substatus?(_options = {}) true end def consumer Katello::Candlepin::Consumer.new(host.subscription_facet.uuid, host.organization.label) end end end
Version data entries
15 entries across 15 versions & 1 rubygems