Class: OPNsenseAPI::Core::Diagnostics::Firewall
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Diagnostics::Firewall
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/diagnostics/firewall.rb
Constant Summary collapse
- BASE_PATH =
'/diagnostics/firewall'
Instance Method Summary collapse
- #del_state(stateid:, creatorid:) ⇒ Object
- #flush_sources(body = {}) ⇒ Object
- #flush_states(body = {}) ⇒ Object
- #kill_states(body = {}) ⇒ Object
- #list_rule_ids(params = {}) ⇒ Object
- #log(params = {}) ⇒ Object
- #log_filters(params = {}) ⇒ Object
- #pf_statistics(section: nil) ⇒ Object
- #query_pf_top(body = {}) ⇒ Object
- #query_states(body = {}) ⇒ Object
- #stats(params = {}) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#del_state(stateid:, creatorid:) ⇒ Object
26 27 28 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 26 def del_state(stateid:, creatorid:) @client.post("#{BASE_PATH}/delState/#{stateid}/#{creatorid}") end |
#flush_sources(body = {}) ⇒ Object
30 31 32 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 30 def flush_sources(body = {}) @client.post("#{BASE_PATH}/flushSources", body) end |
#flush_states(body = {}) ⇒ Object
34 35 36 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 34 def flush_states(body = {}) @client.post("#{BASE_PATH}/flushStates", body) end |
#kill_states(body = {}) ⇒ Object
38 39 40 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 38 def kill_states(body = {}) @client.post("#{BASE_PATH}/killStates", body) end |
#list_rule_ids(params = {}) ⇒ Object
42 43 44 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 42 def list_rule_ids(params = {}) @client.post("#{BASE_PATH}/listRuleIds", params) end |
#log(params = {}) ⇒ Object
46 47 48 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 46 def log(params = {}) @client.get("#{BASE_PATH}/log", params) end |
#log_filters(params = {}) ⇒ Object
50 51 52 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 50 def log_filters(params = {}) @client.get("#{BASE_PATH}/logFilters", params) end |
#pf_statistics(section: nil) ⇒ Object
54 55 56 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 54 def pf_statistics(section: nil) @client.get("#{BASE_PATH}/pfStatistics/#{section}") end |
#query_pf_top(body = {}) ⇒ Object
58 59 60 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 58 def query_pf_top(body = {}) @client.post("#{BASE_PATH}/queryPfTop", body) end |
#query_states(body = {}) ⇒ Object
62 63 64 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 62 def query_states(body = {}) @client.post("#{BASE_PATH}/queryStates", body) end |
#stats(params = {}) ⇒ Object
66 67 68 |
# File 'lib/opnsense_api/core/diagnostics/firewall.rb', line 66 def stats(params = {}) @client.get("#{BASE_PATH}/stats", params) end |