Fixes Unauthorized failure

As part of cross tenancy relaxation for nfp getting
services tenant id is failing in liberty with
Unauthorized failure. Added exception handling for
the failure and silently ignoring, moving in default path.

Change-Id: I7c3baa8a82a587a82ac86b416521ce4d62aac433
Closes-Bug: 1608616
This commit is contained in:
Ashutosh Mishra 2016-08-01 22:40:03 +05:30 committed by Subrahmanyam Ongole
parent 1a88760d5d
commit 81976cbb28
1 changed files with 4 additions and 0 deletions

View File

@ -695,6 +695,10 @@ class ResourceMappingDriver(api.PolicyDriver, ImplicitResourceOperations,
except k_exceptions.AuthorizationFailure:
LOG.error(_LE("User: %(user)s dont have permissions"),
{'user': user})
except k_exceptions.Unauthorized:
LOG.error(_LE("Wrong credentials provided: user: %(user)s, "
"password: %(pwd)s, tenant: %(tenant)s"),
{'user': user, 'pwd': pwd, 'tenant': tenant})
def _reject_non_shared_net_on_shared_l2p(self, context):
if context.current.get('shared') and context.current['network_id']: