summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml2
-rw-r--r--doc/source/conf.py2
-rw-r--r--oslo_config/generator.py6
-rw-r--r--oslo_config/tests/test_cfg.py45
-rw-r--r--oslo_config/tests/test_get_location.py2
-rw-r--r--releasenotes/source/conf.py10
-rw-r--r--releasenotes/source/index.rst29
-rw-r--r--releasenotes/source/wallaby.rst6
8 files changed, 70 insertions, 32 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 8425030..84bb45c 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -2,7 +2,7 @@
templates:
- check-requirements
- lib-forward-testing-python3
- - openstack-python3-wallaby-jobs
+ - openstack-python3-xena-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 3535e20..975740f 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -51,7 +51,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-copyright = u'2013, OpenStack Foundation'
+copyright = '2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
diff --git a/oslo_config/generator.py b/oslo_config/generator.py
index 9fdde09..9845c81 100644
--- a/oslo_config/generator.py
+++ b/oslo_config/generator.py
@@ -288,11 +288,9 @@ class _OptFormatter:
else:
opt_help = opt.help
- help_text = u'%s%s (%s)' % (opt_prefix,
- opt_help,
- opt_type)
+ help_text = '%s%s (%s)' % (opt_prefix, opt_help, opt_type)
else:
- help_text = u'(%s)' % opt_type
+ help_text = '(%s)' % opt_type
lines = self._format_help(help_text)
if getattr(opt.type, 'min', None) is not None:
diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py
index 505cb00..0686eca 100644
--- a/oslo_config/tests/test_cfg.py
+++ b/oslo_config/tests/test_cfg.py
@@ -264,8 +264,10 @@ class HelpTestCase(BaseTestCase):
class FindConfigFilesTestCase(BaseTestCase):
def test_find_config_files(self):
- config_files = [os.path.expanduser('~/.blaa/blaa.conf'),
- '/etc/foo.conf']
+ config_files = [
+ os.path.expanduser('~/.blaa/blaa.conf'),
+ '/etc/foo.conf',
+ ]
self.useFixture(fixtures.MonkeyPatch('sys.argv', ['foo']))
self.useFixture(fixtures.MonkeyPatch('os.path.exists',
@@ -273,11 +275,42 @@ class FindConfigFilesTestCase(BaseTestCase):
self.assertEqual(cfg.find_config_files(project='blaa'), config_files)
+ def test_find_config_files_overrides(self):
+ """Ensure priority of directories is enforced.
+
+ Ensure we will only ever return two files: $project.conf and
+ $prog.conf.
+ """
+ config_files = [
+ os.path.expanduser('~/.foo/foo.conf'),
+ # no '~/.foo/bar.conf' to make sure we fall through
+ os.path.expanduser('~/foo.conf'),
+ os.path.expanduser('~/bar.conf'),
+ '/etc/foo/foo.conf',
+ '/etc/foo/bar.conf',
+ '/etc/foo.conf',
+ '/etc/bar.conf',
+ ]
+
+ self.useFixture(fixtures.MonkeyPatch(
+ 'os.path.exists', lambda p: p in config_files))
+
+ expected = [
+ os.path.expanduser('~/.foo/foo.conf'),
+ os.path.expanduser('~/bar.conf'),
+ ]
+ actual = cfg.find_config_files(project='foo', prog='bar')
+ self.assertEqual(expected, actual)
+
def test_find_config_files_snap(self):
- config_files = ['/snap/nova/current/etc/blaa/blaa.conf',
- '/var/snap/nova/common/etc/blaa/blaa.conf']
- fake_env = {'SNAP': '/snap/nova/current/',
- 'SNAP_COMMON': '/var/snap/nova/common/'}
+ config_files = [
+ '/snap/nova/current/etc/blaa/blaa.conf',
+ '/var/snap/nova/common/etc/blaa/blaa.conf',
+ ]
+ fake_env = {
+ 'SNAP': '/snap/nova/current/',
+ 'SNAP_COMMON': '/var/snap/nova/common/',
+ }
self.useFixture(fixtures.MonkeyPatch('sys.argv', ['foo']))
self.useFixture(fixtures.MonkeyPatch('os.path.exists',
diff --git a/oslo_config/tests/test_get_location.py b/oslo_config/tests/test_get_location.py
index 9541708..d06271a 100644
--- a/oslo_config/tests/test_get_location.py
+++ b/oslo_config/tests/test_get_location.py
@@ -137,7 +137,7 @@ class GetLocationTestCase(base.BaseTestCase):
def _write_opt_to_tmp_file(self, group, option, value):
filename = tempfile.mktemp()
with io.open(filename, 'w', encoding='utf-8') as f:
- f.write(textwrap.dedent(u'''
+ f.write(textwrap.dedent('''
[{group}]
{option} = {value}
''').format(
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 92eb659..8fd6fe9 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -60,7 +60,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
-copyright = u'2016, oslo.config Developers'
+copyright = '2016, oslo.config Developers'
# Release notes do not need a version in the title, they span
# multiple versions.
@@ -196,8 +196,8 @@ html_static_path = ['_static']
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'oslo.configreleasenotes',
- u'oslo.config Release Notes Documentation',
- [u'oslo.config Developers'], 1)
+ 'oslo.config Release Notes Documentation',
+ ['oslo.config Developers'], 1)
]
# If true, show URL addresses after external links.
@@ -211,8 +211,8 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'oslo.configReleaseNotes',
- u'oslo.config Release Notes Documentation',
- u'oslo.config Developers', 'oslo.configReleaseNotes',
+ 'oslo.config Release Notes Documentation',
+ 'oslo.config Developers', 'oslo.configReleaseNotes',
'An OpenStack library for parsing configuration options from the command'
' line and configuration files.',
'Miscellaneous'),
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
index 0ebefc1..7466d11 100644
--- a/releasenotes/source/index.rst
+++ b/releasenotes/source/index.rst
@@ -2,18 +2,19 @@
oslo.config Release Notes
===========================
- .. toctree::
- :maxdepth: 1
+.. toctree::
+ :maxdepth: 1
- unreleased
- victoria
- ussuri
- train
- stein
- rocky
- queens
- pike
- ocata
- newton
- mitaka
- liberty
+ unreleased
+ wallaby
+ victoria
+ ussuri
+ train
+ stein
+ rocky
+ queens
+ pike
+ ocata
+ newton
+ mitaka
+ liberty
diff --git a/releasenotes/source/wallaby.rst b/releasenotes/source/wallaby.rst
new file mode 100644
index 0000000..d77b565
--- /dev/null
+++ b/releasenotes/source/wallaby.rst
@@ -0,0 +1,6 @@
+============================
+Wallaby Series Release Notes
+============================
+
+.. release-notes::
+ :branch: stable/wallaby