Method: Rbeapi::Eapilib::EapiConnection#execute
- Defined in:
- lib/rbeapi/eapilib.rb
#execute(commands, opts = {}) ⇒ Array<Hash>
Executes the commands on the destination node and returns the response from the node.
321 322 323 324 325 326 327 328 329 330 |
# File 'lib/rbeapi/eapilib.rb', line 321 def execute(commands, opts = {}) @error = nil request = request(commands, opts) response = send(request, opts) return response['result'] rescue ConnectionError, CommandError => exc exc.commands = commands @error = exc raise end |