Files
deb-python-pyvmomi/docs/vim/CustomFieldsManager.rst
Shawn Hartsock c83651f5be pyvmomi RST docs do not properly show lists
Fixes RST documents to include list mark up when appropriate.

closes: https://github.com/vmware/pyvmomi/issues/76
2014-08-13 14:49:24 -04:00

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:

vim.CustomFieldsManager.FieldDef:

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:
key (int):

The unique key for the field definition.

name (str):

The new name for the field.

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.