Class: OPNsenseAPI::Core::OpenVPN::Export
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::OpenVPN::Export
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/open_vpn/export.rb
Overview
Constant Summary collapse
- BASE_PATH =
'/openvpn/export'
Instance Method Summary collapse
- #accounts(params = {}, vpnid: nil) ⇒ Object
- #download(body = {}, vpnid:, certref: nil) ⇒ Object
- #providers(params = {}) ⇒ Object
- #store_presets(body = {}, vpnid:) ⇒ Object
- #templates(params = {}) ⇒ Object
- #validate_presets(body = {}, vpnid:) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#accounts(params = {}, vpnid: nil) ⇒ Object
27 28 29 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 27 def accounts(params = {}, vpnid: nil) @client.get("#{BASE_PATH}/accounts/#{vpnid}", params) end |
#download(body = {}, vpnid:, certref: nil) ⇒ Object
31 32 33 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 31 def download(body = {}, vpnid:, certref: nil) @client.post("#{BASE_PATH}/download/#{vpnid}/#{certref}", body) end |
#providers(params = {}) ⇒ Object
35 36 37 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 35 def providers(params = {}) @client.get("#{BASE_PATH}/providers", params) end |
#store_presets(body = {}, vpnid:) ⇒ Object
39 40 41 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 39 def store_presets(body = {}, vpnid:) @client.post("#{BASE_PATH}/storePresets/#{vpnid}", body) end |
#templates(params = {}) ⇒ Object
43 44 45 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 43 def templates(params = {}) @client.get("#{BASE_PATH}/templates", params) end |
#validate_presets(body = {}, vpnid:) ⇒ Object
47 48 49 |
# File 'lib/opnsense_api/core/open_vpn/export.rb', line 47 def validate_presets(body = {}, vpnid:) @client.post("#{BASE_PATH}/validatePresets/#{vpnid}", body) end |