This patch was generated by the sixer tool version 0.2 using the
"iteritems" operation:
https://pypi.python.org/pypi/sixer
Manual changes:
- Don't change get_instance_metadata() in nova/compute/api.py:
fixed by the change Ifd455e70002eb9636b87f83788384127ba6edeeb.
- Don't change sqlalchemy code and
nova/tests/unit/db/test_db_api.py. sqlalchemy objects cannot be
converted to a dictionary using dict(obj) directly yet. It will be
possible with the change I702be362a58155a28482e733e60539d36c039509.
- Revert change in a comment in nova/objects/instance.py; the sixer tool
is limited and don't understand comments
- Reformat nova/virt/vmwareapi/driver.py to respect the 80 columns
contraint
Blueprint nova-python3
Change-Id: I81465661cb8a74778d70ba9b6641073f1effa49b
The function xrange() was renamed to range() in Python 3.
Use "from six.moves import range" to get xrange() on Python 2 and range() on
Python 3 as the name "range", and replace "xrange()" with "range()".
The import is omitted for small ranges (1024 items or less).
This patch was generated by the following tool (revision 0c1d096b3903)
with the "xrange" operation:
https://bitbucket.org/haypo/misc/src/tip/python/sixer.py
Manual change:
* Replace range(n) with list(range(n)) in a loop of
nova/virt/libvirt/driver.py which uses list.pop()
Blueprint nova-python3
Change-Id: Iceda35cace04cc8ddc6adbd59df4613b22b39793
On Python 3, iterators have a __next__() method, but no next() method.
Use the builtin next() function which works on Python 2 and Python 3.
This patch was generated by the sixer tool version 0.2:
https://pypi.python.org/pypi/sixer
Manual change:
* Fix indentation
* tarfile.TarFile is not an iterator and has a next() method on Python 2
and Python 3: revert changes in
nova/tests/unit/virt/xenapi/image/test_utils.py and changes on
self._tarfile in nova/virt/xenapi/image/utils.py.
Blueprint nova-python3
Change-Id: Ie691d6f236a5aeef049f0b191dd07167020443d7
assertions compare parsed response so element order message/code
became not important
Partial-Bug: #1348818
Change-Id: I0be46d38851f4532a0d0738fc1c93d56faa22052
Finish off use of a definition of what the api request version header is rather
than literally copy it through the tests. This was partially done in the dependent
changeset I3ea2b2982c5f792c82832d772ae951b157da8b39
Partially implements blueprint api-microversions
Change-Id: I029d0f4d9b11a47925aaa0faaa97384f2af80ba9
Ironic has already implemented its own microversion mechanism, and
the header name is X-Ironic-API-Version, not X-Baremetal-API-Version.
Because Ida9f60d8cbd0dcf48669b82e619fc4016ee0bcb7 removed program
terminology from the governance repo.
The microversions of Nova is not used yet. And for consistency of
whole OpenStack projects, this patch changes microversion header
names on Nova side.
Partially implements blueprint api-microversions
Change-Id: I3ea2b2982c5f792c82832d772ae951b157da8b39
Depends-on: I1b43e2662107ad81e57b96f0c9430c61b795fdea
Fix H238 failures and enable check for H238
H238 old style class declaration, use new style
(inherit from `object`)
Change-Id: I71dd353ab260a513c5df5af0ee07754e23878570
In I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0 we switched off XML support. In
this review we entirely remove all the testcases and supporting files.
Change-Id: I83827d438753fd3899053dd6e09bc77c997c7406
Adds support for specifying 'latest' as the version of the API in
the X-OpenStack-Compute-API-Version header. This will always
behave as if a request was made for the maximum version
supported.
Partially implements blueprint api-microversions
Change-Id: Ib40b20a01991e6f356b9376f797405a4c50b7e99
Adds the following headers to REST API headers for API
microversions:
X-OpenStack-Compute-API-Version: Version
Vary: X-OpenStack-Compute-API-Version
Partially implements blueprint api-microversions
Change-Id: I5748d7b81b355bf8aad6bb8703d1a29a97798452
Adds a check for a request that the version requested is within the
global API version range supported by the REST API. Both the minimum
and maximum are currently set to "2.1". The maximum will be increased
everytime an API change is made.
Also sets up some template/doc files for clearly documenting
the REST API changes with each microversion increment.
Partially implements blueprint api-microversions
Change-Id: Ie7fdb2928d957c03ed788c2ddd29fe798c645fce
Nova's XML support has been deprecated with a warning that it could be
removed as early as Juno. Now that we are in Kilo we are ready to remove
support. Before actually doing the surgery to properly remove XML
support, intentionally break XML support in a 'clean' way, so if someone
freaks out that we are removing XML support we can easily re-enable it.
Follow up to I4acc15ce5f487738bb34a95c2261a5d05d827d8d
Co-Authored-By: Joe Gordon <joe.gordon0@gmail.com>
Change-Id: I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0
This adds the looking for the X-Openstack-Compute-API-Version
header on REST API requests. If it is found it is parsed and the
version information attached to the request which is passed to
the API code. If the header does not exist then a version of 2.1
is set. If the header is specified but badly formatted a 400 Bad
Request is returned to the client.
Partially implements blueprint api-microversions
Change-Id: I8e73533cb0256b8a9329870714ffacb9893bb4c7
As part of the split of functional and unit tests we need to isolate
the unit tests into a separate directory for having multiple test
targets in a sane way.
Part of bp:functional-tests-for-nova
Change-Id: Id42ba373c1bda6a312b673ab2b489ca56da8c628