Class: OPNsenseAPI::Core::Unbound::Settings
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Unbound::Settings
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/unbound/settings.rb
Overview
Constant Summary collapse
- BASE_PATH =
'/diagnostics/settings'
Instance Method Summary collapse
- #add_domain_override(body = {}) ⇒ Object
- #add_forward(body = {}) ⇒ Object
- #add_host_alias(body = {}) ⇒ Object
- #add_host_override(body = {}) ⇒ Object
- #del_domain_override(body = {}, uuid:) ⇒ Object
- #del_forward(body = {}, uuid:) ⇒ Object
- #del_host_alias(body = {}, uuid:) ⇒ Object
- #del_host_override(body = {}, uuid:) ⇒ Object
- #get(params = {}) ⇒ Object
- #get_domain_override(params = {}, uuid: nil) ⇒ Object
- #get_forward(params = {}, uuid: nil) ⇒ Object
- #get_host_alias(params = {}, uuid: nil) ⇒ Object
- #get_host_override(params = {}, uuid: nil) ⇒ Object
- #get_nameservers(params = {}) ⇒ Object
- #search_domain_override(body = {}) ⇒ Object
- #search_forward(body = {}) ⇒ Object
- #search_host_alias(body = {}) ⇒ Object
- #search_host_override(body = {}) ⇒ Object
- #set(body = {}) ⇒ Object
- #set_domain_override(body = {}, uuid:) ⇒ Object
- #set_forward(body = {}, uuid:) ⇒ Object
- #set_host_alias(body = {}, uuid:) ⇒ Object
- #set_host_override(body = {}, uuid:) ⇒ Object
- #toggle_domain_override(body = {}, uuid:, enabled: nil) ⇒ Object
- #toggle_forward(body = {}, uuid:, enabled: nil) ⇒ Object
- #toggle_host_alias(body = {}, uuid:, enabled: nil) ⇒ Object
- #toggle_host_override(body = {}, uuid:, enabled: nil) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#add_domain_override(body = {}) ⇒ Object
27 28 29 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 27 def add_domain_override(body = {}) @client.post("#{BASE_PATH}/addDomainOverride", body) end |
#add_forward(body = {}) ⇒ Object
31 32 33 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 31 def add_forward(body = {}) @client.post("#{BASE_PATH}/addForward", body) end |
#add_host_alias(body = {}) ⇒ Object
35 36 37 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 35 def add_host_alias(body = {}) @client.post("#{BASE_PATH}/addHostAlias", body) end |
#add_host_override(body = {}) ⇒ Object
39 40 41 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 39 def add_host_override(body = {}) @client.post("#{BASE_PATH}/addHostOverride", body) end |
#del_domain_override(body = {}, uuid:) ⇒ Object
43 44 45 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 43 def del_domain_override(body = {}, uuid:) @client.post("#{BASE_PATH}/delDomainOverride/#{uuid}", body) end |
#del_forward(body = {}, uuid:) ⇒ Object
47 48 49 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 47 def del_forward(body = {}, uuid:) @client.post("#{BASE_PATH}/delForward/#{uuid}", body) end |
#del_host_alias(body = {}, uuid:) ⇒ Object
51 52 53 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 51 def del_host_alias(body = {}, uuid:) @client.post("#{BASE_PATH}/delHostAlias/#{uuid}", body) end |
#del_host_override(body = {}, uuid:) ⇒ Object
55 56 57 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 55 def del_host_override(body = {}, uuid:) @client.post("#{BASE_PATH}/delHostOverride/#{uuid}", body) end |
#get(params = {}) ⇒ Object
59 60 61 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 59 def get(params = {}) @client.get("#{BASE_PATH}/get", params) end |
#get_domain_override(params = {}, uuid: nil) ⇒ Object
63 64 65 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 63 def get_domain_override(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getDomainOverride/#{uuid}", params) end |
#get_forward(params = {}, uuid: nil) ⇒ Object
67 68 69 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 67 def get_forward(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getForward/#{uuid}", params) end |
#get_host_alias(params = {}, uuid: nil) ⇒ Object
71 72 73 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 71 def get_host_alias(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getHostAlias/#{uuid}", params) end |
#get_host_override(params = {}, uuid: nil) ⇒ Object
75 76 77 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 75 def get_host_override(params = {}, uuid: nil) @client.get("#{BASE_PATH}/getHostOverride/#{uuid}", params) end |
#get_nameservers(params = {}) ⇒ Object
79 80 81 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 79 def get_nameservers(params = {}) @client.get("#{BASE_PATH}/getNameservers", params) end |
#search_domain_override(body = {}) ⇒ Object
83 84 85 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 83 def search_domain_override(body = {}) @client.post("#{BASE_PATH}/searchDomainOverride", body) end |
#search_forward(body = {}) ⇒ Object
87 88 89 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 87 def search_forward(body = {}) @client.post("#{BASE_PATH}/searchForward", body) end |
#search_host_alias(body = {}) ⇒ Object
91 92 93 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 91 def search_host_alias(body = {}) @client.post("#{BASE_PATH}/searchHostAlias", body) end |
#search_host_override(body = {}) ⇒ Object
95 96 97 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 95 def search_host_override(body = {}) @client.post("#{BASE_PATH}/searchHostOverride", body) end |
#set(body = {}) ⇒ Object
99 100 101 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 99 def set(body = {}) @client.post("#{BASE_PATH}/set", body) end |
#set_domain_override(body = {}, uuid:) ⇒ Object
103 104 105 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 103 def set_domain_override(body = {}, uuid:) @client.post("#{BASE_PATH}/setDomainOverride/#{uuid}", body) end |
#set_forward(body = {}, uuid:) ⇒ Object
107 108 109 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 107 def set_forward(body = {}, uuid:) @client.post("#{BASE_PATH}/setForward/#{uuid}", body) end |
#set_host_alias(body = {}, uuid:) ⇒ Object
111 112 113 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 111 def set_host_alias(body = {}, uuid:) @client.post("#{BASE_PATH}/setHostAlias/#{uuid}", body) end |
#set_host_override(body = {}, uuid:) ⇒ Object
115 116 117 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 115 def set_host_override(body = {}, uuid:) @client.post("#{BASE_PATH}/setHostOverride/#{uuid}", body) end |
#toggle_domain_override(body = {}, uuid:, enabled: nil) ⇒ Object
119 120 121 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 119 def toggle_domain_override(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleDomainOverride/#{uuid}/#{enabled}", body) end |
#toggle_forward(body = {}, uuid:, enabled: nil) ⇒ Object
123 124 125 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 123 def toggle_forward(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleForward/#{uuid}/#{enabled}", body) end |
#toggle_host_alias(body = {}, uuid:, enabled: nil) ⇒ Object
127 128 129 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 127 def toggle_host_alias(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleHostAlias/#{uuid}/#{enabled}", body) end |
#toggle_host_override(body = {}, uuid:, enabled: nil) ⇒ Object
131 132 133 |
# File 'lib/opnsense_api/core/unbound/settings.rb', line 131 def toggle_host_override(body = {}, uuid:, enabled: nil) @client.post("#{BASE_PATH}/toggleHostOverride/#{uuid}/#{enabled}", body) end |