summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml2
-rw-r--r--doc/requirements.txt3
-rw-r--r--glanceclient/tests/functional/v1/test_readonly_glance.py2
-rw-r--r--glanceclient/tests/functional/v2/test_readonly_glance.py2
-rw-r--r--glanceclient/tests/unit/test_http.py10
-rw-r--r--glanceclient/tests/unit/v2/test_metadefs_namespaces.py1
-rw-r--r--glanceclient/tests/unit/v2/test_metadefs_objects.py1
-rw-r--r--glanceclient/tests/unit/v2/test_shell_v2.py2
-rw-r--r--glanceclient/v2/images.py6
-rw-r--r--glanceclient/v2/shell.py18
-rw-r--r--lower-constraints.txt4
-rw-r--r--releasenotes/notes/3.1.0_Release-1337ddc753b88905.yaml25
-rw-r--r--releasenotes/source/index.rst1
-rw-r--r--releasenotes/source/ussuri.rst6
-rw-r--r--setup.cfg2
-rw-r--r--setup.py9
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini3
18 files changed, 62 insertions, 37 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index c48d6f4..14adc2b 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -82,7 +82,7 @@
- lib-forward-testing-python3
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- - openstack-python3-ussuri-jobs
+ - openstack-python3-victoria-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 4c33153..e8ba0fa 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -3,6 +3,5 @@
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.20.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
-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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD
+sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
diff --git a/glanceclient/tests/functional/v1/test_readonly_glance.py b/glanceclient/tests/functional/v1/test_readonly_glance.py
index 122c61b..a7024aa 100644
--- a/glanceclient/tests/functional/v1/test_readonly_glance.py
+++ b/glanceclient/tests/functional/v1/test_readonly_glance.py
@@ -52,7 +52,7 @@ class SimpleReadOnlyGlanceClientTest(base.ClientTestBase):
commands = []
cmds_start = lines.index('Positional arguments:')
cmds_end = lines.index('Optional arguments:')
- command_pattern = re.compile('^ {4}([a-z0-9\-\_]+)')
+ command_pattern = re.compile(r'^ {4}([a-z0-9\-\_]+)')
for line in lines[cmds_start:cmds_end]:
match = command_pattern.match(line)
if match:
diff --git a/glanceclient/tests/functional/v2/test_readonly_glance.py b/glanceclient/tests/functional/v2/test_readonly_glance.py
index c024303..4d7f92d 100644
--- a/glanceclient/tests/functional/v2/test_readonly_glance.py
+++ b/glanceclient/tests/functional/v2/test_readonly_glance.py
@@ -72,7 +72,7 @@ class SimpleReadOnlyGlanceClientTest(base.ClientTestBase):
commands = []
cmds_start = lines.index('Positional arguments:')
cmds_end = lines.index('Optional arguments:')
- command_pattern = re.compile('^ {4}([a-z0-9\-\_]+)')
+ command_pattern = re.compile(r'^ {4}([a-z0-9\-\_]+)')
for line in lines[cmds_start:cmds_end]:
match = command_pattern.match(line)
if match:
diff --git a/glanceclient/tests/unit/test_http.py b/glanceclient/tests/unit/test_http.py
index 2f72b9a..b2035c9 100644
--- a/glanceclient/tests/unit/test_http.py
+++ b/glanceclient/tests/unit/test_http.py
@@ -367,11 +367,11 @@ class TestClient(testtools.TestCase):
self.assertTrue(mock_log.called, 'LOG.debug never called')
self.assertTrue(mock_log.call_args[0],
'LOG.debug called with no arguments')
- hd_regex = ".*\s-H\s+'\s*%s\s*:\s*%s\s*'.*" % (hd_name, hd_val)
+ hd_regex = r".*\s-H\s+'\s*%s\s*:\s*%s\s*'.*" % (hd_name, hd_val)
self.assertThat(mock_log.call_args[0][0],
matchers.MatchesRegex(hd_regex),
'header not found in curl command')
- body_regex = ".*\s-d\s+'%s'\s.*" % body
+ body_regex = r".*\s-d\s+'%s'\s.*" % body
self.assertThat(mock_log.call_args[0][0],
matchers.MatchesRegex(body_regex),
'body not found in curl command')
@@ -390,12 +390,12 @@ class TestClient(testtools.TestCase):
needles = {'key': key, 'cert': cert, 'cacert': cacert}
for option, value in needles.items():
if value:
- regex = ".*\s--%s\s+('%s'|%s).*" % (option, value, value)
+ regex = r".*\s--%s\s+('%s'|%s).*" % (option, value, value)
self.assertThat(mock_log.call_args[0][0],
matchers.MatchesRegex(regex),
'no --%s option in curl command' % option)
else:
- regex = ".*\s--%s\s+.*" % option
+ regex = r".*\s--%s\s+.*" % option
self.assertThat(mock_log.call_args[0][0],
matchers.Not(matchers.MatchesRegex(regex)),
'unexpected --%s option in curl command' %
@@ -421,7 +421,7 @@ class TestClient(testtools.TestCase):
self.assertTrue(mock_log.call_args[0],
'LOG.debug called with no arguments')
self.assertThat(mock_log.call_args[0][0],
- matchers.MatchesRegex('.*\s-k\s.*'),
+ matchers.MatchesRegex(r'.*\s-k\s.*'),
'no -k option in curl command')
@mock.patch('glanceclient.common.http.LOG.debug')
diff --git a/glanceclient/tests/unit/v2/test_metadefs_namespaces.py b/glanceclient/tests/unit/v2/test_metadefs_namespaces.py
index 1c19d8b..35d7198 100644
--- a/glanceclient/tests/unit/v2/test_metadefs_namespaces.py
+++ b/glanceclient/tests/unit/v2/test_metadefs_namespaces.py
@@ -58,6 +58,7 @@ def _get_namespace_fixture(ns_name, rt_name=RESOURCE_TYPE1, **kwargs):
return ns
+
data_fixtures = {
"/v2/metadefs/namespaces?limit=20": {
"GET": (
diff --git a/glanceclient/tests/unit/v2/test_metadefs_objects.py b/glanceclient/tests/unit/v2/test_metadefs_objects.py
index 5de3112..bc3b669 100644
--- a/glanceclient/tests/unit/v2/test_metadefs_objects.py
+++ b/glanceclient/tests/unit/v2/test_metadefs_objects.py
@@ -58,6 +58,7 @@ def _get_object_fixture(ns_name, obj_name, **kwargs):
return obj
+
data_fixtures = {
"/v2/metadefs/namespaces/%s/objects" % NAMESPACE1: {
"GET": (
diff --git a/glanceclient/tests/unit/v2/test_shell_v2.py b/glanceclient/tests/unit/v2/test_shell_v2.py
index c43f606..9d10ff2 100644
--- a/glanceclient/tests/unit/v2/test_shell_v2.py
+++ b/glanceclient/tests/unit/v2/test_shell_v2.py
@@ -55,6 +55,8 @@ def schema_args(schema_getter, omit=None):
'locations': {'type': 'string'},
'copy_from': {'type': 'string'}}}
return original_schema_args(my_schema_getter, omit)
+
+
utils.schema_args = schema_args
from glanceclient.v2 import shell as test_shell # noqa
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py
index 1e8e621..c062cb8 100644
--- a/glanceclient/v2/images.py
+++ b/glanceclient/v2/images.py
@@ -335,13 +335,13 @@ class Controller(object):
if stores:
data['stores'] = stores
if allow_failure:
- data['all_stores_must_succeed'] = 'false'
+ data['all_stores_must_succeed'] = False
if backend is not None:
headers['x-image-meta-store'] = backend
if all_stores:
- data['all_stores'] = 'true'
+ data['all_stores'] = True
if allow_failure:
- data['all_stores_must_succeed'] = 'false'
+ data['all_stores_must_succeed'] = False
if uri:
if method == 'web-download':
diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py
index b4dc811..8414308 100644
--- a/glanceclient/v2/shell.py
+++ b/glanceclient/v2/shell.py
@@ -840,15 +840,15 @@ def do_image_reactivate(gc, args):
@utils.arg('tag_value', metavar='<TAG_VALUE>',
help=_('Value of the tag.'))
def do_image_tag_update(gc, args):
- """Update an image with the given tag."""
- if not (args.image_id and args.tag_value):
- utils.exit('Unable to update tag. Specify image_id and tag_value')
- else:
- gc.image_tags.update(args.image_id, args.tag_value)
- image = gc.images.get(args.image_id)
- image = [image]
- columns = ['ID', 'Tags']
- utils.print_list(image, columns)
+ """Update an image with the given tag."""
+ if not (args.image_id and args.tag_value):
+ utils.exit('Unable to update tag. Specify image_id and tag_value')
+ else:
+ gc.image_tags.update(args.image_id, args.tag_value)
+ image = gc.images.get(args.image_id)
+ image = [image]
+ columns = ['ID', 'Tags']
+ utils.print_list(image, columns)
@utils.arg('image_id', metavar='<IMAGE_ID>',
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 61be707..f5a1880 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -13,9 +13,7 @@ dulwich==0.15.0
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
-flake8==2.5.5
future==0.16.0
-hacking==0.12.0
idna==2.6
imagesize==0.7.1
iso8601==0.1.11
@@ -45,11 +43,9 @@ oslo.serialization==2.18.0
oslo.utils==3.33.0
paramiko==2.0.0
pbr==2.0.0
-pep8==1.5.7
prettytable==0.7.1
pyasn1==0.1.8
pycparser==2.18
-pyflakes==0.8.1
Pygments==2.2.0
pyinotify==0.9.6
pyOpenSSL==17.1.0
diff --git a/releasenotes/notes/3.1.0_Release-1337ddc753b88905.yaml b/releasenotes/notes/3.1.0_Release-1337ddc753b88905.yaml
new file mode 100644
index 0000000..d4ef2de
--- /dev/null
+++ b/releasenotes/notes/3.1.0_Release-1337ddc753b88905.yaml
@@ -0,0 +1,25 @@
+---
+prelude: |
+ This version of python-glanceclient finalizes client-side support for
+ the Glance import image in multiple stores, copy existing image in
+ multiple stores and delete image from single store.
+fixes:
+ - |
+ Bug 1838694: glanceclient doesn't cleanup session it creates if one is not provided
+
+ .. _1838694: https://bugs.launchpad.net/python-glanceclient/+bug/1838694
+upgrade:
+ - |
+ The following Command Line Interface calls now take ``--stores``,
+ ``--all-stores`` and ``--allow-failure`` option:
+
+ * ``glance image-create-via-import``
+ * ``glance image-import``
+
+ The value for ``--stores`` option is a list of store identifiers. The
+ list of available stores may be obtained from the ``glance stores-info``
+ command.
+
+ The value for ``--all-stores`` option could be True or False.
+
+ The value for ``--allow-failure`` option could be True or False.
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
index 1567c44..6dae364 100644
--- a/releasenotes/source/index.rst
+++ b/releasenotes/source/index.rst
@@ -6,6 +6,7 @@ glanceclient Release Notes
:maxdepth: 1
unreleased
+ ussuri
train
stein
rocky
diff --git a/releasenotes/source/ussuri.rst b/releasenotes/source/ussuri.rst
new file mode 100644
index 0000000..e21e50e
--- /dev/null
+++ b/releasenotes/source/ussuri.rst
@@ -0,0 +1,6 @@
+===========================
+Ussuri Series Release Notes
+===========================
+
+.. release-notes::
+ :branch: stable/ussuri
diff --git a/setup.cfg b/setup.cfg
index 6d2ec66..170db57 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -17,6 +17,8 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
+ Programming Language :: Python :: Implementation :: CPython
+ Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
diff --git a/setup.py b/setup.py
index 566d844..cd35c3c 100644
--- a/setup.py
+++ b/setup.py
@@ -13,17 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
-# In python < 2.7.4, a lazy loading of package `pbr` will break
-# setuptools if some other modules registered functions in `atexit`.
-# solution from: http://bugs.python.org/issue15881#msg170215
-try:
- import multiprocessing # noqa
-except ImportError:
- pass
-
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
diff --git a/test-requirements.txt b/test-requirements.txt
index 8e8541c..3a6aa59 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-hacking>=1.1.0,<1.2.0 # Apache-2.0
+hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
diff --git a/tox.ini b/tox.ini
index 0cd66e0..0378f5b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -63,7 +63,8 @@ commands =
[flake8]
# E731 skipped as assign a lambda expression
-ignore = E731,F403,F812,F821
+# W504 line break after binary operator
+ignore = E731,F403,F812,F821,W504
show-source = True
exclude = .venv*,.tox,dist,*egg,build,.git,doc,*lib/python*,.update-venv