configuration

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 = 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

type ImportSpec struct {
	Config      string  `json:"config"`
	Description *string `json:"description"`
}

ImportSpec a specification for importing a cluster configuration

type Info

type Info struct {
	Config   string   `json:"config"`
	Metadata Metadata `json:"metadata"`
}

Info configuration information

type Manager

type Manager struct {
	*rest.Client
}

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

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) ApplyConfiguration

func (c *Manager) ApplyConfiguration(clusterId string, spec ApplySpec) (string, error)

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) GetConfiguration

func (c *Manager) GetConfiguration(clusterId string) (Info, error)

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) Precheck

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

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

func (c *Manager) Validate(clusterId string) (string, error)

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 Metadata

type Metadata struct {
	Id string `json:"id"`
}

Metadata configuration metadata

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

type SchemaInfo struct {
	Source string `json:"source"`
	Schema string `json:"schema"`
}

SchemaInfo contains data for a configuration schema

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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