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:
Gonéri Le Bouder 2019-05-23 06:51:22 -04:00 committed by Abhijeet Kasurde
commit 5005c353ef
3 changed files with 41 additions and 24 deletions

View file

@ -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