Class: OPNsenseAPI::Core::IPSec::Sessions
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::IPSec::Sessions
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/ipsec/sessions.rb
Overview
Constant Summary collapse
- BASE_PATH =
'/ipsec/sessions'
Instance Method Summary collapse
- #connect(body = {}, id:) ⇒ Object
- #disconnect(body = {}, id:) ⇒ Object
- #search_phase_1(params = {}) ⇒ Object
- #search_phase_2(params = {}) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#connect(body = {}, id:) ⇒ Object
27 28 29 |
# File 'lib/opnsense_api/core/ipsec/sessions.rb', line 27 def connect(body = {}, id:) @client.post("#{BASE_PATH}/connect/#{id}", body) end |
#disconnect(body = {}, id:) ⇒ Object
31 32 33 |
# File 'lib/opnsense_api/core/ipsec/sessions.rb', line 31 def disconnect(body = {}, id:) @client.post("#{BASE_PATH}/disconnect/#{id}", body) end |
#search_phase_1(params = {}) ⇒ Object
35 36 37 |
# File 'lib/opnsense_api/core/ipsec/sessions.rb', line 35 def search_phase_1(params = {}) @client.get("#{BASE_PATH}/searchPhase1", params) end |
#search_phase_2(params = {}) ⇒ Object
39 40 41 |
# File 'lib/opnsense_api/core/ipsec/sessions.rb', line 39 def search_phase_2(params = {}) @client.get("#{BASE_PATH}/searchPhase2", params) end |