|
Packit |
63bb0d |
/*
|
|
Packit |
63bb0d |
Copyright (c) 2014-2017 VMware, Inc. All Rights Reserved.
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit |
63bb0d |
you may not use this file except in compliance with the License.
|
|
Packit |
63bb0d |
You may obtain a copy of the License at
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
Unless required by applicable law or agreed to in writing, software
|
|
Packit |
63bb0d |
distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit |
63bb0d |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit |
63bb0d |
See the License for the specific language governing permissions and
|
|
Packit |
63bb0d |
limitations under the License.
|
|
Packit |
63bb0d |
*/
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
/*
|
|
Packit |
63bb0d |
Package find implements inventory listing and searching.
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
The Finder is an alternative to the object.SearchIndex FindByInventoryPath() and FindChild() methods.
|
|
Packit |
63bb0d |
SearchIndex.FindByInventoryPath requires an absolute path, whereas the Finder also supports relative paths
|
|
Packit |
63bb0d |
and patterns via path.Match.
|
|
Packit |
63bb0d |
SearchIndex.FindChild requires a parent to find the child, whereas the Finder also supports an ancestor via
|
|
Packit |
63bb0d |
recursive object traversal.
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
The various Finder methods accept a "path" argument, which can absolute or relative to the Folder for the object type.
|
|
Packit |
63bb0d |
The Finder supports two modes, "list" and "find". The "list" mode behaves like the "ls" command, only searching within
|
|
Packit |
63bb0d |
the immediate path. The "find" mode behaves like the "find" command, with the search starting at the immediate path but
|
|
Packit |
63bb0d |
also recursing into sub Folders relative to the Datacenter. The default mode is "list" if the given path contains a "/",
|
|
Packit |
63bb0d |
otherwise "find" mode is used.
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
The exception is to use a "..." wildcard with a path to find all objects recursively underneath any root object.
|
|
Packit |
63bb0d |
For example: VirtualMachineList("/DC1/...")
|
|
Packit |
63bb0d |
|
|
Packit |
63bb0d |
See also: https://github.com/vmware/govmomi/blob/master/govc/README.md#usage
|
|
Packit |
63bb0d |
*/
|
|
Packit |
63bb0d |
package find
|