From 7da3b1524536b7cd853b9ea135db248a6fc31e6f Mon Sep 17 00:00:00 2001 From: ZhiQiang Fan Date: Thu, 26 Feb 2015 10:05:15 +0800 Subject: [PATCH] drop deprecated novaclient.v1_1 novaclient.v1_1 has been deprecated and moved to v2 since v2.21.0, a warning message will be printed if we still use it: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module. This patch uses novaclient.client.Client and specifies version=2 to replace old novaclient.v1_1.client.Client Change-Id: I0155caaa63b670f9b37c91e2297bd6b988784bf7 --- ceilometer/nova_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ceilometer/nova_client.py b/ceilometer/nova_client.py index 9d1ed80ff..8b09219af 100644 --- a/ceilometer/nova_client.py +++ b/ceilometer/nova_client.py @@ -14,7 +14,7 @@ import functools import novaclient -from novaclient.v1_1 import client as nova_client +from novaclient import client as nova_client from oslo_config import cfg from ceilometer.openstack.common import log @@ -61,6 +61,7 @@ class Client(object): conf = cfg.CONF.service_credentials tenant = conf.os_tenant_id or conf.os_tenant_name self.nova_client = nova_client.Client( + version=2, username=conf.os_username, api_key=conf.os_password, project_id=tenant,