From 01a11c117df747c4d0581e264fffb7e294cc79af Mon Sep 17 00:00:00 2001 From: Shweta Singh Date: Tue, 28 Jan 2025 20:20:10 +0530 Subject: [PATCH] Remove rhsc7 check from robottelo (#17443) Remove check for rhsc7 from code (cherry picked from commit 3f6b216cca9b68fc80b1f4648300f808d5037e29) --- robottelo/host_helpers/cli_factory.py | 47 --------------------------- robottelo/hosts.py | 2 +- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/robottelo/host_helpers/cli_factory.py b/robottelo/host_helpers/cli_factory.py index 47a5d602720..c8059d5c4cf 100644 --- a/robottelo/host_helpers/cli_factory.py +++ b/robottelo/host_helpers/cli_factory.py @@ -912,53 +912,6 @@ def setup_org_for_a_rh_repo( ) return result - @staticmethod - def _get_capsule_vm_distro_repos(distro): - """Return the right RH repos info for the capsule setup""" - rh_repos = [] - if distro == 'rhel7': - # Red Hat Enterprise Linux 7 Server - rh_product_arch = constants.REPOS['rhel7']['arch'] - rh_product_releasever = constants.REPOS['rhel7']['releasever'] - rh_repos.append( - { - 'product': constants.PRDS['rhel'], - 'repository-set': constants.REPOSET['rhel7'], - 'repository': constants.REPOS['rhel7']['name'], - 'repository-id': constants.REPOS['rhel7']['id'], - 'releasever': rh_product_releasever, - 'arch': rh_product_arch, - 'cdn': True, - } - ) - # Red Hat Software Collections (for 7 Server) - rh_repos.append( - { - 'product': constants.PRDS['rhscl'], - 'repository-set': constants.REPOSET['rhscl7'], - 'repository': constants.REPOS['rhscl7']['name'], - 'repository-id': constants.REPOS['rhscl7']['id'], - 'releasever': rh_product_releasever, - 'arch': rh_product_arch, - 'cdn': True, - } - ) - # Red Hat Satellite Capsule 6.2 (for RHEL 7 Server) - rh_repos.append( - { - 'product': constants.PRDS['rhsc'], - 'repository-set': constants.REPOSET['rhsc7'], - 'repository': constants.REPOS['rhsc7']['name'], - 'repository-id': constants.REPOS['rhsc7']['id'], - 'url': settings.repos.capsule_repo, - 'cdn': settings.robottelo.cdn or not settings.repos.capsule_repo, - } - ) - else: - raise CLIFactoryError(f'distro "{distro}" not supported') - - return rh_product_arch, rh_product_releasever, rh_repos - def add_role_permissions(self, role_id, resource_permissions): """Create role permissions found in resource permissions dict diff --git a/robottelo/hosts.py b/robottelo/hosts.py index e5da2221a3d..ed251b8720e 100644 --- a/robottelo/hosts.py +++ b/robottelo/hosts.py @@ -474,7 +474,7 @@ def enable_repo(self, repo, force=False): downstream_repo = settings.repos.sattools_repo['rhel7'] elif repo == constants.REPOS['rhst8']['id']: downstream_repo = settings.repos.sattools_repo['rhel8'] - elif repo in (constants.REPOS['rhsc7']['id'], constants.REPOS['rhsc8']['id']): + elif repo in (constants.REPOS['rhsc8']['id'], constants.REPOS['rhsc9']['id']): downstream_repo = settings.repos.capsule_repo if force or settings.robottelo.cdn or not downstream_repo: return self.execute(f'subscription-manager repos --enable {repo}')