Documentation ¶
Index ¶
- Constants
- Variables
- func GetQuerySnapshotsTaskResult(ctx context.Context, taskInfo *vim25types.TaskInfo) (*cnstypes.CnsSnapshotQueryResult, error)
- func GetServiceLocatorInstance(ctx context.Context, userName string, password string, ...) (*vim25types.ServiceLocator, error)
- func GetTaskInfo(ctx context.Context, task *object.Task) (*vim25types.TaskInfo, error)
- func GetTaskResult(ctx context.Context, taskInfo *vim25types.TaskInfo) (cnstypes.BaseCnsVolumeOperationResult, error)
- func GetTaskResultArray(ctx context.Context, taskInfo *vim25types.TaskInfo) ([]cnstypes.BaseCnsVolumeOperationResult, error)
- type Client
- func (c *Client) AttachVolume(ctx context.Context, attachSpecList []cnstypes.CnsVolumeAttachDetachSpec) (*object.Task, error)
- func (c *Client) ConfigureVolumeACLs(ctx context.Context, aclConfigSpecs ...cnstypes.CnsVolumeACLConfigureSpec) (*object.Task, error)
- func (c *Client) CreateSnapshots(ctx context.Context, snapshotCreateSpecList []cnstypes.CnsSnapshotCreateSpec) (*object.Task, error)
- func (c *Client) CreateVolume(ctx context.Context, createSpecList []cnstypes.CnsVolumeCreateSpec) (*object.Task, error)
- func (c *Client) DeleteSnapshots(ctx context.Context, snapshotDeleteSpecList []cnstypes.CnsSnapshotDeleteSpec) (*object.Task, error)
- func (c *Client) DeleteVolume(ctx context.Context, volumeIDList []cnstypes.CnsVolumeId, deleteDisk bool) (*object.Task, error)
- func (c *Client) DetachVolume(ctx context.Context, detachSpecList []cnstypes.CnsVolumeAttachDetachSpec) (*object.Task, error)
- func (c *Client) ExtendVolume(ctx context.Context, extendSpecList []cnstypes.CnsVolumeExtendSpec) (*object.Task, error)
- func (c *Client) QueryAllVolume(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, ...) (*cnstypes.CnsQueryResult, error)
- func (c *Client) QuerySnapshots(ctx context.Context, snapshotQueryFilter cnstypes.CnsSnapshotQueryFilter) (*object.Task, error)
- func (c *Client) QueryVolume(ctx context.Context, queryFilter cnstypes.CnsQueryFilter) (*cnstypes.CnsQueryResult, error)
- func (c *Client) QueryVolumeAsync(ctx context.Context, queryFilter cnstypes.CnsQueryFilter, ...) (*object.Task, error)
- func (c *Client) QueryVolumeInfo(ctx context.Context, volumeIDList []cnstypes.CnsVolumeId) (*object.Task, error)
- func (c *Client) ReconfigVolumePolicy(ctx context.Context, ...) (*object.Task, error)
- func (c *Client) RelocateVolume(ctx context.Context, relocateSpecs ...cnstypes.BaseCnsVolumeRelocateSpec) (*object.Task, error)
- func (c *Client) RoundTrip(ctx context.Context, req, res soap.HasFault) error
- func (c *Client) SyncDatastore(ctx context.Context, dsURL string, fullSync bool) (*object.Task, error)
- func (c *Client) UpdateVolumeMetadata(ctx context.Context, updateSpecList []cnstypes.CnsVolumeMetadataUpdateSpec) (*object.Task, error)
Constants ¶
const ( Namespace = "vsan" Path = "/vsanHealth" )
Namespace and Path constants
const ( ReleaseVSAN67u3 = "vSAN 6.7U3" ReleaseVSAN70 = "7.0" ReleaseVSAN70u1 = "vSAN 7.0U1" )
const DefaultVCenterPort string = "443"
DefaultVCenterPort is the default port used to access vCenter.
Variables ¶
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 ¶
GetTaskInfo gets the task info given a task
func GetTaskResult ¶
func GetTaskResult(ctx context.Context, taskInfo *vim25types.TaskInfo) (cnstypes.BaseCnsVolumeOperationResult, error)
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 (*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 (*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) 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