mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 22:30:22 -07: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:
parent
0d842ff539
commit
5005c353ef
3 changed files with 41 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue