Change several python and robot files to 110 chars
Taking advantage of current team limit of 110 chars.
Change-Id: If7ab51fe894889967b8c8bb2f2fa4664f01117d5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/bmc_ssh_utils.py b/lib/bmc_ssh_utils.py
index 71e08da..f5759fe 100755
--- a/lib/bmc_ssh_utils.py
+++ b/lib/bmc_ssh_utils.py
@@ -1,8 +1,7 @@
#!/usr/bin/env python
r"""
-This module provides many valuable bmc ssh functions such as
-bmc_execute_command.
+This module provides many valuable bmc ssh functions such as bmc_execute_command.
"""
import gen_valid as gv
@@ -19,36 +18,27 @@
test_mode=None,
time_out=None):
r"""
- Run the given command in an BMC SSH session and return the stdout, stderr
- and the return code.
+ Run the given command in an BMC SSH session and return the stdout, stderr and the return code.
- This function will obtain the global values for OPENBMC_HOST,
- OPENBMC_USERNAME, etc.
+ This function will obtain the global values for OPENBMC_HOST, OPENBMC_USERNAME, etc.
Description of arguments:
- cmd_buf The command string to be run in an SSH
- session.
- print_out If this is set, this function will print
- the stdout/stderr generated by the shell
- command.
- print_err If show_err is set, this function will
- print a standardized error report if the
- shell command returns non-zero.
- ignore_err Indicates that errors encountered on the
- sshlib.execute_command are to be ignored.
- fork Indicates that sshlib.start is to be used
- rather than sshlib.execute_command.
- quiet Indicates whether this function should run
- the pissuing() function prints an
- "Issuing: <cmd string>" to stdout. This
- defaults to the global quiet value.
- test_mode If test_mode is set, this function will
- not actually run the command. This
- defaults to the global test_mode value.
- time_out The amount of time to allow for the
- execution of cmd_buf. A value of None
- means that there is no limit to how long
- the command may take.
+ cmd_buf The command string to be run in an SSH session.
+ print_out If this is set, this function will print the stdout/stderr generated by
+ the shell command.
+ print_err If show_err is set, this function will print a standardized error report
+ if the shell command returns non-zero.
+ ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
+ ignored.
+ fork Indicates that sshlib.start is to be used rather than
+ sshlib.execute_command.
+ quiet Indicates whether this function should run the pissuing() function prints
+ an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
+ value.
+ test_mode If test_mode is set, this function will not actually run the command.
+ This defaults to the global test_mode value.
+ time_out The amount of time to allow for the execution of cmd_buf. A value of
+ None means that there is no limit to how long the command may take.
"""
# Get global BMC variable values.
@@ -83,35 +73,27 @@
test_mode=None,
time_out=None):
r"""
- Run the given command in an OS SSH session and return the stdout, stderr
- and the return code.
+ Run the given command in an OS SSH session and return the stdout, stderr and the return code.
This function will obtain the global values for OS_HOST, OS_USERNAME, etc.
Description of arguments:
- cmd_buf The command string to be run in an SSH
- session.
- print_out If this is set, this function will print
- the stdout/stderr generated by the shell
- command.
- print_err If show_err is set, this function will
- print a standardized error report if the
- shell command returns non-zero.
- ignore_err Indicates that errors encountered on the
- sshlib.execute_command are to be ignored.
- fork Indicates that sshlib.start is to be used
- rather than sshlib.execute_command.
- quiet Indicates whether this function should run
- the pissuing() function prints an
- "Issuing: <cmd string>" to stdout. This
- defaults to the global quiet value.
- test_mode If test_mode is set, this function will
- not actually run the command. This
- defaults to the global test_mode value.
- time_out The amount of time to allow for the
- execution of cmd_buf. A value of None
- means that there is no limit to how long
- the command may take.
+ cmd_buf The command string to be run in an SSH session.
+ print_out If this is set, this function will print the stdout/stderr generated by
+ the shell command.
+ print_err If show_err is set, this function will print a standardized error report
+ if the shell command returns non-zero.
+ ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
+ ignored.
+ fork Indicates that sshlib.start is to be used rather than
+ sshlib.execute_command.
+ quiet Indicates whether this function should run the pissuing() function prints
+ an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
+ value.
+ test_mode If test_mode is set, this function will not actually run the command.
+ This defaults to the global test_mode value.
+ time_out The amount of time to allow for the execution of cmd_buf. A value of
+ None means that there is no limit to how long the command may take.
"""
# Get global OS variable values.
@@ -144,32 +126,25 @@
quiet=None,
test_mode=None):
r"""
- Run the given command in an XCAT SSH session and return the stdout, stderr
- and the return code.
+ Run the given command in an XCAT SSH session and return the stdout, stderr and the return code.
- This function will obtain the global values for XCAT_HOST, XCAT_USERNAME,
- etc.
+ This function will obtain the global values for XCAT_HOST, XCAT_USERNAME, etc.
Description of arguments:
- cmd_buf The command string to be run in an SSH
- session.
- print_out If this is set, this function will print
- the stdout/stderr generated by the shell
- command.
- print_err If show_err is set, this function will
- print a standardized error report if the
- shell command returns non-zero.
- ignore_err Indicates that errors encountered on the
- sshlib.execute_command are to be ignored.
- fork Indicates that sshlib.start is to be used
- rather than sshlib.execute_command.
- quiet Indicates whether this function should run
- the pissuing() function prints an
- "Issuing: <cmd string>" to stdout. This
- defaults to the global quiet value.
- test_mode If test_mode is set, this function will
- not actually run the command. This
- defaults to the global test_mode value.
+ cmd_buf The command string to be run in an SSH session.
+ print_out If this is set, this function will print the stdout/stderr generated by
+ the shell command.
+ print_err If show_err is set, this function will print a standardized error report
+ if the shell command returns non-zero.
+ ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
+ ignored.
+ fork Indicates that sshlib.start is to be used rather than
+ sshlib.execute_command.
+ quiet Indicates whether this function should run the pissuing() function prints
+ an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
+ value.
+ test_mode If test_mode is set, this function will not actually run the command.
+ This defaults to the global test_mode value.
"""
# Get global XCAT variable values.
@@ -204,34 +179,27 @@
quiet=None,
test_mode=None):
r"""
- Write the given command in a device SSH session and return the stdout,
- stderr and the return code.
+ Write the given command in a device SSH session and return the stdout, stderr and the return code.
This function is useful for writing to a switch.
- This function will obtain the global values for DEVICE_HOST,
- DEVICE_USERNAME, etc.
+ This function will obtain the global values for DEVICE_HOST, DEVICE_USERNAME, etc.
Description of arguments:
- cmd_buf The command string to be run in an SSH
- session.
- print_out If this is set, this function will print
- the stdout/stderr generated by the shell
- command.
- print_err If show_err is set, this function will
- print a standardized error report if the
- shell command returns non-zero.
- ignore_err Indicates that errors encountered on the
- sshlib.execute_command are to be ignored.
- fork Indicates that sshlib.start is to be used
- rather than sshlib.execute_command.
- quiet Indicates whether this function should run
- the pissuing() function prints an
- "Issuing: <cmd string>" to stdout. This
- defaults to the global quiet value.
- test_mode If test_mode is set, this function will
- not actually run the command. This
- defaults to the global test_mode value.
+ cmd_buf The command string to be run in an SSH session.
+ print_out If this is set, this function will print the stdout/stderr generated by
+ the shell command.
+ print_err If show_err is set, this function will print a standardized error report
+ if the shell command returns non-zero.
+ ignore_err Indicates that errors encountered on the sshlib.execute_command are to be
+ ignored.
+ fork Indicates that sshlib.start is to be used rather than
+ sshlib.execute_command.
+ quiet Indicates whether this function should run the pissuing() function prints
+ an "Issuing: <cmd string>" to stdout. This defaults to the global quiet
+ value.
+ test_mode If test_mode is set, this function will not actually run the command.
+ This defaults to the global test_mode value.
"""
# Get global DEVICE variable values.