Commit f2b74061 authored by Thomas Goirand's avatar Thomas Goirand
Browse files

Merge tag '3.9.1' into debian/xena

oslo.vmware 3.9.1 release

meta:version: 3.9.1
meta:diff-start: -
meta:series: xena
meta:release-type: release
meta:pypi: yes
meta:first: no
meta:release:Author: Hervé Beraud <hberaud@redhat.com>
meta:release:Commit: Hervé Beraud <hberaud@redhat.com>
meta:release:Change-Id: Ie77fcd2d48d251b4fb8fae0ec449e0d603fb587f
meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com>
meta:release:Code-Review+2: Thierry Carrez <thierry@openstack.org>
meta:release:Workflow+1: Thierry Carrez <thierry@openstack.org>
parents 50b3130a 3e3fa66c
......@@ -9,7 +9,7 @@ default_language_version:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0
rev: 9136088a246768144165fcc3ecc3d31bb686920a # v3.3.0
hooks:
- id: trailing-whitespace
# Replaces or checks mixed line ending
......@@ -27,9 +27,13 @@ repos:
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://gitlab.com/pycqa/flake8
rev: 181bb46098dddf7e2d45319ea654b4b4d58c2840 # 3.8.3
- repo: local
hooks:
- id: flake8
name: flake8
additional_dependencies:
- hacking>=3.0.1,<3.1.0
language: python
entry: flake8
files: '^.*\.py$'
exclude: '^(doc|releasenotes|tools)/.*$'
......@@ -2,6 +2,6 @@
templates:
- check-requirements
- lib-forward-testing-python3
- openstack-python3-wallaby-jobs
- openstack-python3-xena-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
alabaster==0.7.10
Babel==2.3.4
bandit==1.6.0
coverage==4.0
ddt==1.0.1
debtcollector==1.2.0
docutils==0.11
dulwich==0.15.0
eventlet==0.18.2
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
gitdb==0.6.4
GitPython==1.0.1
greenlet==0.4.15
imagesize==0.7.1
iso8601==0.1.11
Jinja2==2.10
linecache2==1.0.0
lxml==4.5.0
MarkupSafe==1.0
netaddr==0.7.18
netifaces==0.10.4
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.i18n==3.15.3
oslo.utils==3.33.0
pbr==2.0.0
Pygments==2.2.0
pyparsing==2.1.0
python-mimeparse==1.6.0
python-subunit==1.0.0
pytz==2013.6
PyYAML==3.13
requests==2.14.2
rfc3986==0.3.1
smmap==0.9.0
snowballstemmer==1.2.1
stestr==2.0.0
stevedore==1.20.0
suds-jurko==0.6
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0
urllib3==1.21.1
wrapt==1.7.0
......@@ -556,6 +556,10 @@ class VmdkWriteHandle(VmdkHandle):
"""
try:
self._release_lease()
except exceptions.ManagedObjectNotFoundException:
LOG.info("Lease for %(url)s not found. No need to release.",
{'url': self._url})
return
except exceptions.VimException:
LOG.warning("Error occurred while releasing the lease "
"for %s.",
......@@ -637,6 +641,10 @@ class VmdkReadHandle(VmdkHandle):
"""
try:
self._release_lease()
except exceptions.ManagedObjectNotFoundException:
LOG.info("Lease for %(url)s not found. No need to release.",
{'url': self._url})
return
except exceptions.VimException:
LOG.warning("Error occurred while releasing the lease "
"for %s.",
......
......@@ -527,3 +527,33 @@ class VimUtilTest(base.TestCase):
self.assertEqual({"test_name_0": "test_val_0",
"test_name_1": "test_val_1"},
vim_util.propset_dict(mock_propset))
def test_serialize_object(self):
self.assertEqual({}, vim_util.serialize_object({}))
mobj1 = mock.MagicMock()
mobj1.__keylist__ = ['asdf']
mobj1.keys = lambda: ['asdf']
mobj1.__getitem__.side_effect = [1]
mobj2 = mock.Mock()
mobj3 = mock.MagicMock()
mobj3.__keylist__ = ['subkey1', 'subkey2']
mobj3.keys = lambda: ['subkey1', 'subkey2']
mobj3.__getitem__.side_effect = ['subvalue1', True]
mobj4 = 12
obj = {
'foo': mobj1,
'bar': [mobj2, mobj3],
'baz': mobj4
}
expected = {
'foo': {'asdf': 1},
'bar': [mobj2, {'subkey1': 'subvalue1', 'subkey2': True}],
'baz': 12
}
self.assertEqual(expected, vim_util.serialize_object(obj))
......@@ -694,3 +694,21 @@ def storage_placement_spec(client_factory,
spec.resourcePool = res_pool_ref
spec.host = host_ref
return spec
def serialize_object(obj):
"""Convert Suds object into serializable format - a dict."""
d = {}
for k, v in dict(obj).items():
if hasattr(v, '__keylist__'):
d[k] = serialize_object(v)
elif isinstance(v, list):
d[k] = []
for item in v:
if hasattr(item, '__keylist__'):
d[k].append(serialize_object(item))
else:
d[k].append(item)
else:
d[k] = v
return d
......@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
wallaby
victoria
ussuri
train
......
============================
Wallaby Series Release Notes
============================
.. release-notes::
:branch: stable/wallaby
[metadata]
name = oslo.vmware
summary = Oslo VMware library
description-file =
description_file =
README.rst
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/oslo.vmware/latest/
python-requires = >=3.6
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/oslo.vmware/latest/
python_requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
......
[tox]
minversion = 3.2.0
envlist = py38,pep8
envlist = py3,pep8
ignore_basepython_conflict = true
[testenv]
......@@ -8,7 +8,7 @@ basepython = python3
whitelist_externals =
find
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
......@@ -62,7 +62,7 @@ paths = ./oslo_vmware/hacking
[testenv:releasenotes]
whitelist_externals = rm
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-c{env:TOX_CONSTRAINTS_FILE:ttps://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
......@@ -76,9 +76,3 @@ commands =
# explicitly to avoid unnecessarily installing the checked-out repo too.
deps = bindep
commands = bindep test
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment