cns

package
v0.0.0-...-f282198 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

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

Variables

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

Functions

func GetQuerySnapshotsTaskResult

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

GetQuerySnapshotsTaskResult gets the task result of QuerySnapshots given a task info

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

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

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

ConfigureVolumeACLs calls the CNS Configure ACL API.

func (*Client) CreateSnapshots

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

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

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

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

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

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

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

ReconfigVolumePolicy calls the CnsReconfigVolumePolicy API

func (*Client) RelocateVolume

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

RelocateVolume calls the CNS Relocate API.

func (*Client) RoundTrip

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

RoundTrip dispatches to the RoundTripper field.

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