Skip to content

Commit

Permalink
Address pstodulk's review comments
Browse files Browse the repository at this point in the history
Introduce LeappComponents enum
  • Loading branch information
fernflower committed Dec 22, 2023
1 parent 6d1a08c commit a4c1210
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions repos/system_upgrade/common/libraries/rpms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@
from leapp.libraries.common.config.version import get_source_major_version
from leapp.models import InstalledRPM


class LeappComponents(object):
FRAMEWORK = 'framework'
REPOSITORY = 'repository'
COCKPIT = 'cockpit'
TOOLS = 'tools'


LEAPP_PACKAGES_MAP = {
'framework': {'7': {'pkgs': ['leapp', 'python2-leapp'],
'deps': ['leapp-deps']},
'8': {'pkgs': ['leapp', 'python3-leapp'],
'deps': ['leapp-deps']}
},
'repository': {'7': {'pkgs': ['leapp-upgrade-el7toel8'],
'deps': ['leapp-upgrade-el7toel8-deps']},
'8': {'pkgs': ['leapp-upgrade-el8toel9'],
'deps': ['leapp-upgrade-el8toel9-deps']}
},
'cockpit': {'7': {'pkgs': ['cockpit-leapp']},
'8': {'pkgs': ['cockpit-leapp']}
},
'tools': {'7': {'pkgs': ['snactor']},
'8': {'pkgs': ['snactor']}
}
LeappComponents.FRAMEWORK: {'7': {'pkgs': ['leapp', 'python2-leapp'],
'deps': ['leapp-deps']},
'8': {'pkgs': ['leapp', 'python3-leapp'],
'deps': ['leapp-deps']}
},
LeappComponents.REPOSITORY: {'7': {'pkgs': ['leapp-upgrade-el7toel8'],
'deps': ['leapp-upgrade-el7toel8-deps']},
'8': {'pkgs': ['leapp-upgrade-el8toel9'],
'deps': ['leapp-upgrade-el8toel9-deps']}
},
LeappComponents.COCKPIT: {'7': {'pkgs': ['cockpit-leapp']},
'8': {'pkgs': ['cockpit-leapp']}
},
LeappComponents.TOOLS: {'7': {'pkgs': ['snactor']},
'8': {'pkgs': ['snactor']}
}
}
LEAPP_DEFAULT_COMPONENTS = ['framework', 'repository', 'tools']
LEAPP_DEFAULT_COMPONENTS = [LeappComponents.FRAMEWORK,
LeappComponents.REPOSITORY,
LeappComponents.TOOLS]


def get_installed_rpms():
Expand Down

0 comments on commit a4c1210

Please sign in to comment.