Sha256: 20110fc5bb17076bd5651b3522417918c8b13589c79567c592bc9e1fadf1f890

Contents?: true

Size: 666 Bytes

Versions: 16

Compression:

Stored size: 666 Bytes

Contents

module ForemanOpenscap
  class TailoringFile < ApplicationRecord
    audited :except => [:scap_file]
    include Authorizable
    include Taxonomix
    include DataStreamContent

    has_many :policies
    has_many :scap_content_profiles, :dependent => :destroy
    validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 255 }

    scoped_search :on => :name,              :complete_value => true
    scoped_search :on => :original_filename, :complete_value => true, :rename => :filename

    def fetch_profiles
      api = ProxyAPI::Openscap.new(:url => proxy_url)
      api.fetch_profiles_for_tailoring_file(scap_file)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_openscap-0.12.3 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.5 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.12.2 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.12.1 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.12.0 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.4 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.3 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.2 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.1 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.11.0 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.10.4 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.10.3 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.10.2 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.10.1 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.9.3 app/models/foreman_openscap/tailoring_file.rb
foreman_openscap-0.10.0 app/models/foreman_openscap/tailoring_file.rb