aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2019-01-18 18:03:21 +0000
committerBryn M. Reeves <bmr@redhat.com>2019-01-18 18:03:21 +0000
commit3335f265213d7457d17139ee172bf21f1a66c229 (patch)
tree46976cb2fb54e93d8766d648b2223f004f277027
parentfa06bc09c95c52565e29173535c7422608e9a29b (diff)
downloadsos-3335f265213d7457d17139ee172bf21f1a66c229.tar.gz
[policies] factor out Red Hat disclaimer text
Rather than repeating the same boilerplate disclaimer text in each Red Hat policy class, define it once as a string, and then cat it into each policy that requires a distinct preamble. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/policies/redhat.py48
1 files changed, 16 insertions, 32 deletions
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index ea80704f..1d1606b6 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -229,6 +229,19 @@ rhel_presets = {
note=NOTE_TIME, opts=_opts_verify),
}
+# Legal disclaimer text for Red Hat products
+disclaimer_text = """
+Any information provided to %(vendor)s will be treated in \
+accordance with the published support policies at:\n
+ %(vendor_url)s
+
+The generated archive may contain data considered sensitive \
+and its content should be reviewed by the originating \
+organization before being passed to any third party.
+
+No changes will be made to system configuration.
+"""
+
class RHELPolicy(RedHatPolicy):
distro = RHEL_RELEASE_STR
@@ -242,18 +255,7 @@ applications.
An archive containing the collected information will be \
generated in %(tmpdir)s and may be provided to a %(vendor)s \
support representative.
-
-Any information provided to %(vendor)s will be treated in \
-accordance with the published support policies at:\n
- %(vendor_url)s
-
-The generated archive may contain data considered sensitive \
-and its content should be reviewed by the originating \
-organization before being passed to any third party.
-
-No changes will be made to system configuration.
-%(vendor_text)s
-""")
+""" + disclaimer_text + "%(vendor_text)s\n")
def __init__(self, sysroot=None):
super(RHELPolicy, self).__init__(sysroot=sysroot)
@@ -342,16 +344,7 @@ information from this %(distro)s system.
An archive containing the collected information will be \
generated in %(tmpdir)s and may be provided to a %(vendor)s \
support representative.
-
-Any information provided to %(vendor)s will be treated in \
-accordance with the published support policies at:\n
- %(vendor_url)s
-
-The generated archive may contain data considered sensitive \
-and its content should be reviewed by the originating \
-organization before being passed to any third party.
-%(vendor_text)s
-""")
+""" + disclaimer_text + "%(vendor_text)s\n")
def __init__(self, sysroot=None):
super(RedHatAtomicPolicy, self).__init__(sysroot=sysroot)
@@ -388,16 +381,7 @@ information from this %(distro)s system.
An archive containing the collected information will be \
generated in %(tmpdir)s and may be provided to a %(vendor)s \
support representative.
-
-Any information provided to %(vendor)s will be treated in \
-accordance with the published support policies at:\n
- %(vendor_url)s
-
-The generated archive may contain data considered sensitive \
-and its content should be reviewed by the originating \
-organization before being passed to any third party.
-%(vendor_text)s
-""")
+""" + disclaimer_text + "%(vendor_text)s\n")
def __init__(self, sysroot=None):
super(RedHatCoreOSPolicy, self).__init__(sysroot=sysroot)