Revert "black: re-format"
This reverts commit 5731818de0ce446ceaafc7e75ae39da1b69942ae.
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
Change-Id: Ie61cdc8c7f2825b0d9d66be87a6a3a058de2b372
diff --git a/syslib/utils_os.py b/syslib/utils_os.py
index dbc2c75..fe97de5 100755
--- a/syslib/utils_os.py
+++ b/syslib/utils_os.py
@@ -4,67 +4,68 @@
This file contains utilities associated with the host OS.
"""
-import os
-import sys
-
import bmc_ssh_utils
import var_funcs
+import sys
+import os
+
sys.path.append(os.path.join(os.path.dirname(__file__), "../lib"))
def get_os_release_info(default_cmd="cat /etc/os-release"):
r"""
- Get os-release info and return it as a dictionary.
+ Get os-release info and return it as a dictionary.
- An example of the contents of /etc/os-release:
+ An example of the contents of /etc/os-release:
- NAME="Red Hat Enterprise Linux Server"
- VERSION="7.5 (Maipo)"
- ID="rhel"
- ID_LIKE="fedora"
- VARIANT="Server"
- VARIANT_ID="server"
- VERSION_ID="7.5"
- PRETTY_NAME="Red Hat Enterprise Linux Server 7.5 Beta (Maipo)"
- ANSI_COLOR="0;31"
- CPE_NAME="cpe:/o:redhat:enterprise_linux:7.5:beta:server"
- HOME_URL="https://www.redhat.com/"
- BUG_REPORT_URL="https://bugzilla.redhat.com/"
+ NAME="Red Hat Enterprise Linux Server"
+ VERSION="7.5 (Maipo)"
+ ID="rhel"
+ ID_LIKE="fedora"
+ VARIANT="Server"
+ VARIANT_ID="server"
+ VERSION_ID="7.5"
+ PRETTY_NAME="Red Hat Enterprise Linux Server 7.5 Beta (Maipo)"
+ ANSI_COLOR="0;31"
+ CPE_NAME="cpe:/o:redhat:enterprise_linux:7.5:beta:server"
+ HOME_URL="https://www.redhat.com/"
+ BUG_REPORT_URL="https://bugzilla.redhat.com/"
- REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
- REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
- REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
- REDHAT_SUPPORT_PRODUCT_VERSION="7.5 Beta"
+ REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
+ REDHAT_BUGZILLA_PRODUCT_VERSION=7.5
+ REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
+ REDHAT_SUPPORT_PRODUCT_VERSION="7.5 Beta"
- For the data shown above, this function will return the following
- dictionary:
+ For the data shown above, this function will return the following
+ dictionary:
- result:
- [name]: Red Hat Enterprise Linux Server
- [version]: 7.5 (Maipo)
- [id]: rhel
- [id_like]: fedora
- [variant]: Server
- [variant_id]: server
- [version_id]: 7.5
- [pretty_name]: Red Hat Enterprise Linux Server 7.5 Beta (Maipo)
- [ansi_color]: 0;31
- [cpe_name]: cpe:/o:redhat:enterprise_linux:7.5:beta:server
- [home_url]: https://www.redhat.com/
- [bug_report_url]: https://bugzilla.redhat.com/
- [redhat_bugzilla_product]: Red Hat Enterprise Linux 7
- [redhat_bugzilla_product_version]: 7.5
- [redhat_support_product]: Red Hat Enterprise Linux
- [redhat_support_product_version]: 7.5 Beta
+ result:
+ [name]: Red Hat Enterprise Linux Server
+ [version]: 7.5 (Maipo)
+ [id]: rhel
+ [id_like]: fedora
+ [variant]: Server
+ [variant_id]: server
+ [version_id]: 7.5
+ [pretty_name]: Red Hat Enterprise Linux Server 7.5 Beta (Maipo)
+ [ansi_color]: 0;31
+ [cpe_name]: cpe:/o:redhat:enterprise_linux:7.5:beta:server
+ [home_url]: https://www.redhat.com/
+ [bug_report_url]: https://bugzilla.redhat.com/
+ [redhat_bugzilla_product]: Red Hat Enterprise Linux 7
+ [redhat_bugzilla_product_version]: 7.5
+ [redhat_support_product]: Red Hat Enterprise Linux
+ [redhat_support_product_version]: 7.5 Beta
- . Description of argument(s):
- default_cmd A string command to be executed (e.g cat /etc/os-release).
+. Description of argument(s):
+ default_cmd A string command to be executed (e.g cat /etc/os-release).
"""
- stdout, stderr, rc = bmc_ssh_utils.os_execute_command(default_cmd)
+ stdout, stderr, rc =\
+ bmc_ssh_utils.os_execute_command(default_cmd)
return var_funcs.key_value_outbuf_to_dict(stdout, delim="=", strip='"')