Skip to content

Commit

Permalink
Add functions to VmomiSupport to list all types
Browse files Browse the repository at this point in the history
  • Loading branch information
ddraganov committed Apr 5, 2024
1 parent 42b1ccc commit e43a287
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pyVmomi/VmomiSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,36 @@ def GetVmodlType(name):
raise KeyError(name)


# Get the VMODL names of the specified definitions
#
# @param defs Specifies the definitions from which to extract the names
# @return a new list of the VMODL names in the specified dictionary
def _GetVmodlNames(defs):
with _lazyLock:
return list(defs.keys())


# Get the VMODL names of all data types
#
# @return a new list of the VMODL names of all data types
def GetDataTypeVmodlNames():
return _GetVmodlNames(_dataDefMap)


# Get the VMODL names of all managed types
#
# @return a new list of the VMODL names of all managed types
def GetManagedTypeVmodlNames():
return _GetVmodlNames(_managedDefMap)


# Get the VMODL names of all enum types
#
# @return a new list of the VMODL names of all enum types
def GetEnumTypeVmodlNames():
return _GetVmodlNames(_enumDefMap)


# Get VMODL type name from type
#
# @param typ vmodl type
Expand Down

0 comments on commit e43a287

Please sign in to comment.