drafts

package
v0.53.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BasePath the base endpoint for the clusters configuration API
	BasePath = configuration.BasePath + "/drafts"
	// DraftPath the base endpoint for operations on individual configuration drafts
	DraftPath = BasePath + "/%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyPolicySpec

type ApplyPolicySpec struct {
	FailureAction             *FailureAction             `json:"failure_action,omitempty"`
	PreRemediationPowerAction *string                    `json:"pre_remediation_power_action,omitempty"`
	EnableQuickBoot           *bool                      `json:"enable_quick_boot,omitempty"`
	DisableDpm                *bool                      `json:"disable_dpm,omitempty"`
	DisableHac                *bool                      `json:"disable_hac,omitempty"`
	EvacuateOfflineVms        *bool                      `json:"evacuate_offline_vms,omitempty"`
	EnforceHclValidation      *bool                      `json:"enforce_hcl_validation,omitempty"`
	EnforceQuickPatch         *bool                      `json:"enforce_quick_patch,omitempty"`
	ParallelRemediationAction *ParallelRemediationAction `json:"parallel_remediation_action,omitempty"`
	ConfigManagerPolicySpec   *ConfigManagerPolicySpec   `json:"config_manager_policy_spec,omitempty"`
}

ApplyPolicySpec contains options for customizing how a draft is applied on a cluster

type ApplyResult

type ApplyResult struct {
	Commit    string `json:"commit"`
	ApplyTask string `json:"apply_task"`
}

ApplyResult the result of a draft application https://developer.broadcom.com/xapis/vsphere-automation-api/latest/data-structures/Esx%20Settings%20Clusters%20Configuration%20Drafts%20ApplyResult/

type ApplySpec

type ApplySpec struct {
	PolicySpec ApplyPolicySpec `json:"apply_policy_spec"`
}

ApplySpec a specification for committing a pending configuration draft https://developer.broadcom.com/xapis/vsphere-automation-api/latest/data-structures/Esx%20Settings%20Clusters%20Configuration%20Drafts%20ApplySpec/

type ConfigManagerPolicySpec

type ConfigManagerPolicySpec struct {
	SerialRemediation bool `json:"serial_remediation"`
}

ConfigManagerPolicySpec a structure for enabling or disabling serial remediation

type CreateSpec

type CreateSpec struct {
	Config        string `json:"config,omitempty"`
	ReferenceHost string `json:"image_reference_host,omitempty"`
}

CreateSpec a specification for creating configuration drafts https://developer.broadcom.com/xapis/vsphere-automation-api/latest/data-structures/Esx%20Settings%20Clusters%20Configuration%20Drafts%20CreateSpec/

type FailureAction

type FailureAction struct {
	Action     string `json:"action"`
	RetryDelay int64  `json:"retry_delay"`
	RetryCount int64  `json:"retry_count"`
}

FailureAction contains options for scheduling actions that will be trigger if a draft application fails

type ImportSpec

type ImportSpec struct {
	Host string `json:"host"`
}

ImportSpec a specification for importing a configuration from a reference host into a draft

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding cluster configuration drafts related methods.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) CreateDraft

func (c *Manager) CreateDraft(clusterId string, spec CreateSpec) (string, error)

CreateDraft creates a draft with the provided configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/post/

func (*Manager) ImportFromHost

func (c *Manager) ImportFromHost(clusterId, draftId string, spec ImportSpec) (string, error)

ImportFromHost sets a reference host to use as the source for the draft configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft__action=importFromHost__vmw-task=true/post/

func (*Manager) Precheck

func (c *Manager) Precheck(clusterId, draftId string) (string, error)

Precheck runs pre-checks for the provided draft on the specified cluster https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft__action=precheck__vmw-task=true/post/

func (*Manager) UpdateDraft

func (c *Manager) UpdateDraft(clusterId, draftId string, spec UpdateSpec) error

UpdateDraft updates the configuration of the draft with the specified ID https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft__action=update/post/

type ParallelRemediationAction

type ParallelRemediationAction struct {
	Enabled  bool  `json:"enabled"`
	MaxHosts int64 `json:"max_hosts"`
}

ParallelRemediationAction contains options for configuring parallel host remediation

type UpdateSpec

type UpdateSpec struct {
	Config string `json:"config"`
}

UpdateSpec a specification for updating a pending configuration draft https://developer.broadcom.com/xapis/vsphere-automation-api/latest/data-structures/Esx%20Settings%20Clusters%20Configuration%20Drafts%20UpdateSpec/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL