mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
VMware: vcenter_folder: print full path of the new folder (#55237)
Print the full path of the freshly created folder in the output string.
This commit is contained in:
committed by
Abhijeet Kasurde
parent
0d842ff539
commit
5005c353ef
@@ -1398,3 +1398,12 @@ class PyVmomi(object):
|
||||
else:
|
||||
result = self._jsonify(obj)
|
||||
return result
|
||||
|
||||
def get_folder_path(self, cur):
|
||||
full_path = '/' + cur.name
|
||||
while hasattr(cur, 'parent') and cur.parent:
|
||||
if cur.parent == self.content.rootFolder:
|
||||
break
|
||||
cur = cur.parent
|
||||
full_path = '/' + cur.name + full_path
|
||||
return full_path
|
||||
|
||||
Reference in New Issue
Block a user