summaryrefslogtreecommitdiff
path: root/novaclient
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-07 13:33:31 +0000
committerGerrit Code Review <review@openstack.org>2015-08-07 13:33:31 +0000
commite89e5fe1bbfb29ee14581b92cfb372b4e833b41e (patch)
tree26a0fa28b7c27d089f5b593648b497ea4b6f6b26 /novaclient
parent59abce6462cfe85eac09e4432d3f44fa401040d2 (diff)
parent02889515a5db5ea43a7aa2bc76ffa70248861ce9 (diff)
downloadpython-novaclient-e89e5fe1bbfb29ee14581b92cfb372b4e833b41e.tar.gz
Merge "Set "latest" as default compute api version"
Diffstat (limited to 'novaclient')
-rw-r--r--novaclient/shell.py2
-rw-r--r--novaclient/tests/unit/test_shell.py12
2 files changed, 9 insertions, 5 deletions
diff --git a/novaclient/shell.py b/novaclient/shell.py
index 42fcbdcd..c3e8c17c 100644
--- a/novaclient/shell.py
+++ b/novaclient/shell.py
@@ -51,7 +51,7 @@ from novaclient.i18n import _
from novaclient.openstack.common import cliutils
from novaclient import utils
-DEFAULT_OS_COMPUTE_API_VERSION = "2"
+DEFAULT_OS_COMPUTE_API_VERSION = "2.latest"
DEFAULT_NOVA_ENDPOINT_TYPE = 'publicURL'
DEFAULT_NOVA_SERVICE_TYPE = "compute"
diff --git a/novaclient/tests/unit/test_shell.py b/novaclient/tests/unit/test_shell.py
index f7cb67e2..56eb7f0c 100644
--- a/novaclient/tests/unit/test_shell.py
+++ b/novaclient/tests/unit/test_shell.py
@@ -33,26 +33,30 @@ from novaclient.tests.unit import utils
FAKE_ENV = {'OS_USERNAME': 'username',
'OS_PASSWORD': 'password',
'OS_TENANT_NAME': 'tenant_name',
- 'OS_AUTH_URL': 'http://no.where/v2.0'}
+ 'OS_AUTH_URL': 'http://no.where/v2.0',
+ 'OS_COMPUTE_API_VERSION': '2'}
FAKE_ENV2 = {'OS_USER_ID': 'user_id',
'OS_PASSWORD': 'password',
'OS_TENANT_ID': 'tenant_id',
- 'OS_AUTH_URL': 'http://no.where/v2.0'}
+ 'OS_AUTH_URL': 'http://no.where/v2.0',
+ 'OS_COMPUTE_API_VERSION': '2'}
FAKE_ENV3 = {'OS_USER_ID': 'user_id',
'OS_PASSWORD': 'password',
'OS_TENANT_ID': 'tenant_id',
'OS_AUTH_URL': 'http://no.where/v2.0',
'NOVA_ENDPOINT_TYPE': 'novaURL',
- 'OS_ENDPOINT_TYPE': 'osURL'}
+ 'OS_ENDPOINT_TYPE': 'osURL',
+ 'OS_COMPUTE_API_VERSION': '2'}
FAKE_ENV4 = {'OS_USER_ID': 'user_id',
'OS_PASSWORD': 'password',
'OS_TENANT_ID': 'tenant_id',
'OS_AUTH_URL': 'http://no.where/v2.0',
'NOVA_ENDPOINT_TYPE': 'internal',
- 'OS_ENDPOINT_TYPE': 'osURL'}
+ 'OS_ENDPOINT_TYPE': 'osURL',
+ 'OS_COMPUTE_API_VERSION': '2'}
def _create_ver_list(versions):