Rename from dlrn-repo to tripleo-repos
This commit is contained in:
parent
3bcdfae16d
commit
e6fec8c86b
|
@ -1,4 +1,4 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./dlrn_repo ./dlrn_repo $LISTOPT $IDOPTION
|
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./tripleo_repos ./tripleo_repos $LISTOPT $IDOPTION
|
||||||
test_id_option=--load-list $IDFILE
|
test_id_option=--load-list $IDFILE
|
||||||
test_list_option=--list
|
test_list_option=--list
|
||||||
|
|
28
README.rst
28
README.rst
|
@ -1,7 +1,7 @@
|
||||||
dlrn-repo
|
tripleo-repos
|
||||||
=========
|
=============
|
||||||
|
|
||||||
A tool for managing dlrn repos.
|
A tool for managing tripleo repos from places like dlrn and Ceph.
|
||||||
|
|
||||||
See: https://github.com/openstack-packages/DLRN
|
See: https://github.com/openstack-packages/DLRN
|
||||||
|
|
||||||
|
@ -10,30 +10,30 @@ require that to work sanely.
|
||||||
|
|
||||||
.. note:: The tool will remove any delorean* repos at the target location
|
.. note:: The tool will remove any delorean* repos at the target location
|
||||||
to avoid conflicts with older repos. This means you must specify
|
to avoid conflicts with older repos. This means you must specify
|
||||||
all of the repos you want to enable in one dlrn-repo call.
|
all of the repos you want to enable in one tripleo-repos call.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
Install current master dlrn repo and the deps repo::
|
Install current master dlrn repo and the deps repo::
|
||||||
|
|
||||||
dlrn-repo current deps
|
tripleo-repos current deps
|
||||||
|
|
||||||
Install current-tripleo dlrn repo and the deps repo::
|
Install current-tripleo dlrn repo and the deps repo::
|
||||||
|
|
||||||
dlrn-repo current-tripleo deps
|
tripleo-repos current-tripleo deps
|
||||||
|
|
||||||
Install the current-tripleo-dev repo. This will also pull current and deps,
|
Install the current-tripleo-dev repo. This will also pull current and deps,
|
||||||
and will adjust the priorities of each repo appropriately::
|
and will adjust the priorities of each repo appropriately::
|
||||||
|
|
||||||
dlrn-repo current-tripleo-dev
|
tripleo-repos current-tripleo-dev
|
||||||
|
|
||||||
Install the mitaka dlrn repo and deps::
|
Install the mitaka dlrn repo and deps::
|
||||||
|
|
||||||
dlrn-repo -b mitaka current deps
|
tripleo-repos -b mitaka current deps
|
||||||
|
|
||||||
Write repos to a different path::
|
Write repos to a different path::
|
||||||
|
|
||||||
dlrn-repo -o ~/test-repos current deps
|
tripleo-repos -o ~/test-repos current deps
|
||||||
|
|
||||||
TripleO
|
TripleO
|
||||||
```````
|
```````
|
||||||
|
@ -41,10 +41,10 @@ TripleO
|
||||||
To use this for TripleO development, replace the tripleo.sh --repo-setup
|
To use this for TripleO development, replace the tripleo.sh --repo-setup
|
||||||
step with the following::
|
step with the following::
|
||||||
|
|
||||||
git clone https://github.com/cybertron/dlrn-repo
|
git clone https://github.com/cybertron/tripleo-repos
|
||||||
cd dlrn-repo
|
cd tripleo-repos
|
||||||
sudo ./setup.py install
|
sudo ./setup.py install
|
||||||
sudo dlrn-repo current-tripleo-dev
|
sudo tripleo-repos current-tripleo-dev
|
||||||
|
|
||||||
Now you're ready to install the undercloud::
|
Now you're ready to install the undercloud::
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ And to build images::
|
||||||
export OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF="$(ls /etc/yum.repos.d/delorean*)"
|
export OVERCLOUD_IMAGES_DIB_YUM_REPO_CONF="$(ls /etc/yum.repos.d/delorean*)"
|
||||||
tripleo.sh --overcloud-images
|
tripleo.sh --overcloud-images
|
||||||
|
|
||||||
.. note:: This is intended as a tool for bootstrapping the repo setup in
|
.. note:: This is a tool for bootstrapping the repo setup for TripleO,
|
||||||
things like TripleO, so it should not have any runtime OpenStack dependencies
|
so it should not have any runtime OpenStack dependencies
|
||||||
or we end up in a chicken-and-egg pickle, and let's be honest - no one wants a
|
or we end up in a chicken-and-egg pickle, and let's be honest - no one wants a
|
||||||
chicken and egg pickle.
|
chicken and egg pickle.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[metadata]
|
[metadata]
|
||||||
name = dlrn-repo
|
name = tripleo-repos
|
||||||
summary = A tool for managing dlrn repos
|
summary = A tool for managing tripleo repos
|
||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
author = Ben Nemec
|
author = Ben Nemec
|
||||||
|
@ -20,11 +20,11 @@ classifier =
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages =
|
packages =
|
||||||
dlrn_repo
|
tripleo_repos
|
||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
dlrn-repo = dlrn_repo.main:main
|
tripleo-repos = tripleo_repos.main:main
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
all_files = 1
|
all_files = 1
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -21,7 +21,7 @@ deps = flake8
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --coverage-package-name=dlrn_repo --testr-args='{posargs}'
|
commands = python setup.py test --coverage --coverage-package-name=tripleo_repos --testr-args='{posargs}'
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = H803
|
ignore = H803
|
||||||
|
|
|
@ -45,14 +45,14 @@ class NoRepoTitle(Exception):
|
||||||
|
|
||||||
def _parse_args():
|
def _parse_args():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description='Download and instll dlrn repos. Note that these repos '
|
description='Download and install repos necessary for TripleO. Note '
|
||||||
'require yum-plugin-priorities in order to function '
|
'that some of these repos require yum-plugin-priorities, '
|
||||||
'correctly, so that will also be installed.',
|
'so that will also be installed.',
|
||||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||||
parser.add_argument('repos', metavar='REPO', nargs='+',
|
parser.add_argument('repos', metavar='REPO', nargs='+',
|
||||||
choices=['current', 'deps', 'current-tripleo',
|
choices=['current', 'deps', 'current-tripleo',
|
||||||
'current-tripleo-dev'],
|
'current-tripleo-dev'],
|
||||||
help='A list of delorean repos. Available repos: '
|
help='A list of repos. Available repos: '
|
||||||
'%(choices)s. current-tripleo-dev '
|
'%(choices)s. current-tripleo-dev '
|
||||||
'downloads the current-tripleo, current, and '
|
'downloads the current-tripleo, current, and '
|
||||||
'deps repos, but sets the current repo to only '
|
'deps repos, but sets the current repo to only '
|
||||||
|
@ -69,8 +69,7 @@ def _parse_args():
|
||||||
'the OpenStack release. e.g. liberty')
|
'the OpenStack release. e.g. liberty')
|
||||||
parser.add_argument('-o', '--output-path',
|
parser.add_argument('-o', '--output-path',
|
||||||
default='/etc/yum.repos.d',
|
default='/etc/yum.repos.d',
|
||||||
help='Directory in which to save the selected dlrn '
|
help='Directory in which to save the selected repos.')
|
||||||
'repos.')
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,16 @@ import sys
|
||||||
import mock
|
import mock
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
from dlrn_repo import main
|
from tripleo_repos import main
|
||||||
|
|
||||||
|
|
||||||
class TestDlrnRepo(testtools.TestCase):
|
class TestDlrnRepo(testtools.TestCase):
|
||||||
@mock.patch('dlrn_repo.main._parse_args')
|
@mock.patch('tripleo_repos.main._parse_args')
|
||||||
@mock.patch('dlrn_repo.main._validate_args')
|
@mock.patch('tripleo_repos.main._validate_args')
|
||||||
@mock.patch('dlrn_repo.main._get_base_path')
|
@mock.patch('tripleo_repos.main._get_base_path')
|
||||||
@mock.patch('dlrn_repo.main._install_priorities')
|
@mock.patch('tripleo_repos.main._install_priorities')
|
||||||
@mock.patch('dlrn_repo.main._remove_existing')
|
@mock.patch('tripleo_repos.main._remove_existing')
|
||||||
@mock.patch('dlrn_repo.main._install_repos')
|
@mock.patch('tripleo_repos.main._install_repos')
|
||||||
def test_main(self, mock_install, mock_remove, mock_ip, mock_gbp,
|
def test_main(self, mock_install, mock_remove, mock_ip, mock_gbp,
|
||||||
mock_validate, mock_parse):
|
mock_validate, mock_parse):
|
||||||
mock_args = mock.Mock()
|
mock_args = mock.Mock()
|
||||||
|
@ -105,8 +105,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
self.assertRaises(subprocess.CalledProcessError,
|
self.assertRaises(subprocess.CalledProcessError,
|
||||||
main._install_priorities)
|
main._install_priorities)
|
||||||
|
|
||||||
@mock.patch('dlrn_repo.main._get_repo')
|
@mock.patch('tripleo_repos.main._get_repo')
|
||||||
@mock.patch('dlrn_repo.main._write_repo')
|
@mock.patch('tripleo_repos.main._write_repo')
|
||||||
def test_install_repos_current(self, mock_write, mock_get):
|
def test_install_repos_current(self, mock_write, mock_get):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.repos = ['current']
|
args.repos = ['current']
|
||||||
|
@ -117,8 +117,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
mock_get.assert_called_once_with('roads/current/delorean.repo')
|
mock_get.assert_called_once_with('roads/current/delorean.repo')
|
||||||
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
||||||
|
|
||||||
@mock.patch('dlrn_repo.main._get_repo')
|
@mock.patch('tripleo_repos.main._get_repo')
|
||||||
@mock.patch('dlrn_repo.main._write_repo')
|
@mock.patch('tripleo_repos.main._write_repo')
|
||||||
def test_install_repos_current_mitaka(self, mock_write, mock_get):
|
def test_install_repos_current_mitaka(self, mock_write, mock_get):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.repos = ['current']
|
args.repos = ['current']
|
||||||
|
@ -130,8 +130,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
mock_write.assert_called_once_with('[delorean-mitaka]\nMr. Fusion',
|
mock_write.assert_called_once_with('[delorean-mitaka]\nMr. Fusion',
|
||||||
'test')
|
'test')
|
||||||
|
|
||||||
@mock.patch('dlrn_repo.main._get_repo')
|
@mock.patch('tripleo_repos.main._get_repo')
|
||||||
@mock.patch('dlrn_repo.main._write_repo')
|
@mock.patch('tripleo_repos.main._write_repo')
|
||||||
def test_install_repos_deps(self, mock_write, mock_get):
|
def test_install_repos_deps(self, mock_write, mock_get):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.repos = ['deps']
|
args.repos = ['deps']
|
||||||
|
@ -143,8 +143,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
mock_write.assert_called_once_with('[delorean-deps]\nMr. Fusion',
|
mock_write.assert_called_once_with('[delorean-deps]\nMr. Fusion',
|
||||||
'test')
|
'test')
|
||||||
|
|
||||||
@mock.patch('dlrn_repo.main._get_repo')
|
@mock.patch('tripleo_repos.main._get_repo')
|
||||||
@mock.patch('dlrn_repo.main._write_repo')
|
@mock.patch('tripleo_repos.main._write_repo')
|
||||||
def test_install_repos_current_tripleo(self, mock_write, mock_get):
|
def test_install_repos_current_tripleo(self, mock_write, mock_get):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.repos = ['current-tripleo']
|
args.repos = ['current-tripleo']
|
||||||
|
@ -157,8 +157,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
'tripleo/delorean.repo')
|
'tripleo/delorean.repo')
|
||||||
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
||||||
|
|
||||||
@mock.patch('dlrn_repo.main._get_repo')
|
@mock.patch('tripleo_repos.main._get_repo')
|
||||||
@mock.patch('dlrn_repo.main._write_repo')
|
@mock.patch('tripleo_repos.main._write_repo')
|
||||||
def test_install_repos_current_tripleo_dev(self, mock_write, mock_get):
|
def test_install_repos_current_tripleo_dev(self, mock_write, mock_get):
|
||||||
args = mock.Mock()
|
args = mock.Mock()
|
||||||
args.repos = ['current-tripleo-dev']
|
args.repos = ['current-tripleo-dev']
|
||||||
|
@ -189,7 +189,7 @@ class TestDlrnRepo(testtools.TestCase):
|
||||||
|
|
||||||
def test_write_repo(self):
|
def test_write_repo(self):
|
||||||
m = mock.mock_open()
|
m = mock.mock_open()
|
||||||
with mock.patch('dlrn_repo.main.open', m, create=True):
|
with mock.patch('tripleo_repos.main.open', m, create=True):
|
||||||
main._write_repo('[delorean]\nThis=Heavy', 'test')
|
main._write_repo('[delorean]\nThis=Heavy', 'test')
|
||||||
m.assert_called_once_with('test/delorean.repo', 'w')
|
m.assert_called_once_with('test/delorean.repo', 'w')
|
||||||
m().write.assert_called_once_with('[delorean]\nThis=Heavy')
|
m().write.assert_called_once_with('[delorean]\nThis=Heavy')
|
Loading…
Reference in New Issue