summaryrefslogtreecommitdiff
path: root/novaclient/shell.py
diff options
context:
space:
mode:
authorMatt Riedemann <mriedem@us.ibm.com>2015-10-01 09:19:14 -0700
committerMatt Riedemann <mriedem@us.ibm.com>2015-10-01 14:18:05 -0700
commitd045019f0f2d28f26730b3617f7d7b993506b6e8 (patch)
treec729f294d5178134fc38d7d2b060156d73039857 /novaclient/shell.py
parentabd0630badaff18ca998db2feccb058e8ee75f23 (diff)
downloadpython-novaclient-d045019f0f2d28f26730b3617f7d7b993506b6e8.tar.gz
Set DEFAULT_OS_COMPUTE_API_VERSION to 2.5
The client currently implements support for microversions 2.2, 2.4 and 2.11. According the nova API microversion history: http://docs.openstack.org/developer/nova/api_microversion_history.html 2.3 just returns extra attributes in the response so it's not a problem for the client. We should expose those at some point but it's not a breaking change. 2.5 is a server-side only change since the client allows filtering servers by IPv6 address but the server wasn't honoring that until 2.5. There are no client side changes for that microversion. 2.6 is the first backwards incompatible microversion since it replaces the old specific console APIs (RDP/serial/SPICE/VNC) with a new generic remote-consoles API. The client must be updated to handle this since requesting any microversion >=2.6 for consoles will fail right now. This is exposed on the CLI right now because the CLI defaults to the 2.latest microversion. So even though the client actually supports the 2.11 microversion, we shouldn't default to higher than 2.5 because we have gaps in handling 2.6->2.10. This change fixes the default for the CLI by setting DEFAULT_OS_COMPUTE_API_VERSION=2.5. Partial-Bug: #1500688 Change-Id: I52074f9a3e7faa6a7a51c3fa9766100acf25dee2
Diffstat (limited to 'novaclient/shell.py')
-rw-r--r--novaclient/shell.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/novaclient/shell.py b/novaclient/shell.py
index 9a7d06cb..05651734 100644
--- a/novaclient/shell.py
+++ b/novaclient/shell.py
@@ -51,7 +51,16 @@ from novaclient.openstack.common import cliutils
from novaclient import utils
DEFAULT_MAJOR_OS_COMPUTE_API_VERSION = "2.0"
-DEFAULT_OS_COMPUTE_API_VERSION = "2.latest"
+# We default to the highest *incremental* version that we know we can support.
+# There should not be gaps in support for this version even if
+# novaclient.API_MAX_VERSION is higher. The difference is API_MAX_VERSION
+# caps what the user can request (they are opting into something), whereas
+# DEFAULT_OS_COMPUTE_API_VERSION should be the highest version that the client
+# actually supports without gaps in between. When a higher incremental version
+# is implemented in the client, this version should be updated. Note that this
+# value should never be 2.latest since what's latest changes depending on which
+# cloud provider you're talking to.
+DEFAULT_OS_COMPUTE_API_VERSION = '2.5'
DEFAULT_NOVA_ENDPOINT_TYPE = 'publicURL'
DEFAULT_NOVA_SERVICE_TYPE = "compute"