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
This commit is contained in:
Andrey Kurilin 2015-09-10 15:16:54 +03:00
parent 147a1a6ee4
commit 599ee29536

View File

@ -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)