Module: ForemanOpenscap::OvalFacetHostExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb

Instance Method Summary collapse

Instance Method Details

#combined_oval_policiesObject



24
25
26
27
28
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 24

def combined_oval_policies
  combined = oval_policies
  combined += hostgroup.oval_policies + hostgroup.inherited_oval_policies if hostgroup
  combined.uniq
end

#cves_with_errataObject



20
21
22
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 20

def cves_with_errata
  cves.where(:has_errata => true)
end

#cves_without_errataObject



16
17
18
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 16

def cves_without_errata
  cves.where(:has_errata => false)
end

#oval_policies_encObject



34
35
36
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 34

def oval_policies_enc
  oval_policies_enc_raw.to_json
end

#oval_policies_enc_rawObject



30
31
32
# File 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb', line 30

def oval_policies_enc_raw
  combined_oval_policies.map(&:to_enc)
end