Class: TCellAgent::Policies::SystemEnablements

Inherits:
Policy
  • Object
show all
Defined in:
lib/tcell_agent/policies/system_enablements.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(native_agent, enablements) ⇒ SystemEnablements

Returns a new instance of SystemEnablements.



13
14
15
16
17
# File 'lib/tcell_agent/policies/system_enablements.rb', line 13

def initialize(native_agent, enablements)
  @native_agent = native_agent
  @send_routes_enabled = true
  update_enablements(enablements)
end

Instance Attribute Details

#send_lfi_path_discoveryObject

Returns the value of attribute send_lfi_path_discovery.



10
11
12
# File 'lib/tcell_agent/policies/system_enablements.rb', line 10

def send_lfi_path_discovery
  @send_lfi_path_discovery
end

#send_routes_enabledObject

Returns the value of attribute send_routes_enabled.



10
11
12
# File 'lib/tcell_agent/policies/system_enablements.rb', line 10

def send_routes_enabled
  @send_routes_enabled
end

Class Method Details

.api_identifierObject



6
7
8
# File 'lib/tcell_agent/policies/system_enablements.rb', line 6

def self.api_identifier
  'systemEnablement'
end

Instance Method Details

#update_enablements(enablements) ⇒ Object



19
20
21
22
23
24
# File 'lib/tcell_agent/policies/system_enablements.rb', line 19

def update_enablements(enablements)
  enablements ||= {}

  @send_routes_enabled = enablements['system_send_routes'] || true
  @send_lfi_path_discovery = enablements['send_lfi_path_discovery'] || true
end