Documentation ¶
Index ¶
- Constants
- func ByName(fm *object.CustomFieldsManager, name string) (*types.CustomFieldDef, error)
- func ConfigSchema() *schema.Schema
- func IsSupported(client *govmomi.Client) bool
- func ReadFromResource(client *govmomi.Client, entity *mo.ManagedEntity, d *schema.ResourceData)
- func VerifySupport(client *govmomi.Client) error
- type CustomAttributeDiffProcessor
Constants ¶
View Source
const ConfigKey = "custom_attributes"
ConfigKey is the string that should always be used as the key for specifying custom attribute values for a resource. Various resource custom attribute helpers will depend on this value being consistent across resources.
When adding custom attributes to a resource schema, the easiest way to do that (for now) will be to use the following line:
customattribute.ConfigKey: customattribute.ConfigSchema(),
This will ensure that the correct key and schema is used across all resources.
Variables ¶
This section is empty.
Functions ¶
func ByName ¶
func ByName(fm *object.CustomFieldsManager, name string) (*types.CustomFieldDef, error)
func ConfigSchema ¶
ConfigSchema returns the schema for custom attribute configuration for each resource that needs it.
The key should be set to the ConfigKey constant and should be a map of custom attribute ids to values.
func IsSupported ¶
func ReadFromResource ¶
func ReadFromResource(client *govmomi.Client, entity *mo.ManagedEntity, d *schema.ResourceData)
func VerifySupport ¶
Types ¶
type CustomAttributeDiffProcessor ¶
type CustomAttributeDiffProcessor struct {
// contains filtered or unexported fields
}
func GetDiffProcessorIfAttributesDefined ¶
func GetDiffProcessorIfAttributesDefined(client *govmomi.Client, d *schema.ResourceData) (*CustomAttributeDiffProcessor, error)
func (*CustomAttributeDiffProcessor) ProcessDiff ¶
func (p *CustomAttributeDiffProcessor) ProcessDiff(subject object.Reference) error
Click to show internal directories.
Click to hide internal directories.