Sha256: c24a125505b2bc119265b3566348815360c298215f31147f2fc54be3df74f312

Contents?: true

Size: 1.17 KB

Versions: 2

Compression:

Stored size: 1.17 KB

Contents

class Setting::RhCloud < Setting
  ::Setting::BLANK_ATTRS.concat %w{rh_cloud_token}

  def self.default_settings
    return unless ActiveRecord::Base.connection.table_exists?('settings')
    return unless super
    [
      set('allow_auto_inventory_upload', N_('Allow automatic upload of the host inventory to the Red Hat cloud'), false, N_('Allow automatic inventory uploads')),
      set('allow_auto_insights_sync', N_('Allow recommendations synchronization from Red Hat cloud'), false, N_('Allow recommendations synchronization')),
      set('obfuscate_inventory_hostnames', N_('Obfuscate host names sent to Red Hat cloud'), false, N_('Obfuscate host names')),
      set('obfuscate_inventory_ips', N_('Obfuscate ip addresses sent to Red Hat cloud'), false, N_('Obfuscate IPs')),
      set('rh_cloud_token', N_('Authentication token to Red Hat cloud services. Used to authenticate requests to cloud APIs'), nil, N_('Red Hat Cloud token'), nil, encrypted: true),
      set('exclude_installed_packages', N_('Exclude installed packages from Red Hat cloud inventory report'), false, N_("Don't upload installed packages")),
    ]
  end

  def self.humanized_category
    N_('RH Cloud')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.16 app/models/setting/rh_cloud.rb
foreman_rh_cloud-3.0.15 app/models/setting/rh_cloud.rb