예제 #1
0
def test_is_supported_version(monkeypatch, result, is_alt, src_ver):
    monkeypatch.setattr(version, 'is_rhel_alt', lambda: is_alt)
    monkeypatch.setattr(version, 'SUPPORTED_VERSIONS', {
        'rhel': ['7.8'],
        'rhel-alt': ['7.6']
    })
    monkeypatch.setattr(api, 'current_actor',
                        CurrentActorMocked(src_ver=src_ver))
    assert version.is_supported_version() == result
예제 #2
0
def check_os_version():
    """ Check the RHEL minor version and inhibit the upgrade if it does not match the supported ones """
    if not version.is_supported_version():
        supported_releases = []
        for rel in version.SUPPORTED_VERSIONS:
            for ver in version.SUPPORTED_VERSIONS[rel]:
                supported_releases.append(rel.upper() + ' ' + ver)
        reporting.create_report([
            reporting.Title('Unsupported OS'),
            reporting.Summary(
                'The supported OS releases for the upgrade process:\n'
                ' {}'.format('\n'.join(supported_releases))),
            reporting.Severity(reporting.Severity.HIGH),
            reporting.Tags(COMMON_REPORT_TAGS),
            reporting.Flags([reporting.Flags.INHIBITOR])
        ] + related)
예제 #3
0
def check_os_version():
    """ Check the RHEL minor version and inhibit the upgrade if it does not match the supported ones """
    if not version.is_supported_version():
        supported_releases = []
        for rel in version.SUPPORTED_VERSIONS:
            for ver in version.SUPPORTED_VERSIONS[rel]:
                supported_releases.append(rel.upper() + ' ' + ver)
        reporting.create_report([
            reporting.Title(
                'The installed OS version is not supported for the in-place upgrade to the target RHEL version'
            ),
            reporting.Summary(
                'The supported OS releases for the upgrade process:\n'
                ' {}'.format('\n'.join(supported_releases))),
            reporting.Severity(reporting.Severity.HIGH),
            reporting.Tags(COMMON_REPORT_TAGS),
            reporting.Flags([reporting.Flags.INHIBITOR]),
            # we want to set a static Key here because of different Title per path
            reporting.Key('1c7a98849a747ec9890f04bf4321de7280970715')
        ] + related)
예제 #4
0
 def process(self):
     skip_check = get_env('LEAPP_DEVEL_SKIP_CHECK_OS_RELEASE', False)
     if (skip_check or version.is_supported_version()) and next(
             self.consume(RepositoriesMapping), None):
         userspacegen.perform()
예제 #5
0
 def process(self):
     if version.is_supported_version() and next(
             self.consume(RepositoriesMap), None):
         userspacegen.perform()