Default to Ceph Nautilus unless branch is for an older OpenStack
With the release of Stein the tested version of Ceph is Nautilus. Update tripleo-repos command to enable the Nautilus repository by default unless an older branch is used. Add condition to set the branch to Luminous if Queens or Rocky are used. Conditions already exist to use the appropriate Ceph for earlier OpenStack branches. Also update test-requirements to get doc jobs passing, as sphinx 2.0.0 is not compatible with python2.7. Co-Authored-By: Alan Bishop <abishop@redhat.com> Change-Id: Icd38d52dc5353e075d7c3bbd76169449ae043828
This commit is contained in:
parent
ca9796a801
commit
8a48b48aa8
|
@ -5,8 +5,10 @@
|
|||
hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
|
||||
|
||||
coverage>=4.0,!=4.4 # Apache-2.0
|
||||
ddt>=1.0.1 # MIT
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
sphinx>=1.6.2 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
|
|
|
@ -320,8 +320,10 @@ def _install_repos(args, base_path):
|
|||
content = _create_ceph(args, 'hammer')
|
||||
elif args.branch in ['newton', 'ocata', 'pike']:
|
||||
content = _create_ceph(args, 'jewel')
|
||||
else:
|
||||
elif args.branch in ['queens', 'rocky']:
|
||||
content = _create_ceph(args, 'luminous')
|
||||
else:
|
||||
content = _create_ceph(args, 'nautilus')
|
||||
_write_repo(content, args.output_path)
|
||||
elif repo == 'opstools':
|
||||
content = OPSTOOLS_REPO_TEMPLATE % args.centos_mirror
|
||||
|
|
|
@ -15,12 +15,14 @@
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from tripleo_repos import main
|
||||
|
||||
|
||||
@ddt.ddt
|
||||
class TestTripleORepos(testtools.TestCase):
|
||||
@mock.patch('sys.argv', ['tripleo-repos', 'current', '-d', 'centos7'])
|
||||
@mock.patch('tripleo_repos.main._run_pkg_clean')
|
||||
|
@ -267,31 +269,33 @@ class TestTripleORepos(testtools.TestCase):
|
|||
],
|
||||
mock_write.mock_calls)
|
||||
|
||||
@ddt.data('liberty', 'mitaka', 'newton', 'ocata', 'pike', 'queens',
|
||||
'rocky', 'stein', 'master')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._create_ceph')
|
||||
def test_install_repos_ceph(self, mock_create_ceph, mock_write_repo):
|
||||
def test_install_repos_ceph(self,
|
||||
branch,
|
||||
mock_create_ceph,
|
||||
mock_write_repo):
|
||||
ceph_release = {
|
||||
'liberty': 'hammer',
|
||||
'mitaka': 'hammer',
|
||||
'newton': 'jewel',
|
||||
'ocata': 'jewel',
|
||||
'pike': 'jewel',
|
||||
'queens': 'luminous',
|
||||
'rocky': 'luminous',
|
||||
'stein': 'nautilus',
|
||||
'master': 'nautilus',
|
||||
}
|
||||
args = mock.Mock()
|
||||
args.repos = ['ceph']
|
||||
args.branch = 'master'
|
||||
args.branch = branch
|
||||
args.output_path = 'test'
|
||||
mock_repo = '[centos-ceph-luminous]\nMr. Fusion'
|
||||
mock_create_ceph.return_value = mock_repo
|
||||
main._install_repos(args, 'roads/')
|
||||
mock_create_ceph.assert_called_once_with(args, 'luminous')
|
||||
mock_write_repo.assert_called_once_with(mock_repo, 'test')
|
||||
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._create_ceph')
|
||||
def test_install_repos_ceph_mitaka(self, mock_create_ceph,
|
||||
mock_write_repo):
|
||||
args = mock.Mock()
|
||||
args.repos = ['ceph']
|
||||
args.branch = 'mitaka'
|
||||
args.output_path = 'test'
|
||||
mock_repo = '[centos-ceph-hammer]\nMr. Fusion'
|
||||
mock_create_ceph.return_value = mock_repo
|
||||
main._install_repos(args, 'roads/')
|
||||
mock_create_ceph.assert_called_once_with(args, 'hammer')
|
||||
mock_create_ceph.assert_called_once_with(args, ceph_release[branch])
|
||||
mock_write_repo.assert_called_once_with(mock_repo, 'test')
|
||||
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
|
|
Loading…
Reference in New Issue