diff options
author | Matt Riedemann <mriedem@us.ibm.com> | 2016-08-19 15:00:40 -0400 |
---|---|---|
committer | Matt Riedemann <mriedem@us.ibm.com> | 2016-08-19 16:25:07 -0400 |
commit | 20b721e1ad434cdebe1a4aa34cca8d1e2772fdcf (patch) | |
tree | a24d5a417cc061e4cbbc2529965f219749e68b09 /novaclient/api_versions.py | |
parent | 4215e3fd2f0a32e5f6b5f05aa4f4656efee384d2 (diff) | |
download | python-novaclient-20b721e1ad434cdebe1a4aa34cca8d1e2772fdcf.tar.gz |
Cap image API deprecated methods at 2.35
The image proxy API GET/DELETE methods are deprecated
at microversion 2.36 and will return a 404 after that.
This adds the wraps decorator to those python API methods
so set the cap at 2.35 so rather than get a 404 you'll
get a more uesful VersionNotFoundForAPIMethod.
Note that set_meta and delete_meta are not decorated
because we missed deprecating the image-metadata proxy API
with the 2.36 microversion. That will be fixed in Ocata.
Related to blueprint deprecate-api-proxies
Change-Id: Ie65efadb5c65e8a624ffd0315a634accd49f1c30
Diffstat (limited to 'novaclient/api_versions.py')
-rw-r--r-- | novaclient/api_versions.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/novaclient/api_versions.py b/novaclient/api_versions.py index 4abea01a..65e510b5 100644 --- a/novaclient/api_versions.py +++ b/novaclient/api_versions.py @@ -374,6 +374,9 @@ def get_substitutions(func_name, api_version=None): return sorted(substitutions, key=lambda m: m.start_version) +# FIXME(mriedem): This breaks any ManagerWithFind.list method that has a +# 'detailed' kwarg since the ManagerWithFind.findall won't find the correct +# argspec from the wrapped list method. def wraps(start_version, end_version=None): start_version = APIVersion(start_version) if end_version: |