Class: OPNsenseAPI::Core::TrafficShaping::Settings
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::TrafficShaping::Settings
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/traffic_shaping/settings.rb
Overview
Constant Summary collapse
- BASE_PATH =
'/trafficshaper/settings'
Instance Method Summary collapse
- #add_pipe(body = {}) ⇒ Object
- #add_queue(body = {}) ⇒ Object
- #add_rule(body = {}) ⇒ Object
- #del_pipe(body = {}, uuid:) ⇒ Object
- #del_queue(body = {}, uuid:) ⇒ Object
- #del_rule(body = {}, uuid:) ⇒ Object
- #get(params = {}) ⇒ Object
- #get_pipe(params = {}, uuid: nil) ⇒ Object
- #get_queue(params = {}, uuid: nil) ⇒ Object
- #get_rule(params = {}, uuid: nil) ⇒ Object
- #search_pipes(body = {}) ⇒ Object
- #search_queues(body = {}) ⇒ Object
- #search_rules(body = {}) ⇒ Object
- #set(body = {}) ⇒ Object
- #set_pipe(body = {}, uuid:) ⇒ Object
- #set_queue(body = {}, uuid:) ⇒ Object
- #set_rule(body = {}, uuid:) ⇒ Object
- #toggle_pipe(body = {}, uuid:, enabled: nil) ⇒ Object
- #toggle_queue(body = {}, uuid:, enabled: nil) ⇒ Object
- #toggle_rule(body = {}, uuid:, enabled: nil) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#add_pipe(body = {}) ⇒ Object
27 28 29 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 27 def add_pipe(body = {}) @client.post("#{BASE_PATH}/addPipe", body) end |
#add_queue(body = {}) ⇒ Object
31 32 33 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 31 def add_queue(body = {}) @client.post("#{BASE_PATH}/addQueue", body) end |
#add_rule(body = {}) ⇒ Object
35 36 37 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 35 def add_rule(body = {}) @client.post("#{BASE_PATH}/addRule", body) end |
#del_pipe(body = {}, uuid:) ⇒ Object
39 40 41 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 39 def del_pipe(body = {}, uuid:) @client.post("#{BASE_PATH}/delPipe/#{uuid}", body) end |
#del_queue(body = {}, uuid:) ⇒ Object
43 44 45 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 43 def del_queue(body = {}, uuid:) @client.post("#{BASE_PATH}/delQueue/#{uuid}", body) end |
#del_rule(body = {}, uuid:) ⇒ Object
47 48 49 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 47 def del_rule(body = {}, uuid:) @client.post("#{BASE_PATH}/delRule/#{uuid}", body) end |
#get(params = {}) ⇒ Object
51 52 53 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 51 def get(params = {}) @client.get("#{BASE_PATH}/get", params) end |
#get_pipe(params = {}, uuid: nil) ⇒ Object
55 56 57 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 55 def get_pipe(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getPipe/#{uuid}", params) end |
#get_queue(params = {}, uuid: nil) ⇒ Object
59 60 61 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 59 def get_queue(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getQueue/#{uuid}", params) end |
#get_rule(params = {}, uuid: nil) ⇒ Object
63 64 65 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 63 def get_rule(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getRule/#{uuid}", params) end |
#search_pipes(body = {}) ⇒ Object
67 68 69 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 67 def search_pipes(body = {}) @client.post("#{BASE_PATH}/searchPipes", body) end |
#search_queues(body = {}) ⇒ Object
71 72 73 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 71 def search_queues(body = {}) @client.post("#{BASE_PATH}/searchQueues", body) end |
#search_rules(body = {}) ⇒ Object
75 76 77 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 75 def search_rules(body = {}) @client.post("#{BASE_PATH}/searchRules", body) end |
#set(body = {}) ⇒ Object
79 80 81 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 79 def set(body = {}) @client.post("#{BASE_PATH}/set", body) end |
#set_pipe(body = {}, uuid:) ⇒ Object
83 84 85 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 83 def set_pipe(body = {}, uuid:) @client.post("#{BASE_PATH}/setPipe/#{uuid}", body) end |
#set_queue(body = {}, uuid:) ⇒ Object
87 88 89 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 87 def set_queue(body = {}, uuid:) @client.post("#{BASE_PATH}/setQueue/#{uuid}", body) end |
#set_rule(body = {}, uuid:) ⇒ Object
91 92 93 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 91 def set_rule(body = {}, uuid:) @client.post("#{BASE_PATH}/setRule/#{uuid}", body) end |
#toggle_pipe(body = {}, uuid:, enabled: nil) ⇒ Object
95 96 97 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 95 def toggle_pipe(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/togglePipe/#{uuid}/#{enabled}", body) end |
#toggle_queue(body = {}, uuid:, enabled: nil) ⇒ Object
99 100 101 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 99 def toggle_queue(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleQueue/#{uuid}/#{enabled}", body) end |
#toggle_rule(body = {}, uuid:, enabled: nil) ⇒ Object
103 104 105 |
# File 'lib/opnsense_api/core/traffic_shaping/settings.rb', line 103 def toggle_rule(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleRule/#{uuid}/#{enabled}", body) end |