Documentation
¶
Index ¶
- Constants
- type ApplyPolicySpec
- type ApplySpec
- type ConfigManagerPolicySpec
- type ExportResult
- type FailureAction
- type ImportSpec
- type Info
- type Manager
- func (c *Manager) ApplyConfiguration(clusterId string, spec ApplySpec) (string, error)
- func (c *Manager) CheckCompliance(clusterId string) (string, error)
- func (c *Manager) ExportConfiguration(clusterId string) (ExportResult, error)
- func (c *Manager) GetConfiguration(clusterId string) (Info, error)
- func (c *Manager) GetRecentTasks(clusterId string) (RecentTasksInfo, error)
- func (c *Manager) GetSchema(clusterId string) (SchemaInfo, error)
- func (c *Manager) Import(clusterId string, spec ImportSpec) (string, error)
- func (c *Manager) Precheck(clusterId string) (string, error)
- func (c *Manager) Validate(clusterId string) (string, error)
- type Metadata
- type ParallelRemediationAction
- type RecentTasksInfo
- type SchemaInfo
Constants ¶
const ( // BasePath the base endpoint for the clusters configuration API BasePath = clusters.BasePath + "/%s/configuration" // RecentTasksPath the endpoint for retrieving the most recent tasks for each draft-related operation RecentTasksPath = BasePath + "/reports/recent-tasks" // SchemaPath the endpoint for retrieving the configuration schema of a cluster SchemaPath = BasePath + "/schema" )
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 ApplySpec ¶
type ApplySpec struct {
Hosts *[]string `json:"hosts"`
ApplyPolicySpec *ApplyPolicySpec `json:"apply_policy_spec"`
}
ApplySpec a specification for applying a cluster configuration
type ConfigManagerPolicySpec ¶
type ConfigManagerPolicySpec struct {
SerialRemediation bool `json:"serial_remediation"`
}
ConfigManagerPolicySpec a structure for enabling or disabling serial remediation
type ExportResult ¶
type ExportResult struct {
Config string `json:"config"`
}
ExportResult the result of a configuration export operation
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 ¶
ImportSpec a specification for importing a cluster configuration
type Manager ¶
Manager extends rest.Client, adding cluster configuration related methods.
func NewManager ¶
NewManager creates a new Manager instance with the given client.
func (*Manager) ApplyConfiguration ¶
ApplyConfiguration applies the current configuration to the provided hosts in the cluster https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=apply__vmw-task=true/post/
func (*Manager) CheckCompliance ¶
CheckCompliance initiates a compliance check on the cluster https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=checkCompliance__vmw-task=true/post/
func (*Manager) ExportConfiguration ¶
func (c *Manager) ExportConfiguration(clusterId string) (ExportResult, error)
ExportConfiguration returns the cluster configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=exportConfig/post/
func (*Manager) GetConfiguration ¶
GetConfiguration returns the cluster configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/get/
func (*Manager) GetRecentTasks ¶
func (c *Manager) GetRecentTasks(clusterId string) (RecentTasksInfo, error)
GetRecentTasks returns the task identifiers for the latest configuration operations of each type https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/reports/recent-tasks/get/
func (*Manager) GetSchema ¶
func (c *Manager) GetSchema(clusterId string) (SchemaInfo, error)
GetSchema returns the configuration schema for the cluster https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/schema/get/
func (*Manager) Import ¶
func (c *Manager) Import(clusterId string, spec ImportSpec) (string, error)
Import imports the provided configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=importConfig__vmw-task=true/post/
func (*Manager) Precheck ¶
Precheck initiates a precheck on the pending cluster configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=precheck__vmw-task=true/post/
func (*Manager) Validate ¶
Validate initiates a validation check on the pending cluster configuration https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration__action=validate__vmw-task=true/post/
type ParallelRemediationAction ¶
type ParallelRemediationAction struct {
Enabled bool `json:"enabled"`
MaxHosts int64 `json:"max_hosts"`
}
ParallelRemediationAction contains options for configuring parallel host remediation
type RecentTasksInfo ¶
type RecentTasksInfo struct {
CheckCompliance string `json:"check_compliance"`
Precheck string `json:"precheck"`
Apply string `json:"apply"`
DraftTasks []any `json:"draft_tasks"`
}
RecentTasksInfo a structure that contains the task identifiers of the most recent draft-related tasks
type SchemaInfo ¶
SchemaInfo contains data for a configuration schema