do not use deprecated keystone.apiclient.exceptions

use keystoneclient.exceptions instead, the ones under apiclient
have been deprecated for a while.

also, the exceptions under keystoneclient.openstack.common are
just redirects to the top level keystone.exceptions, so fix a
reference of that as well.

Change-Id: I0912d5a96f42b7f61422a27f318752a17b7238cb
This commit is contained in:
Steve Martinelli 2015-12-14 02:01:39 -05:00
parent 1f2327c749
commit 2b43c70daf
2 changed files with 3 additions and 4 deletions

View File

@ -21,7 +21,7 @@
import logging
import time
from keystoneclient.apiclient import exceptions as api_exceptions
from keystoneclient import exceptions as api_exceptions
from keystoneclient.v2_0 import client as keystone_client
from ospurge import constants

View File

@ -37,8 +37,7 @@ import glanceclient.exc
from glanceclient.v1 import client as glance_client
from heatclient import client as heat_client
import heatclient.openstack.common.apiclient.exceptions
from keystoneclient.apiclient import exceptions as api_exceptions
import keystoneclient.openstack.common.apiclient.exceptions
from keystoneclient import exceptions as api_exceptions
from keystoneclient.v2_0 import client as keystone_client
import neutronclient.common.exceptions
from neutronclient.v2_0 import client as neutron_client
@ -633,7 +632,7 @@ def perform_on_project(admin_name, password, project, auth_url,
'dump': resources.dump}
res_actions[action]()
except (exceptions.EndpointNotFound,
keystoneclient.openstack.common.apiclient.exceptions.EndpointNotFound,
api_exceptions.EndpointNotFound,
neutronclient.common.exceptions.EndpointNotFound,
cinderclient.exceptions.EndpointNotFound,
novaclient.exceptions.EndpointNotFound,