
This external documentation for pyVmomi was generated using Googly Docs (aka Google Standard Documentation) which renders very cleanly in GitHub. Internal documentation for a class should be done in Sphinx format because tools like pyCharm and Eclipse can use that documentation as a hint for code completion. Note: External docs as Googly Docs, internal docs as Sphinx. Closes bug#15
3.2 KiB
vim.CustomFieldsManager
The CustomFieldsManager object is used to add and remove custom fields to managed entities.The custom fields values set on managed entities are available through the customValue property and through the summary objects for VirtualMachine and HostSystem . They are not available directly through this managed object.This functionality is only available through VirtualCenter.
Attributes
- field (vim.CustomFieldsManager.FieldDef):
- privilege: System.View
List of custom fields defined on this server. The fields are sorted by name.
Methods
- AddCustomFieldDef(name, moType, fieldDefPolicy, fieldPolicy):
-
Creates a new custom field. If the moType is specified, the field will only be available for that type of managed object.
- Privilege:
-
Global.ManageCustomFields
- Args:
-
- name (str):
-
The name of the field.
- moType (str, optional, since VI API 2.5 ):
-
The managed object type to which this field will apply
- fieldDefPolicy (vim.PrivilegePolicyDef, optional, since VI API 2.5 ):
-
Privilege policy to apply to FieldDef being created
- fieldPolicy (vim.PrivilegePolicyDef, optional, since VI API 2.5 ):
-
Privilege policy to apply to instances of field
- Returns:
Raises:
- vim.fault.DuplicateName:
-
if a custom field with the name already exists.
- vim.fault.InvalidPrivilege:
-
if a specified privilege is not defined.
- RemoveCustomFieldDef(key):
-
Removes a custom field. This also removes all values assigned to this custom field.
- Privilege:
-
Global.ManageCustomFields
- Args:
-
- key (int):
-
The unique key for the field definition.
- Returns:
-
None
Raises:
- vmodl.fault.InvalidArgument:
-
if no custom field with that key exists.
- RenameCustomFieldDef(key, name):
-
Renames a custom field.
- Privilege:
-
Global.ManageCustomFields
- Args:
- Returns:
-
None
Raises:
- vim.fault.DuplicateName:
-
if a custom field with the name already exists.
- vmodl.fault.InvalidArgument:
-
if no custom field with that key exists.
- SetField(entity, key, value):
-
Assigns a value to a custom field on an entity.
Privilege:
- Args:
-
entity (vim.ManagedEntity):
key (int):
value (str):
- Returns:
-
None
Raises:
- vmodl.fault.InvalidArgument:
-
if no custom field with that key exists.