summaryrefslogtreecommitdiff
path: root/openstackclient/common/utils.py
diff options
context:
space:
mode:
authorRodrigo Duarte Sousa <rodrigods@lsd.ufcg.edu.br>2015-03-20 17:51:02 -0300
committerRodrigo Duarte Sousa <rodrigods@lsd.ufcg.edu.br>2015-06-09 13:10:22 -0300
commit4fab60634983f9327295cc68edf89824557728f9 (patch)
tree78d4f07a598b721bbc51de123ead5a888815e6ca /openstackclient/common/utils.py
parent7cf779004e5e9eab9abee8d8a5bc2db3dfa8bd5d (diff)
downloadpython-openstackclient-4fab60634983f9327295cc68edf89824557728f9.tar.gz
Enables retrieval of project's parents and subtree
Adds the possibility to retrieve a project and list its parents and subtree in the hierarchy. Co-Authored-By: Rodrigo Duarte <rodrigods@lsd.ufcg.edu.br> Co-Authored-By: Samuel de Medeiros Queiroz <samuel@lsd.ufcg.edu.br> Implements: bp hierarchical-multitenancy Change-Id: I874f6faffc8a2db9d99f12cbe0a69c0a30c0d9df
Diffstat (limited to 'openstackclient/common/utils.py')
-rw-r--r--openstackclient/common/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/common/utils.py b/openstackclient/common/utils.py
index aad0519c..c824678e 100644
--- a/openstackclient/common/utils.py
+++ b/openstackclient/common/utils.py
@@ -51,7 +51,7 @@ def find_resource(manager, name_or_id, **kwargs):
# Try to get entity as integer id
try:
if isinstance(name_or_id, int) or name_or_id.isdigit():
- return manager.get(int(name_or_id))
+ return manager.get(int(name_or_id), **kwargs)
# FIXME(dtroyer): The exception to catch here is dependent on which
# client library the manager passed in belongs to.
# Eventually this should be pulled from a common set
@@ -64,7 +64,7 @@ def find_resource(manager, name_or_id, **kwargs):
# Try directly using the passed value
try:
- return manager.get(name_or_id)
+ return manager.get(name_or_id, **kwargs)
except Exception:
pass