Esempio n. 1
0
 def process(self):
     target_version = library.get_target_version()
     os_release = library.get_os_release('/etc/os-release')
     self.produce(
         IPUConfig(leapp_env_vars=library.get_env_vars(),
                   os_release=os_release,
                   architecture=platform.machine(),
                   version=Version(source=os_release.version_id,
                                   target=target_version)))
Esempio n. 2
0
 def process(self):
     target_version = ipuworkflowconfig.get_target_version()
     os_release = ipuworkflowconfig.get_os_release('/etc/os-release')
     self.produce(IPUConfig(
         leapp_env_vars=ipuworkflowconfig.get_env_vars(),
         os_release=os_release,
         architecture=platform.machine(),
         version=Version(source=os_release.version_id, target=target_version),
         kernel=ipuworkflowconfig.get_booted_kernel()
     ))
def produce_ipu_config(actor):
    flavour = os.environ.get('LEAPP_UPGRADE_PATH_FLAVOUR')
    target_version = os.environ.get('LEAPP_UPGRADE_PATH_TARGET_RELEASE')
    os_release = get_os_release('/etc/os-release')
    actor.produce(IPUConfig(
        leapp_env_vars=get_env_vars(),
        os_release=os_release,
        architecture=platform.machine(),
        version=Version(
            source=os_release.version_id,
            target=target_version
        ),
        kernel=get_booted_kernel(),
        flavour=flavour
    ))
Esempio n. 4
0
This is not regular library.

The library is supposed to be used only for testing purposes. Import of the
library is expected only inside test files.
"""

from leapp.models import IPUConfig, EnvVar, OSRelease, Version

CONFIG = IPUConfig(
    leapp_env_vars=[EnvVar(name='LEAPP_DEVEL', value='0')],
    os_release=OSRelease(release_id='rhel',
                         name='Red Hat Enterprise Linux Server',
                         pretty_name='RHEL',
                         version='7.6 (Maipo)',
                         version_id='7.6'),
    version=Version(source='7.6', target='8.0'),
    architecture='x86_64',
    kernel='3.10.0-957.43.1.el7.x86_64',
)

CONFIG_ALL_SIGNED = IPUConfig(
    leapp_env_vars=[EnvVar(name='LEAPP_DEVEL_RPMS_ALL_SIGNED', value='1')],
    os_release=OSRelease(release_id='rhel',
                         name='Red Hat Enterprise Linux Server',
                         pretty_name='RHEL',
                         version='7.6 (Maipo)',
                         version_id='7.6'),
    version=Version(source='7.6', target='8.0'),
    architecture='x86_64',
    kernel='3.10.0-957.43.1.el7.x86_64',
)
class CurrentActorMocked(object):
    configuration = namedtuple('configuration', ['version'])(
        Version(source='7.6', target='8.0'))