summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2015-09-10 15:16:54 +0300
committerAndrey Kurilin <akurilin@mirantis.com>2015-09-10 15:55:29 +0300
commit599ee29536aaa2ae7f9a7426e653cefddb229743 (patch)
tree43f6644b74a2c506c81b3c0a33431b036a00b0f3
parent147a1a6ee421f9a45a562f013e233d29d43258e4 (diff)
downloadpython-novaclient-599ee29536aaa2ae7f9a7426e653cefddb229743.tar.gz
Set api_version to 2.0 by default for v2.Client
`novaclient.v2.client.Client` class should use V2.0 API by default, if api_version argument is empty. Change-Id: Id44a68f5d52f6f6055c3abe520bb916329552d09
-rw-r--r--novaclient/v2/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/novaclient/v2/client.py b/novaclient/v2/client.py
index d48c062f..97150614 100644
--- a/novaclient/v2/client.py
+++ b/novaclient/v2/client.py
@@ -13,6 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from novaclient import api_versions
from novaclient import client
from novaclient.i18n import _LW
from novaclient.v2 import agents
@@ -129,7 +130,7 @@ class Client(object):
self.limits = limits.LimitsManager(self)
self.servers = servers.ServerManager(self)
self.versions = versions.VersionManager(self)
- self.api_version = api_version
+ self.api_version = api_version or api_versions.APIVersion("2.0")
# extensions
self.agents = agents.AgentsManager(self)