Sha256: a06d774014d22cb84dc0e272d724f8aa06d94ac52f2c88246dd152eb0be117a9

Contents?: true

Size: 971 Bytes

Versions: 91

Compression:

Stored size: 971 Bytes

Contents

module Katello
  class HostStatusManager
    STATUSES = [
      Katello::ErrataStatus,
      Katello::SubscriptionStatus,
      Katello::PurposeSlaStatus,
      Katello::PurposeRoleStatus,
      Katello::PurposeUsageStatus,
      Katello::PurposeAddonsStatus,
      Katello::PurposeStatus,
      Katello::TraceStatus].freeze

    PURPOSE_STATUS = [
      Katello::PurposeStatus,
      Katello::PurposeAddonsStatus,
      Katello::PurposeRoleStatus,
      Katello::PurposeSlaStatus,
      Katello::PurposeUsageStatus].freeze

    def self.update_subscription_status_to_sca(hosts)
      HostStatus::Status.where(host: hosts, type: Katello::SubscriptionStatus.to_s).update(status: Katello::SubscriptionStatus::DISABLED)
    end

    def self.clear_syspurpose_status(hosts)
      host_purpose = HostStatus::Status.where(type: ::Katello::HostStatusManager::PURPOSE_STATUS.map(&:to_s)).where('host_id in (?)', hosts.pluck(:id))
      host_purpose.destroy_all
    end
  end
end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
katello-4.10.0 app/services/katello/host_status_manager.rb
katello-4.9.2 app/services/katello/host_status_manager.rb
katello-4.10.0.rc2 app/services/katello/host_status_manager.rb
katello-4.10.0.rc1 app/services/katello/host_status_manager.rb
katello-4.8.4 app/services/katello/host_status_manager.rb
katello-4.9.1 app/services/katello/host_status_manager.rb
katello-4.8.3 app/services/katello/host_status_manager.rb
katello-4.9.0 app/services/katello/host_status_manager.rb
katello-4.7.6 app/services/katello/host_status_manager.rb
katello-4.8.2 app/services/katello/host_status_manager.rb
katello-4.9.0.rc2 app/services/katello/host_status_manager.rb
katello-4.9.0.rc1 app/services/katello/host_status_manager.rb
katello-4.8.1 app/services/katello/host_status_manager.rb
katello-4.7.5 app/services/katello/host_status_manager.rb
katello-4.8.0 app/services/katello/host_status_manager.rb
katello-4.8.0.rc2 app/services/katello/host_status_manager.rb
katello-4.7.4 app/services/katello/host_status_manager.rb
katello-4.8.0.rc1 app/services/katello/host_status_manager.rb
katello-4.7.3 app/services/katello/host_status_manager.rb
katello-4.7.2 app/services/katello/host_status_manager.rb