salt-ext-modules-vmware
                                
                                
                                
                                    salt-ext-modules-vmware copied to clipboard
                            
                            
                            
                        update get_datastores to work with recursive folders
utils/vmware.py::get_datastore uses some fancy traversal to make finding datastores more efficient.
Unfortunately, when searching "everywhere" it doesn't search nested folders.
This should probably be made to work with nested folders. In the meantime, modules/datastore.py is using a wrapper function that gets all datastores and searches by name if nothing exists. This should work but be less efficient.
It looks like SelectionSpec (related to TraversalSpec) should be able to help here:
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/5c1c7b8c-0d1b-4037-af84-5f43787eb378/fab98b61-56a7-4608-992f-818d3b40e4ae/GUID-BED111A9-BB6A-4DC8-AE52-B893072E6A6E.html