Merge "Handle cgts-client calls for non-admin users"
This commit is contained in:
commit
fa53c54a31
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2018 Wind River Systems, Inc.
|
# Copyright (c) 2018-2021 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -10,6 +10,7 @@ import contextlib
|
|||||||
import traceback
|
import traceback
|
||||||
import pecan
|
import pecan
|
||||||
import wsme
|
import wsme
|
||||||
|
from cgtsclient import exc
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_utils import uuidutils
|
from oslo_utils import uuidutils
|
||||||
@ -112,6 +113,10 @@ def replace_name_with_uuid(instance_id):
|
|||||||
except exceptions.ServerNotFound:
|
except exceptions.ServerNotFound:
|
||||||
LOG.error("Can't find the port for name %s", value)
|
LOG.error("Can't find the port for name %s", value)
|
||||||
pass
|
pass
|
||||||
|
except exc.HTTPException as http_exc:
|
||||||
|
msg = "Http request failed with code {}"
|
||||||
|
LOG.error(msg.format(http_exc.code))
|
||||||
|
pass
|
||||||
|
|
||||||
if port:
|
if port:
|
||||||
new_id = key + KEY_VALUE_SEP + port.uuid
|
new_id = key + KEY_VALUE_SEP + port.uuid
|
||||||
|
Loading…
Reference in New Issue
Block a user