Browse Source

Extend Ceph repos template to support CentOS8

Parses args.distro to build a repo file for Ceph Nautilus which
will work on CentOS8 as well.

Change-Id: Ibfbfffa5835200e3909ad873282b0035a81f8bef
tags/0.1.0^0
Giulio Fidente 3 months ago
parent
commit
b361925cd5
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      tripleo_repos/main.py
  2. +1
    -1
      tripleo_repos/tests/test_main.py

+ 4
- 2
tripleo_repos/main.py View File

@@ -45,7 +45,7 @@ DEFAULT_MIRROR_MAP = {
CEPH_REPO_TEMPLATE = '''
[tripleo-centos-ceph-%(ceph_release)s]
name=tripleo-centos-ceph-%(ceph_release)s
baseurl=%(mirror)s/centos/7/storage/x86_64/ceph-%(ceph_release)s/
baseurl=%(mirror)s/centos/%(centos_release)s/storage/x86_64/ceph-%(ceph_release)s/
gpgcheck=0
enabled=1
'''
@@ -298,7 +298,9 @@ def _install_priorities():

def _create_ceph(args, release):
"""Generate a Ceph repo file for release"""
return CEPH_REPO_TEMPLATE % {'ceph_release': release,
centos_release = '7' if args.distro == 'centos7' else '8'
return CEPH_REPO_TEMPLATE % {'centos_release': centos_release,
'ceph_release': release,
'mirror': args.mirror}




+ 1
- 1
tripleo_repos/tests/test_main.py View File

@@ -424,7 +424,7 @@ enabled=1
expected_repo = '''
[tripleo-centos-ceph-jewel]
name=tripleo-centos-ceph-jewel
baseurl=http://foo/centos/7/storage/x86_64/ceph-jewel/
baseurl=http://foo/centos/8/storage/x86_64/ceph-jewel/
gpgcheck=0
enabled=1
'''


Loading…
Cancel
Save