Class: ForemanScapClient::BaseClient

Inherits:
Object
  • Object
show all
Defined in:
lib/foreman_scap_client/base_client.rb

Direct Known Subclasses

Client

Constant Summary collapse

CONFIG_FILE =
'/etc/foreman_scap_client/config.yaml'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



12
13
14
# File 'lib/foreman_scap_client/base_client.rb', line 12

def config
  @config
end

#policy_idObject (readonly)

Returns the value of attribute policy_id.



12
13
14
# File 'lib/foreman_scap_client/base_client.rb', line 12

def policy_id
  @policy_id
end

Instance Method Details

#run(policy_id, skip_upload = false) ⇒ Object



16
17
18
19
20
21
# File 'lib/foreman_scap_client/base_client.rb', line 16

def run(policy_id, skip_upload = false)
  @policy_id = policy_id
  load_config
  ensure_scan_files
  run_in_tmpdir skip_upload
end