Rename from dlrn-repo to tripleo-repos
This commit is contained in:
parent
3bcdfae16d
commit
e6fec8c86b
@ -1,4 +1,4 @@
|
||||
[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_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
|
||||
|
||||
@ -10,30 +10,30 @@ require that to work sanely.
|
||||
|
||||
.. note:: The tool will remove any delorean* repos at the target location
|
||||
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
|
||||
--------
|
||||
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::
|
||||
|
||||
dlrn-repo current-tripleo deps
|
||||
tripleo-repos current-tripleo deps
|
||||
|
||||
Install the current-tripleo-dev repo. This will also pull current and deps,
|
||||
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::
|
||||
|
||||
dlrn-repo -b mitaka current deps
|
||||
tripleo-repos -b mitaka current deps
|
||||
|
||||
Write repos to a different path::
|
||||
|
||||
dlrn-repo -o ~/test-repos current deps
|
||||
tripleo-repos -o ~/test-repos current deps
|
||||
|
||||
TripleO
|
||||
```````
|
||||
@ -41,10 +41,10 @@ TripleO
|
||||
To use this for TripleO development, replace the tripleo.sh --repo-setup
|
||||
step with the following::
|
||||
|
||||
git clone https://github.com/cybertron/dlrn-repo
|
||||
cd dlrn-repo
|
||||
git clone https://github.com/cybertron/tripleo-repos
|
||||
cd tripleo-repos
|
||||
sudo ./setup.py install
|
||||
sudo dlrn-repo current-tripleo-dev
|
||||
sudo tripleo-repos current-tripleo-dev
|
||||
|
||||
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*)"
|
||||
tripleo.sh --overcloud-images
|
||||
|
||||
.. note:: This is intended as a tool for bootstrapping the repo setup in
|
||||
things like TripleO, so it should not have any runtime OpenStack dependencies
|
||||
.. note:: This is a tool for bootstrapping the repo setup for TripleO,
|
||||
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
|
||||
chicken and egg pickle.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = dlrn-repo
|
||||
summary = A tool for managing dlrn repos
|
||||
name = tripleo-repos
|
||||
summary = A tool for managing tripleo repos
|
||||
description-file =
|
||||
README.rst
|
||||
author = Ben Nemec
|
||||
@ -20,11 +20,11 @@ classifier =
|
||||
|
||||
[files]
|
||||
packages =
|
||||
dlrn_repo
|
||||
tripleo_repos
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
dlrn-repo = dlrn_repo.main:main
|
||||
tripleo-repos = tripleo_repos.main:main
|
||||
|
||||
[build_sphinx]
|
||||
all_files = 1
|
||||
|
2
tox.ini
2
tox.ini
@ -21,7 +21,7 @@ deps = flake8
|
||||
commands = flake8
|
||||
|
||||
[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]
|
||||
ignore = H803
|
||||
|
@ -45,14 +45,14 @@ class NoRepoTitle(Exception):
|
||||
|
||||
def _parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Download and instll dlrn repos. Note that these repos '
|
||||
'require yum-plugin-priorities in order to function '
|
||||
'correctly, so that will also be installed.',
|
||||
description='Download and install repos necessary for TripleO. Note '
|
||||
'that some of these repos require yum-plugin-priorities, '
|
||||
'so that will also be installed.',
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
|
||||
parser.add_argument('repos', metavar='REPO', nargs='+',
|
||||
choices=['current', 'deps', 'current-tripleo',
|
||||
'current-tripleo-dev'],
|
||||
help='A list of delorean repos. Available repos: '
|
||||
help='A list of repos. Available repos: '
|
||||
'%(choices)s. current-tripleo-dev '
|
||||
'downloads the current-tripleo, current, and '
|
||||
'deps repos, but sets the current repo to only '
|
||||
@ -69,8 +69,7 @@ def _parse_args():
|
||||
'the OpenStack release. e.g. liberty')
|
||||
parser.add_argument('-o', '--output-path',
|
||||
default='/etc/yum.repos.d',
|
||||
help='Directory in which to save the selected dlrn '
|
||||
'repos.')
|
||||
help='Directory in which to save the selected repos.')
|
||||
return parser.parse_args()
|
||||
|
||||
|
@ -18,16 +18,16 @@ import sys
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from dlrn_repo import main
|
||||
from tripleo_repos import main
|
||||
|
||||
|
||||
class TestDlrnRepo(testtools.TestCase):
|
||||
@mock.patch('dlrn_repo.main._parse_args')
|
||||
@mock.patch('dlrn_repo.main._validate_args')
|
||||
@mock.patch('dlrn_repo.main._get_base_path')
|
||||
@mock.patch('dlrn_repo.main._install_priorities')
|
||||
@mock.patch('dlrn_repo.main._remove_existing')
|
||||
@mock.patch('dlrn_repo.main._install_repos')
|
||||
@mock.patch('tripleo_repos.main._parse_args')
|
||||
@mock.patch('tripleo_repos.main._validate_args')
|
||||
@mock.patch('tripleo_repos.main._get_base_path')
|
||||
@mock.patch('tripleo_repos.main._install_priorities')
|
||||
@mock.patch('tripleo_repos.main._remove_existing')
|
||||
@mock.patch('tripleo_repos.main._install_repos')
|
||||
def test_main(self, mock_install, mock_remove, mock_ip, mock_gbp,
|
||||
mock_validate, mock_parse):
|
||||
mock_args = mock.Mock()
|
||||
@ -105,8 +105,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
self.assertRaises(subprocess.CalledProcessError,
|
||||
main._install_priorities)
|
||||
|
||||
@mock.patch('dlrn_repo.main._get_repo')
|
||||
@mock.patch('dlrn_repo.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._get_repo')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
def test_install_repos_current(self, mock_write, mock_get):
|
||||
args = mock.Mock()
|
||||
args.repos = ['current']
|
||||
@ -117,8 +117,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
mock_get.assert_called_once_with('roads/current/delorean.repo')
|
||||
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
||||
|
||||
@mock.patch('dlrn_repo.main._get_repo')
|
||||
@mock.patch('dlrn_repo.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._get_repo')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
def test_install_repos_current_mitaka(self, mock_write, mock_get):
|
||||
args = mock.Mock()
|
||||
args.repos = ['current']
|
||||
@ -130,8 +130,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
mock_write.assert_called_once_with('[delorean-mitaka]\nMr. Fusion',
|
||||
'test')
|
||||
|
||||
@mock.patch('dlrn_repo.main._get_repo')
|
||||
@mock.patch('dlrn_repo.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._get_repo')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
def test_install_repos_deps(self, mock_write, mock_get):
|
||||
args = mock.Mock()
|
||||
args.repos = ['deps']
|
||||
@ -143,8 +143,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
mock_write.assert_called_once_with('[delorean-deps]\nMr. Fusion',
|
||||
'test')
|
||||
|
||||
@mock.patch('dlrn_repo.main._get_repo')
|
||||
@mock.patch('dlrn_repo.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._get_repo')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
def test_install_repos_current_tripleo(self, mock_write, mock_get):
|
||||
args = mock.Mock()
|
||||
args.repos = ['current-tripleo']
|
||||
@ -157,8 +157,8 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
'tripleo/delorean.repo')
|
||||
mock_write.assert_called_once_with('[delorean]\nMr. Fusion', 'test')
|
||||
|
||||
@mock.patch('dlrn_repo.main._get_repo')
|
||||
@mock.patch('dlrn_repo.main._write_repo')
|
||||
@mock.patch('tripleo_repos.main._get_repo')
|
||||
@mock.patch('tripleo_repos.main._write_repo')
|
||||
def test_install_repos_current_tripleo_dev(self, mock_write, mock_get):
|
||||
args = mock.Mock()
|
||||
args.repos = ['current-tripleo-dev']
|
||||
@ -189,7 +189,7 @@ class TestDlrnRepo(testtools.TestCase):
|
||||
|
||||
def test_write_repo(self):
|
||||
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')
|
||||
m.assert_called_once_with('test/delorean.repo', 'w')
|
||||
m().write.assert_called_once_with('[delorean]\nThis=Heavy')
|
Loading…
x
Reference in New Issue
Block a user