Class: OPNsenseAPI::Core::Firewall::AliasUtil
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Firewall::AliasUtil
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/firewall/alias_util.rb
Overview
NOTE: using ‘id` instead of `alias` as it is a reserved keyword
Constant Summary collapse
- BASE_PATH =
'/firewall/alias_util'
Instance Method Summary collapse
- #add(id:, body: {}) ⇒ Object
- #aliases(params = {}) ⇒ Object
- #delete(id:) ⇒ Object
- #find_references(body = {}) ⇒ Object
- #flush(id:, body: {}) ⇒ Object
- #list(id:, params: {}) ⇒ Object
- #update_bogons(params = {}) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#add(id:, body: {}) ⇒ Object
28 29 30 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 28 def add(id:, body: {}) @client.post("#{BASE_PATH}/add/#{id}", body) end |
#aliases(params = {}) ⇒ Object
32 33 34 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 32 def aliases(params = {}) @client.get("#{BASE_PATH}/aliases", params) end |
#delete(id:) ⇒ Object
36 37 38 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 36 def delete(id:) @client.post("#{BASE_PATH}/delete/#{id}") end |
#find_references(body = {}) ⇒ Object
40 41 42 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 40 def find_references(body = {}) @client.post("#{BASE_PATH}/findReferences", body) end |
#flush(id:, body: {}) ⇒ Object
44 45 46 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 44 def flush(id:, body: {}) @client.post("#{BASE_PATH}/flush/#{id}", body) end |
#list(id:, params: {}) ⇒ Object
48 49 50 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 48 def list(id:, params: {}) @client.get("#{BASE_PATH}/list/#{id}", params) end |
#update_bogons(params = {}) ⇒ Object
52 53 54 |
# File 'lib/opnsense_api/core/firewall/alias_util.rb', line 52 def update_bogons(params = {}) @client.get("#{BASE_PATH}/updateBogons", params) end |