vcenter_custom_attribute

Client for vCenter custom attribute (custom field) definitions via SOAP/pyVmomi.

Custom attributes are metadata key definitions managed globally by the CustomFieldsManager on the connected vCenter Server, optionally scoped to a managed object type (e.g. VirtualMachine, HostSystem). Setting a custom attribute’s value on a specific entity is out of scope here.

saltext.vcf.clients.vcenter_custom_attribute.list_(opts, profile=None)[source]

Return all custom attribute definitions.

saltext.vcf.clients.vcenter_custom_attribute.get(opts, name, profile=None)[source]

Return the custom attribute definition named name.

Raises LookupError if not found.

saltext.vcf.clients.vcenter_custom_attribute.add(opts, name, managed_object_type=None, profile=None)[source]

Define a new custom attribute named name.

managed_object_type restricts the attribute to that entity type (e.g. "VirtualMachine"); omit for a global attribute available on any type.

saltext.vcf.clients.vcenter_custom_attribute.remove(opts, key, profile=None)[source]

Remove the custom attribute definition with the given integer key.