cluster

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	*rest.Client
}

Manager extends rest.Client, adding cluster related methods.

func NewManager

func NewManager(client *rest.Client) *Manager

NewManager creates a new Manager instance with the given client.

func (*Manager) AddModuleMembers

func (c *Manager) AddModuleMembers(ctx context.Context, id string, vms ...mo.Reference) (bool, error)

AddModuleMembers adds virtual machines to the module. These virtual machines are required to be in the same vCenter cluster. Returns true if all vms are added, false if a vm is already a member of the module or not within the module's cluster.

func (*Manager) CreateModule

func (c *Manager) CreateModule(ctx context.Context, ref mo.Reference) (string, error)

CreateModule creates a new module in a vCenter cluster.

func (*Manager) DeleteModule

func (c *Manager) DeleteModule(ctx context.Context, id string) error

DeleteModule deletes a specific module.

func (*Manager) ListModuleMembers

func (c *Manager) ListModuleMembers(ctx context.Context, id string) ([]types.ManagedObjectReference, error)

ListModuleMembers returns the virtual machines that are members of the module.

func (*Manager) ListModules

func (c *Manager) ListModules(ctx context.Context) ([]ModuleSummary, error)

ListModules returns information about the modules available in this vCenter server.

func (*Manager) RemoveModuleMembers

func (c *Manager) RemoveModuleMembers(ctx context.Context, id string, vms ...mo.Reference) (bool, error)

RemoveModuleMembers removes virtual machines from the module. Returns true if all vms are removed, false if a vm is not a member of the module.

type ModuleSummary

type ModuleSummary struct {
	Cluster string `json:"cluster"`
	Module  string `json:"module"`
}

ModuleSummary contains commonly used information about a module in a vCenter cluster.

type ModuleSummaryList

type ModuleSummaryList struct {
	Summaries []ModuleSummary `json:"summaries"`
}

ModuleSummaryList is used to JSON encode/decode a ModuleSummary.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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