cns

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 13 Imported by: 21

Documentation

Index

Constants

View Source
const (
	Namespace = "vsan"
	Path      = "/vsanHealth"
)

Namespace and Path constants

View Source
const (
	ReleaseVSAN67u3 = "vSAN 6.7U3"
	ReleaseVSAN70   = "7.0"
	ReleaseVSAN70u1 = "vSAN 7.0U1"
)
View Source
const DefaultVCenterPort string = "443"

DefaultVCenterPort is the default port used to access vCenter.

Variables

View Source
var (
	CnsVolumeManagerInstance = vimtypes.ManagedObjectReference{
		Type:  "CnsVolumeManager",
		Value: "cns-volume-manager",
	}
	CnsDebugManagerInstance = vimtypes.ManagedObjectReference{
		Type:  "CnsDebugManager",
		Value: "cns-debug-manager",
	}
)

Functions

func GetQuerySnapshotsTaskResult added in v0.26.1

func GetQuerySnapshotsTaskResult(ctx context.Context, taskInfo *vim25types.TaskInfo) (*cnstypes.CnsSnapshotQueryResult, error)

GetQuerySnapshotsTaskResult gets the task result of QuerySnapshots given a task info

func GetServiceLocatorInstance added in v0.36.0

func GetServiceLocatorInstance(ctx context.Context, userName string, password string, vcClient *govmomi.Client) (*vim25types.ServiceLocator, error)

GetServiceLocatorInstance takes as input VC userName, VC password, VC client and returns a service locator instance for the VC.

func GetTaskInfo

func GetTaskInfo(ctx context.Context, task *object.Task) (*vim25types.TaskInfo, error)

GetTaskInfo gets the task info given a task

func GetTaskResult

GetTaskResult gets the task result given a task info

func GetTaskResultArray added in v0.23.1

func GetTaskResultArray(ctx context.Context, taskInfo *vim25types.TaskInfo) ([]cnstypes.BaseCnsVolumeOperationResult, error)

GetTaskResultArray gets the task result array for a specified task info

Types

type Client

type Client struct {
	*soap.Client

	RoundTripper soap.RoundTripper
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, c *vim25.Client) (*Client, error)

NewClient creates a new CNS client

func (*Client) AttachVolume

func (c *Client) AttachVolume(ctx context.Context, attachSpecList []cnstypes.CnsVolumeAttachDetachSpec) (*object.Task, error)

AttachVolume calls the CNS Attach API.

func (*Client) ConfigureVolumeACLs added in v0.24.0

func (c *Client) ConfigureVolumeACLs(ctx context.Context, aclConfigSpecs ...cnstypes.CnsVolumeACLConfigureSpec) (*object.Task, error)

ConfigureVolumeACLs calls the CNS Configure ACL API.

func (*Client) CreateSnapshots added in v0.26.0

func (c *Client) CreateSnapshots(ctx context.Context, snapshotCreateSpecList []cnstypes.CnsSnapshotCreateSpec) (*object.Task, error)

func (*Client) CreateVolume

func (c *Client) CreateVolume(ctx context.Context, createSpecList []cnstypes.CnsVolumeCreateSpec) (*object.Task, error)

CreateVolume calls the CNS create API.

func (*Client) DeleteSnapshots added in v0.26.0

func (c *Client) DeleteSnapshots(ctx context.Context, snapshotDeleteSpecList []cnstypes.CnsSnapshotDeleteSpec) (*object.Task, error)

DeleteSnapshots calls the CNS DeleteSnapshots API

func (*Client) DeleteVolume

func (c *Client) DeleteVolume(ctx context.Context, volumeIDList []cnstypes.CnsVolumeId, deleteDisk bool) (*object.Task, error)

DeleteVolume calls the CNS delete API.

func (*Client) DetachVolume

func (c *Client) DetachVolume(ctx context.Context, detachSpecList []cnstypes.CnsVolumeAttachDetachSpec) (*object.Task, error)

DetachVolume calls the CNS Detach API.

func (*Client) ExtendVolume added in v0.23.0

func (c *Client) ExtendVolume(ctx context.Context, extendSpecList []cnstypes.CnsVolumeExtendSpec) (*object.Task, error)

ExtendVolume calls the CNS Extend API.

func (*Client) QueryAllVolume

func (c *Client) QueryAllVolume(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, querySelection cnstypes.CnsQuerySelection) (*cnstypes.CnsQueryResult, error)

QueryAllVolume calls the CNS QueryAllVolume API.

func (*Client) QuerySnapshots added in v0.26.1

func (c *Client) QuerySnapshots(ctx context.Context, snapshotQueryFilter cnstypes.CnsSnapshotQueryFilter) (*object.Task, error)

QuerySnapshots calls the CNS QuerySnapshots API

func (*Client) QueryVolume

func (c *Client) QueryVolume(ctx context.Context, queryFilter cnstypes.CnsQueryFilter) (*cnstypes.CnsQueryResult, error)

QueryVolume calls the CNS QueryVolume API.

func (*Client) QueryVolumeAsync added in v0.26.0

func (c *Client) QueryVolumeAsync(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, querySelection *cnstypes.CnsQuerySelection) (*object.Task, error)

QueryVolumeAsync calls the CNS QueryAsync API and return a task, from which we can extract CnsQueryResult

func (*Client) QueryVolumeInfo added in v0.23.0

func (c *Client) QueryVolumeInfo(ctx context.Context, volumeIDList []cnstypes.CnsVolumeId) (*object.Task, error)

QueryVolumeInfo calls the CNS QueryVolumeInfo API and return a task, from which we can extract VolumeInfo containing VStorageObject

func (*Client) ReconfigVolumePolicy added in v0.30.0

func (c *Client) ReconfigVolumePolicy(ctx context.Context, PolicyReconfigSpecs []cnstypes.CnsVolumePolicyReconfigSpec) (*object.Task, error)

ReconfigVolumePolicy calls the CnsReconfigVolumePolicy API

func (*Client) RelocateVolume added in v0.24.0

func (c *Client) RelocateVolume(ctx context.Context, relocateSpecs ...cnstypes.BaseCnsVolumeRelocateSpec) (*object.Task, error)

RelocateVolume calls the CNS Relocate API.

func (*Client) RoundTrip added in v0.25.0

func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error

RoundTrip dispatches to the RoundTripper field.

func (*Client) SyncDatastore added in v0.31.0

func (c *Client) SyncDatastore(ctx context.Context, dsURL string, fullSync bool) (*object.Task, error)

SyncDatastore calls the CnsSyncDatastore API Note: To be used only by VMware's internal support tools. This API triggers a manual sync of internal CNS and FCD DBs which otherwise happens periodially, with fullsync it forces synchronization of complete tables.

func (*Client) UpdateVolumeMetadata

func (c *Client) UpdateVolumeMetadata(ctx context.Context, updateSpecList []cnstypes.CnsVolumeMetadataUpdateSpec) (*object.Task, error)

UpdateVolumeMetadata calls the CNS CnsUpdateVolumeMetadata API with UpdateSpecs specified in the argument

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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