summaryrefslogtreecommitdiff
path: root/openstackclient/common/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/common/utils.py')
-rw-r--r--openstackclient/common/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py
index 6477285e..76532fcb 100644
--- a/openstackclient/common/utils.py
+++ b/openstackclient/common/utils.py
@@ -46,6 +46,11 @@ def find_resource(manager, name_or_id):
# Eventually this should be pulled from a common set
# of client exceptions.
except Exception as ex:
+ try:
+ return manager.find(display_name=name_or_id)
+ except:
+ pass
+
if type(ex).__name__ == 'NotFound':
msg = "No %s with a name or ID of '%s' exists." % \
(manager.resource_class.__name__.lower(), name_or_id)