connections

Collection of task plugins to work with Nornir hosts’ connections

Sample usage

Code to invoke onnections task plugins:

TBD

API reference

nornir_salt.plugins.tasks.connections.connections(task, call, *args, **kwargs)

Dispatcher function to call one of the functions.

Parameters
  • call – (str) nickname of function to call

  • arg – (list) function arguments

  • kwargs – (dict) function key-word arguments

Returns

function execution results

Call function nicknames:

  • ls - calls conn_list

  • close - calls conn_close

nornir_salt.plugins.tasks.connections.conn_list(task, *args, **kwargs)

Function to list hos’s active connections.

return: (list) list of hosts’s connections

nornir_salt.plugins.tasks.connections.conn_close(task, conn_name='all', *args, **kwargs)

Task to close host’s connections.

Parameters

conn_name – (str) name of connection to close, default is “all”

Returns

(list) list of connections closed