Documentation
¶
Index ¶
- Constants
- type ApplyPolicySpec
- type ApplyResult
- type ApplySpec
- type ConfigManagerPolicySpec
- type CreateSpec
- type Draft
- type FailureAction
- type ImportSpec
- type Manager
- func (c *Manager) ApplyDraft(clusterId, draftId string) (ApplyResult, error)
- func (c *Manager) CreateDraft(clusterId string, spec CreateSpec) (string, error)
- func (c *Manager) DeleteDraft(clusterId, draftId string) error
- func (c *Manager) GetDraft(clusterId, draftId string) (Draft, error)
- func (c *Manager) ImportFromHost(clusterId, draftId string, spec ImportSpec) (string, error)
- func (c *Manager) ListDrafts(clusterId string) (map[string]Draft, error)
- func (c *Manager) Precheck(clusterId, draftId string) (string, error)
- func (c *Manager) UpdateDraft(clusterId, draftId string, spec UpdateSpec) error
- type ParallelRemediationAction
- type UpdateSpec
Constants ¶
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 ¶
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 Draft ¶
Draft a cluster configuration draft https://developer.broadcom.com/xapis/vsphere-automation-api/latest/data-structures/Esx%20Settings%20Clusters%20Configuration%20Drafts%20Info/
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 ¶
Manager extends rest.Client, adding cluster configuration drafts related methods.
func NewManager ¶
NewManager creates a new Manager instance with the given client.
func (*Manager) ApplyDraft ¶
func (c *Manager) ApplyDraft(clusterId, draftId string) (ApplyResult, error)
ApplyDraft commits the draft with the specified ID https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft__action=apply/post/
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) DeleteDraft ¶
DeleteDraft deletes a draft https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft/delete/
func (*Manager) GetDraft ¶
GetDraft returns a draft by its ID https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts/draft/get/
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) ListDrafts ¶
ListDrafts returns all active drafts https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts
func (*Manager) Precheck ¶
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/