Add traversal spec for datastoreFolder

StoragePods (a.k.a datastore clusters) are located under
Datacenter.datastoreFolder, so we need a new traversal spec in order to
retrieve them.

Change-Id: I899f8f6ef05a94d21d13a55ca0a0f8fbd042a448
This commit is contained in:
Radoslav Gerganov 2018-06-18 15:03:10 +03:00
parent 3fdf495fe0
commit c6456c6407
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,10 @@ class VimUtilTest(base.TestCase):
'path': 'networkFolder',
'skip': False,
'selectSet': [sel_spec]},
'dc_to_df': {'type': 'Datacenter',
'path': 'datastoreFolder',
'skip': False,
'selectSet': [sel_spec]},
'h_to_vm': {'type': 'HostSystem',
'path': 'vm',
'skip': False,

View File

@ -97,6 +97,12 @@ def build_recursive_traversal_spec(client_factory):
'networkFolder',
False,
[visit_folders_select_spec])
dc_to_df = build_traversal_spec(client_factory,
'dc_to_df',
'Datacenter',
'datastoreFolder',
False,
[visit_folders_select_spec])
# Next hop from HostSystem
h_to_vm = build_traversal_spec(client_factory,
@ -179,6 +185,7 @@ def build_recursive_traversal_spec(client_factory):
dc_to_hf,
dc_to_vmf,
dc_to_netf,
dc_to_df,
cr_to_ds,
cr_to_h,
cr_to_rp,