From 5769d4a5af64df17651154df2243aaba0d56aca5 Mon Sep 17 00:00:00 2001 From: fluzzi Date: Sun, 3 Apr 2022 10:26:08 -0300 Subject: [PATCH] update docs --- conn/core.py | 180 ++++++++++------ docs/conn/index.html | 504 ++++++++++++++++++++++++++----------------- 2 files changed, 412 insertions(+), 272 deletions(-) diff --git a/conn/core.py b/conn/core.py index 74eb589..6f1d4e3 100755 --- a/conn/core.py +++ b/conn/core.py @@ -16,37 +16,45 @@ import threading class node: ''' This class generates a node object. Containts all the information and methods to connect and interact with a device using ssh or telnet. - Attributes: + ### Attributes: - - output (str) -- Output of the commands you ran with run or test - -- method. - - result(bool) -- True if expected value is found after running - -- the commands using test method. + - output (str): Output of the commands you ran with run or test + method. + + - result(bool): True if expected value is found after running + the commands using test method. ''' def __init__(self, unique, host, options='', logs='', password='', port='', protocol='', user='', config=''): ''' - Parameters: + ### Parameters: - - unique (str) -- Unique name to assign to the node. - - host (str) -- IP address or hostname of the node. + - unique (str): Unique name to assign to the node. - Optional Parameters: + - host (str): IP address or hostname of the node. - - options (str) -- Additional options to pass the ssh/telnet for - -- connection. - - logs (str) -- Path/file for storing the logs. You can use - -- ${unique},${host}, ${port}, ${user}, ${protocol} - -- as variables. - - password (str) -- Encrypted or plaintext password. - - port (str) -- Port to connect to node, default 22 for ssh and 23 - -- for telnet. - - protocol (str) -- Select ssh or telnet. Default is ssh. - - user (str) -- Username to of the node. - - config (obj) -- Pass the object created with class configfile with - -- key for decryption and extra configuration if you - -- are using connection manager. + ### Optional Parameters: + + - options (str): Additional options to pass the ssh/telnet for + connection. + + - logs (str): Path/file for storing the logs. You can use + ${unique},${host}, ${port}, ${user}, ${protocol} + as variables. + + - password (str): Encrypted or plaintext password. + + - port (str): Port to connect to node, default 22 for ssh and 23 + for telnet. + + - protocol (str): Select ssh or telnet. Default is ssh. + + - user (str): Username to of the node. + + - config (obj): Pass the object created with class configfile with + key for decryption and extra configuration if you + are using connection manager. ''' if config == '': self.idletime = 0 @@ -140,10 +148,10 @@ class node: ''' Allow user to interact with the node directly, mostly used by connection manager. - Optional Parameters: + ### Optional Parameters: - - debug (bool) -- If True, display all the connecting information - -- before interact. Default False. + - debug (bool): If True, display all the connecting information + before interact. Default False. ''' connect = self._connect(debug = debug) if connect == True: @@ -167,26 +175,28 @@ class node: ''' Run a command or list of commands on the node and return the output. - Parameters: + ### Parameters: - - commands (str/list) -- Commands to run on the node. Should be - -- str or a list of str. + - commands (str/list): Commands to run on the node. Should be + str or a list of str. - Optional Named Parameters: + ### Optional Named Parameters: - - folder (str) -- Path where output log should be stored, leave - -- empty to disable logging. - - prompt (str) -- Prompt to be expected after a command is finished - -- running. Usually linux uses ">" or EOF while - -- routers use ">" or "#". The default value should - -- work for most nodes. Change it if your connection - -- need some special symbol. - - stdout (bool) -- Set True to send the command output to stdout. - -- default False. + - folder (str): Path where output log should be stored, leave + empty to disable logging. - Returns: + - prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. - str -> Output of the commands you ran on the node. + - stdout (bool):Set True to send the command output to stdout. + default False. + + ### Returns: + + str: Output of the commands you ran on the node. ''' connect = self._connect() @@ -232,24 +242,25 @@ class node: ''' Run a command or list of commands on the node, then check if expected value appears on the output after the last command. - Parameters: + ### Parameters: - - commands (str/list) -- Commands to run on the node. Should be - -- str or list of str. - - expected (str) -- Expected text to appear after running - -- all the commands on the node. + - commands (str/list): Commands to run on the node. Should be + str or list of str. - Optional Named Parameters: + - expected (str) : Expected text to appear after running + all the commands on the node. - - prompt (str) -- Prompt to be expected after a command is finished - -- running. Usually linux uses ">" or EOF while - -- routers use ">" or "#". The default value should - -- work for most nodes. Change it if your connection - -- need some special symbol. + ### Optional Named Parameters: + + - prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. ### Returns: - bool -- true if expected value is found after running the commands - false if prompt is found before. + bool: true if expected value is found after running the commands + false if prompt is found before. ''' connect = self._connect() @@ -402,7 +413,7 @@ class nodes: port(str), protocol(str), user(str). For reference on subkeys check node class. - Optional Parameters: + ### Optional Parameters: - config (obj): Pass the object created with class configfile with key for decryption and extra configuration if you are using @@ -426,17 +437,34 @@ class nodes: ''' Run a command or list of commands on all the nodes in nodelist. - Parameters: - commands (str/list): Commands to run on the node. Should be a str or a list of str. + ### Parameters: - Optional Named Parameters: - folder (str): Path where output log should be stored, leave empty to disable logging. - prompt (str): Prompt to be expected after a command is finished running. Usually linux uses ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol. - stdout (bool): Set True to send the command output to stdout. default False. - parallel (int): Number of nodes to run the commands simultaneously. Default is 10, if there are more nodes that this value, nodes are groups in groups with max this number of members. + commands (str/list): Commands to run on the node. Should be str or + list of str. - Returns: - dict: Dictionary formed by nodes unique as keys, Output of the commands you ran on the node as value. + ### Optional Named Parameters: + + folder (str): Path where output log should be stored, leave empty + to disable logging. + + prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while routers + use ">" or "#". The default value should work for + most nodes. Change it if your connection need some + special symbol. + + stdout (bool): Set True to send the command output to stdout. + Default False. + + parallel (int): Number of nodes to run the commands simultaneously. + Default is 10, if there are more nodes that this + value, nodes are groups in groups with max this + number of members. + + ###Returns: + + dict: Dictionary formed by nodes unique as keys, Output of the + commands you ran on the node as value. ''' args = {} @@ -466,15 +494,27 @@ class nodes: ''' Run a command or list of commands on all the nodes in nodelist, then check if expected value appears on the output after the last command. - Parameters: - commands (str/list): Commands to run on the node. Should be a str or a list of str. - commands (str): Expected text to appear after running all the commands on the node. + ### Parameters: - Optional Named Parameters: - prompt (str): Prompt to be expected after a command is finished running. Usually linux uses ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol. + commands (str/list): Commands to run on the node. Should be str or + list of str. - Returns: - dict: Dictionary formed by nodes unique as keys, value is True if expected value is found after running the commands, False if prompt is found before. + expected (str) : Expected text to appear after running all the + commands on the node. + + ### Optional Named Parameters: + + prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. + + ### Returns: + + dict: Dictionary formed by nodes unique as keys, value is True if + expected value is found after running the commands, False + if prompt is found before. ''' args = {} diff --git a/docs/conn/index.html b/docs/conn/index.html index c419e8c..fd01872 100644 --- a/docs/conn/index.html +++ b/docs/conn/index.html @@ -8,9 +8,12 @@ + + +
@@ -322,33 +325,38 @@ __pdoc__ = {

This class generates a node object. Containts all the information and methods to connect and interact with a device using ssh or telnet.

-

Attributes: -

-
- output (str) -- Output of the commands you ran with run or test 
-               -- method.  
-- result(bool) -- True if expected value is found after running 
-               -- the commands using test method.
+

Attributes:

+
- output (str): Output of the commands you ran with run or test 
+                method.
+
+- result(bool): True if expected value is found after running 
+                the commands using test method.
 
-

Parameters: -

-
- unique   (str) -- Unique name to assign to the node.  
-- host     (str) -- IP address or hostname of the node.
+

Parameters:

+
- unique (str): Unique name to assign to the node.
+
+- host   (str): IP address or hostname of the node.
 
-

Optional Parameters: -

-
- options  (str) -- Additional options to pass the ssh/telnet for
-                 -- connection.  
-- logs     (str) -- Path/file for storing the logs. You can use 
-                 -- ${unique},${host}, ${port}, ${user}, ${protocol} 
-                 -- as variables.  
-- password (str) -- Encrypted or plaintext password.  
-- port     (str) -- Port to connect to node, default 22 for ssh and 23 
-                 -- for telnet.  
-- protocol (str) -- Select ssh or telnet. Default is ssh.  
-- user     (str) -- Username to of the node.  
-- config   (obj) -- Pass the object created with class configfile with 
-                 -- key for decryption and extra configuration if you 
-                 -- are using connection manager.
+

Optional Parameters:

+
- options  (str): Additional options to pass the ssh/telnet for
+                  connection.
+
+- logs     (str): Path/file for storing the logs. You can use 
+                  ${unique},${host}, ${port}, ${user}, ${protocol} 
+                  as variables.
+
+- password (str): Encrypted or plaintext password.
+
+- port     (str): Port to connect to node, default 22 for ssh and 23 
+                  for telnet.
+
+- protocol (str): Select ssh or telnet. Default is ssh.
+
+- user     (str): Username to of the node.
+
+- config   (obj): Pass the object created with class configfile with 
+                  key for decryption and extra configuration if you 
+                  are using connection manager.
 
@@ -357,37 +365,45 @@ __pdoc__ = {
class node:
     ''' This class generates a node object. Containts all the information and methods to connect and interact with a device using ssh or telnet.
 
-    Attributes:  
+    ### Attributes:  
 
-        - output (str) -- Output of the commands you ran with run or test 
-                       -- method.  
-        - result(bool) -- True if expected value is found after running 
-                       -- the commands using test method.
+        - output (str): Output of the commands you ran with run or test 
+                        method.  
+
+        - result(bool): True if expected value is found after running 
+                        the commands using test method.
         '''
     
     def __init__(self, unique, host, options='', logs='', password='', port='', protocol='', user='', config=''):
         ''' 
             
-        Parameters:  
+        ### Parameters:  
 
-            - unique   (str) -- Unique name to assign to the node.  
-            - host     (str) -- IP address or hostname of the node.  
+            - unique (str): Unique name to assign to the node.
 
-        Optional Parameters:  
+            - host   (str): IP address or hostname of the node.
 
-            - options  (str) -- Additional options to pass the ssh/telnet for
-                             -- connection.  
-            - logs     (str) -- Path/file for storing the logs. You can use 
-                             -- ${unique},${host}, ${port}, ${user}, ${protocol} 
-                             -- as variables.  
-            - password (str) -- Encrypted or plaintext password.  
-            - port     (str) -- Port to connect to node, default 22 for ssh and 23 
-                             -- for telnet.  
-            - protocol (str) -- Select ssh or telnet. Default is ssh.  
-            - user     (str) -- Username to of the node.  
-            - config   (obj) -- Pass the object created with class configfile with 
-                             -- key for decryption and extra configuration if you 
-                             -- are using connection manager.  
+        ### Optional Parameters:  
+
+            - options  (str): Additional options to pass the ssh/telnet for
+                              connection.  
+
+            - logs     (str): Path/file for storing the logs. You can use 
+                              ${unique},${host}, ${port}, ${user}, ${protocol} 
+                              as variables.  
+
+            - password (str): Encrypted or plaintext password.  
+
+            - port     (str): Port to connect to node, default 22 for ssh and 23 
+                              for telnet.  
+
+            - protocol (str): Select ssh or telnet. Default is ssh.  
+
+            - user     (str): Username to of the node.  
+
+            - config   (obj): Pass the object created with class configfile with 
+                              key for decryption and extra configuration if you 
+                              are using connection manager.  
         '''
         if config == '':
             self.idletime = 0
@@ -481,10 +497,10 @@ __pdoc__ = {
         '''
         Allow user to interact with the node directly, mostly used by connection manager.
 
-        Optional Parameters:  
+        ### Optional Parameters:  
 
-            - debug (bool) -- If True, display all the connecting information 
-                           -- before interact. Default False.  
+            - debug (bool): If True, display all the connecting information 
+                            before interact. Default False.  
         '''
         connect = self._connect(debug = debug)
         if connect == True:
@@ -508,26 +524,28 @@ __pdoc__ = {
         '''
         Run a command or list of commands on the node and return the output.
 
-        Parameters:  
+        ### Parameters:  
 
-            - commands (str/list) -- Commands to run on the node. Should be 
-                                  -- str or a list of str.
+            - commands (str/list): Commands to run on the node. Should be 
+                                   str or a list of str.
 
-        Optional Named Parameters:  
+        ### Optional Named Parameters:  
 
-            - folder (str)  -- Path where output log should be stored, leave 
-                            -- empty to disable logging.  
-            - prompt (str)  -- Prompt to be expected after a command is finished 
-                            -- running. Usually linux uses  ">" or EOF while 
-                            -- routers use ">" or "#". The default value should 
-                            -- work for most nodes. Change it if your connection 
-                            -- need some special symbol.  
-            - stdout (bool) -- Set True to send the command output to stdout. 
-                            -- default False.
+            - folder (str): Path where output log should be stored, leave 
+                            empty to disable logging.  
 
-        Returns:  
+            - prompt (str): Prompt to be expected after a command is finished 
+                            running. Usually linux uses  ">" or EOF while 
+                            routers use ">" or "#". The default value should 
+                            work for most nodes. Change it if your connection 
+                            need some special symbol.  
 
-            str -> Output of the commands you ran on the node.
+            - stdout (bool):Set True to send the command output to stdout. 
+                            default False.
+
+        ### Returns:  
+
+            str: Output of the commands you ran on the node.
 
         '''
         connect = self._connect()
@@ -573,24 +591,25 @@ __pdoc__ = {
         '''
         Run a command or list of commands on the node, then check if expected value appears on the output after the last command.
 
-        Parameters:  
+        ### Parameters:  
 
-            - commands (str/list) -- Commands to run on the node. Should be
-                                  -- str or list of str.  
-            - expected (str)      -- Expected text to appear after running 
-                                  -- all the commands on the node.
+            - commands (str/list): Commands to run on the node. Should be
+                                   str or list of str.  
 
-        Optional Named Parameters: 
+            - expected (str)     : Expected text to appear after running 
+                                   all the commands on the node.
 
-            - prompt (str) -- Prompt to be expected after a command is finished
-                           -- running. Usually linux uses  ">" or EOF while 
-                           -- routers use ">" or "#". The default value should 
-                           -- work for most nodes. Change it if your connection 
-                           -- need some special symbol.
+        ### Optional Named Parameters: 
+
+            - prompt (str): Prompt to be expected after a command is finished
+                            running. Usually linux uses  ">" or EOF while 
+                            routers use ">" or "#". The default value should 
+                            work for most nodes. Change it if your connection 
+                            need some special symbol.
 
         ### Returns: 
-            bool -- true if expected value is found after running the commands 
-                    false if prompt is found before.
+            bool: true if expected value is found after running the commands 
+                  false if prompt is found before.
 
         '''
         connect = self._connect()
@@ -718,10 +737,9 @@ __pdoc__ = {
 
 

Allow user to interact with the node directly, mostly used by connection manager.

-

Optional Parameters: -

-
- debug (bool) -- If True, display all the connecting information 
-               -- before interact. Default False.
+

Optional Parameters:

+
- debug (bool): If True, display all the connecting information 
+                before interact. Default False.
 
@@ -731,10 +749,10 @@ __pdoc__ = { ''' Allow user to interact with the node directly, mostly used by connection manager. - Optional Parameters: + ### Optional Parameters: - - debug (bool) -- If True, display all the connecting information - -- before interact. Default False. + - debug (bool): If True, display all the connecting information + before interact. Default False. ''' connect = self._connect(debug = debug) if connect == True: @@ -760,26 +778,25 @@ __pdoc__ = {

Run a command or list of commands on the node and return the output.

-

Parameters: -

-
- commands (str/list) -- Commands to run on the node. Should be 
-                      -- str or a list of str.
+

Parameters:

+
- commands (str/list): Commands to run on the node. Should be 
+                       str or a list of str.
 
-

Optional Named Parameters: -

-
- folder (str)  -- Path where output log should be stored, leave 
-                -- empty to disable logging.  
-- prompt (str)  -- Prompt to be expected after a command is finished 
-                -- running. Usually linux uses  ">" or EOF while 
-                -- routers use ">" or "#". The default value should 
-                -- work for most nodes. Change it if your connection 
-                -- need some special symbol.  
-- stdout (bool) -- Set True to send the command output to stdout. 
-                -- default False.
+

Optional Named Parameters:

+
- folder (str): Path where output log should be stored, leave 
+                empty to disable logging.
+
+- prompt (str): Prompt to be expected after a command is finished 
+                running. Usually linux uses  ">" or EOF while 
+                routers use ">" or "#". The default value should 
+                work for most nodes. Change it if your connection 
+                need some special symbol.
+
+- stdout (bool):Set True to send the command output to stdout. 
+                default False.
 
-

Returns: -

-
str -> Output of the commands you ran on the node.
+

Returns:

+
str: Output of the commands you ran on the node.
 
@@ -789,26 +806,28 @@ __pdoc__ = { ''' Run a command or list of commands on the node and return the output. - Parameters: + ### Parameters: - - commands (str/list) -- Commands to run on the node. Should be - -- str or a list of str. + - commands (str/list): Commands to run on the node. Should be + str or a list of str. - Optional Named Parameters: + ### Optional Named Parameters: - - folder (str) -- Path where output log should be stored, leave - -- empty to disable logging. - - prompt (str) -- Prompt to be expected after a command is finished - -- running. Usually linux uses ">" or EOF while - -- routers use ">" or "#". The default value should - -- work for most nodes. Change it if your connection - -- need some special symbol. - - stdout (bool) -- Set True to send the command output to stdout. - -- default False. + - folder (str): Path where output log should be stored, leave + empty to disable logging. - Returns: + - prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. - str -> Output of the commands you ran on the node. + - stdout (bool):Set True to send the command output to stdout. + default False. + + ### Returns: + + str: Output of the commands you ran on the node. ''' connect = self._connect() @@ -856,23 +875,23 @@ __pdoc__ = {

Run a command or list of commands on the node, then check if expected value appears on the output after the last command.

-

Parameters: -

-
- commands (str/list) -- Commands to run on the node. Should be
-                      -- str or list of str.  
-- expected (str)      -- Expected text to appear after running 
-                      -- all the commands on the node.
+

Parameters:

+
- commands (str/list): Commands to run on the node. Should be
+                       str or list of str.
+
+- expected (str)     : Expected text to appear after running 
+                       all the commands on the node.
 
-

Optional Named Parameters:

-
- prompt (str) -- Prompt to be expected after a command is finished
-               -- running. Usually linux uses  ">" or EOF while 
-               -- routers use ">" or "#". The default value should 
-               -- work for most nodes. Change it if your connection 
-               -- need some special symbol.
+

Optional Named Parameters:

+
- prompt (str): Prompt to be expected after a command is finished
+                running. Usually linux uses  ">" or EOF while 
+                routers use ">" or "#". The default value should 
+                work for most nodes. Change it if your connection 
+                need some special symbol.
 

Returns:

-
bool -- true if expected value is found after running the commands 
-        false if prompt is found before.
+
bool: true if expected value is found after running the commands 
+      false if prompt is found before.
 
@@ -882,24 +901,25 @@ __pdoc__ = { ''' Run a command or list of commands on the node, then check if expected value appears on the output after the last command. - Parameters: + ### Parameters: - - commands (str/list) -- Commands to run on the node. Should be - -- str or list of str. - - expected (str) -- Expected text to appear after running - -- all the commands on the node. + - commands (str/list): Commands to run on the node. Should be + str or list of str. - Optional Named Parameters: + - expected (str) : Expected text to appear after running + all the commands on the node. - - prompt (str) -- Prompt to be expected after a command is finished - -- running. Usually linux uses ">" or EOF while - -- routers use ">" or "#". The default value should - -- work for most nodes. Change it if your connection - -- need some special symbol. + ### Optional Named Parameters: + + - prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. ### Returns: - bool -- true if expected value is found after running the commands - false if prompt is found before. + bool: true if expected value is found after running the commands + false if prompt is found before. ''' connect = self._connect() @@ -975,8 +995,7 @@ __pdoc__ = { port(str), protocol(str), user(str). For reference on subkeys check node class.
-

Optional Parameters: -

+

Optional Parameters:

- config (obj): Pass the object created with class configfile with key 
                 for decryption and extra configuration if you are using 
                 connection manager.
@@ -1017,7 +1036,7 @@ __pdoc__ = {
                             port(str), protocol(str), user(str).  
                             For reference on subkeys check node class.
 
-        Optional Parameters:  
+        ### Optional Parameters:  
 
             - config (obj): Pass the object created with class configfile with key 
                             for decryption and extra configuration if you are using 
@@ -1041,17 +1060,34 @@ __pdoc__ = {
         '''
         Run a command or list of commands on all the nodes in nodelist.
 
-        Parameters:  
-            commands (str/list): Commands to run on the node. Should be a str or a list of str.
+        ### Parameters:  
 
-        Optional Named Parameters:  
-            folder   (str): Path where output log should be stored, leave empty to disable logging.  
-            prompt   (str): Prompt to be expected after a command is finished running. Usually linux uses  ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol.  
-            stdout   (bool): Set True to send the command output to stdout. default False.  
-            parallel (int): Number of nodes to run the commands simultaneously. Default is 10, if there are more nodes that this value, nodes are groups in groups with max this number of members.
+            commands (str/list): Commands to run on the node. Should be str or 
+                                 list of str.
 
-        Returns:  
-            dict: Dictionary formed by nodes unique as keys, Output of the commands you ran on the node as value.
+        ### Optional Named Parameters:  
+
+            folder   (str): Path where output log should be stored, leave empty 
+                            to disable logging.  
+
+            prompt   (str): Prompt to be expected after a command is finished 
+                            running. Usually linux uses  ">" or EOF while routers 
+                            use ">" or "#". The default value should work for 
+                            most nodes. Change it if your connection need some 
+                            special symbol.  
+
+            stdout  (bool): Set True to send the command output to stdout. 
+                            Default False.  
+
+            parallel (int): Number of nodes to run the commands simultaneously. 
+                            Default is 10, if there are more nodes that this 
+                            value, nodes are groups in groups with max this 
+                            number of members.
+
+        ###Returns:  
+
+            dict: Dictionary formed by nodes unique as keys, Output of the 
+                  commands you ran on the node as value.
 
         '''
         args = {}
@@ -1081,15 +1117,27 @@ __pdoc__ = {
         '''
         Run a command or list of commands on all the nodes in nodelist, then check if expected value appears on the output after the last command.
 
-        Parameters:  
-            commands (str/list): Commands to run on the node. Should be a str or a list of str.  
-            commands (str): Expected text to appear after running all the commands on the node.
+        ### Parameters:  
 
-        Optional Named Parameters:  
-            prompt   (str): Prompt to be expected after a command is finished running. Usually linux uses  ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol.
+            commands (str/list): Commands to run on the node. Should be str or 
+                                 list of str.  
 
-        Returns:  
-            dict: Dictionary formed by nodes unique as keys, value is True if expected value is found after running the commands, False if prompt is found before.
+            expected (str)     : Expected text to appear after running all the 
+                                 commands on the node.
+
+        ### Optional Named Parameters:  
+
+            prompt (str): Prompt to be expected after a command is finished 
+                          running. Usually linux uses  ">" or EOF while 
+                          routers use ">" or "#". The default value should 
+                          work for most nodes. Change it if your connection 
+                          need some special symbol.
+
+        ### Returns:  
+
+            dict: Dictionary formed by nodes unique as keys, value is True if 
+                  expected value is found after running the commands, False 
+                  if prompt is found before.
 
         '''
         args = {}
@@ -1122,19 +1170,32 @@ __pdoc__ = {
 
 

Run a command or list of commands on all the nodes in nodelist.

-

Parameters:
-commands (str/list): Commands to run on the node. Should be a str or a list of str.

-

Optional Named Parameters:
-folder -(str): Path where output log should be stored, leave empty to disable logging.
-prompt -(str): Prompt to be expected after a command is finished running. Usually linux uses -">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol.
-stdout -(bool): Set True to send the command output to stdout. default False.
-parallel (int): Number of nodes to run the commands simultaneously. Default is 10, if there are more nodes that this value, nodes are groups in groups with max this number of members.

-

Returns:
-dict: Dictionary formed by nodes unique as keys, Output of the commands you ran on the node as value.

+

Parameters:

+
commands (str/list): Commands to run on the node. Should be str or 
+                     list of str.
+
+

Optional Named Parameters:

+
folder   (str): Path where output log should be stored, leave empty 
+                to disable logging.
+
+prompt   (str): Prompt to be expected after a command is finished 
+                running. Usually linux uses  ">" or EOF while routers 
+                use ">" or "#". The default value should work for 
+                most nodes. Change it if your connection need some 
+                special symbol.
+
+stdout  (bool): Set True to send the command output to stdout. 
+                Default False.
+
+parallel (int): Number of nodes to run the commands simultaneously. 
+                Default is 10, if there are more nodes that this 
+                value, nodes are groups in groups with max this 
+                number of members.
+
+

Returns:

+
dict: Dictionary formed by nodes unique as keys, Output of the 
+      commands you ran on the node as value.
+
Expand source code @@ -1143,17 +1204,34 @@ dict: Dictionary formed by nodes unique as keys, Output of the commands you ran ''' Run a command or list of commands on all the nodes in nodelist. - Parameters: - commands (str/list): Commands to run on the node. Should be a str or a list of str. + ### Parameters: - Optional Named Parameters: - folder (str): Path where output log should be stored, leave empty to disable logging. - prompt (str): Prompt to be expected after a command is finished running. Usually linux uses ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol. - stdout (bool): Set True to send the command output to stdout. default False. - parallel (int): Number of nodes to run the commands simultaneously. Default is 10, if there are more nodes that this value, nodes are groups in groups with max this number of members. + commands (str/list): Commands to run on the node. Should be str or + list of str. - Returns: - dict: Dictionary formed by nodes unique as keys, Output of the commands you ran on the node as value. + ### Optional Named Parameters: + + folder (str): Path where output log should be stored, leave empty + to disable logging. + + prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while routers + use ">" or "#". The default value should work for + most nodes. Change it if your connection need some + special symbol. + + stdout (bool): Set True to send the command output to stdout. + Default False. + + parallel (int): Number of nodes to run the commands simultaneously. + Default is 10, if there are more nodes that this + value, nodes are groups in groups with max this + number of members. + + ###Returns: + + dict: Dictionary formed by nodes unique as keys, Output of the + commands you ran on the node as value. ''' args = {} @@ -1185,15 +1263,25 @@ dict: Dictionary formed by nodes unique as keys, Output of the commands you ran

Run a command or list of commands on all the nodes in nodelist, then check if expected value appears on the output after the last command.

-

Parameters:
-commands (str/list): Commands to run on the node. Should be a str or a list of str.
-commands (str): Expected text to appear after running all the commands on the node.

-

Optional Named Parameters:
-prompt -(str): Prompt to be expected after a command is finished running. Usually linux uses -">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol.

-

Returns:
-dict: Dictionary formed by nodes unique as keys, value is True if expected value is found after running the commands, False if prompt is found before.

+

Parameters:

+
commands (str/list): Commands to run on the node. Should be str or 
+                     list of str.
+
+expected (str)     : Expected text to appear after running all the 
+                     commands on the node.
+
+

Optional Named Parameters:

+
prompt (str): Prompt to be expected after a command is finished 
+              running. Usually linux uses  ">" or EOF while 
+              routers use ">" or "#". The default value should 
+              work for most nodes. Change it if your connection 
+              need some special symbol.
+
+

Returns:

+
dict: Dictionary formed by nodes unique as keys, value is True if 
+      expected value is found after running the commands, False 
+      if prompt is found before.
+
Expand source code @@ -1202,15 +1290,27 @@ dict: Dictionary formed by nodes unique as keys, value is True if expected value ''' Run a command or list of commands on all the nodes in nodelist, then check if expected value appears on the output after the last command. - Parameters: - commands (str/list): Commands to run on the node. Should be a str or a list of str. - commands (str): Expected text to appear after running all the commands on the node. + ### Parameters: - Optional Named Parameters: - prompt (str): Prompt to be expected after a command is finished running. Usually linux uses ">" or EOF while routers use ">" or "#". The default value should work for most nodes. Change it if your connection need some special symbol. + commands (str/list): Commands to run on the node. Should be str or + list of str. - Returns: - dict: Dictionary formed by nodes unique as keys, value is True if expected value is found after running the commands, False if prompt is found before. + expected (str) : Expected text to appear after running all the + commands on the node. + + ### Optional Named Parameters: + + prompt (str): Prompt to be expected after a command is finished + running. Usually linux uses ">" or EOF while + routers use ">" or "#". The default value should + work for most nodes. Change it if your connection + need some special symbol. + + ### Returns: + + dict: Dictionary formed by nodes unique as keys, value is True if + expected value is found after running the commands, False + if prompt is found before. ''' args = {}