Class: ForemanOpenscap::OvalPolicy
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ForemanOpenscap::OvalPolicy
show all
- Includes:
- Authorizable, PolicyCommon, Taxonomix
- Defined in:
- app/models/foreman_openscap/oval_policy.rb
Instance Method Summary
collapse
#cron_line_split, #update_period_attrs, #valid_cron_line, #valid_day_of_month, #valid_weekday
Instance Method Details
#host_ids=(host_ids) ⇒ Object
29
30
31
|
# File 'app/models/foreman_openscap/oval_policy.rb', line 29
def host_ids=(host_ids)
self.oval_facets = facets_to_assign(host_ids, :host_id, ForemanOpenscap::Host::OvalFacet)
end
|
#hostgroup_ids=(hostgroup_ids) ⇒ Object
33
34
35
|
# File 'app/models/foreman_openscap/oval_policy.rb', line 33
def hostgroup_ids=(hostgroup_ids)
self.hostgroup_oval_facets = facets_to_assign(hostgroup_ids, :hostgroup_id, ForemanOpenscap::Hostgroup::OvalFacet)
end
|
#to_enc ⇒ Object
37
38
39
40
41
42
43
|
# File 'app/models/foreman_openscap/oval_policy.rb', line 37
def to_enc
{
:id => id,
:oval_content_path => "/var/lib/openscap/oval_content/#{oval_content.digest}.oval.xml.bz2",
:download_path => "/compliance/oval_policies/#{id}/oval_content/#{oval_content.digest}"
}.merge(period_enc).with_indifferent_access
end
|