Class: OPNsenseAPI::Core::Syslog::Settings

Inherits:
Object
  • Object
show all
Includes:
OPNsenseAPI::Core
Defined in:
lib/opnsense_api/core/syslog/settings.rb

Overview

Constant Summary collapse

BASE_PATH =
'/syslog/settings'

Instance Method Summary collapse

Methods included from OPNsenseAPI::Core

#initialize

Instance Method Details

#add_destination(body = {}) ⇒ Object



27
28
29
# File 'lib/opnsense_api/core/syslog/settings.rb', line 27

def add_destination(body = {})
  @client.post("#{BASE_PATH}/addDestination", body)
end

#del_destination(body = {}) ⇒ Object



31
32
33
# File 'lib/opnsense_api/core/syslog/settings.rb', line 31

def del_destination(body = {})
  @client.post("#{BASE_PATH}/delDestination", body)
end

#get(params = {}) ⇒ Object



35
36
37
# File 'lib/opnsense_api/core/syslog/settings.rb', line 35

def get(params = {})
  @client.get("#{BASE_PATH}/get", params)
end

#get_destination(params = {}) ⇒ Object



39
40
41
# File 'lib/opnsense_api/core/syslog/settings.rb', line 39

def get_destination(params = {})
  @client.get("#{BASE_PATH}/getDestination", params)
end

#search_destination(body = {}) ⇒ Object



43
44
45
# File 'lib/opnsense_api/core/syslog/settings.rb', line 43

def search_destination(body = {})
  @client.post("#{BASE_PATH}/searchDestination", body)
end

#set(body = {}) ⇒ Object



47
48
49
# File 'lib/opnsense_api/core/syslog/settings.rb', line 47

def set(body = {})
  @client.post("#{BASE_PATH}/set", body)
end

#set_destination(body = {}, uuid:) ⇒ Object



51
52
53
# File 'lib/opnsense_api/core/syslog/settings.rb', line 51

def set_destination(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setDestination/#{uuid}", body)
end

#toggle_destination(body = {}, uuid:, enabled: nil) ⇒ Object



55
56
57
# File 'lib/opnsense_api/core/syslog/settings.rb', line 55

def toggle_destination(body = {}, uuid:, enabled: nil)
  @client.post("#{BASE_PATH}/toggleDestination/#{uuid}/#{enabled}", body)
end