Documentation ¶
Overview ¶
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Package provider ...
Index ¶
- Constants
- type AuthType
- type Context
- type ContextCredentials
- type DefaultVolumeProvider
- func (volprov *DefaultVolumeProvider) AttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
- func (volprov *DefaultVolumeProvider) AuthorizeVolume(volumeAuthorization VolumeAuthorization) error
- func (volprov *DefaultVolumeProvider) Close()
- func (volprov *DefaultVolumeProvider) CreateSnapshot(sourceVolumeID string, snapshotParameters SnapshotParameters) (*Snapshot, error)
- func (volprov *DefaultVolumeProvider) CreateVolume(VolumeRequest Volume) (*Volume, error)
- func (volprov *DefaultVolumeProvider) CreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
- func (volprov *DefaultVolumeProvider) CreateVolumeFromSnapshot(snapshot Snapshot, tags map[string]string) (*Volume, error)
- func (volprov *DefaultVolumeProvider) DeleteSnapshot(*Snapshot) error
- func (volprov *DefaultVolumeProvider) DeleteVolume(*Volume) error
- func (volprov *DefaultVolumeProvider) DeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) (*http.Response, error)
- func (volprov *DefaultVolumeProvider) DetachVolume(detachRequest VolumeAttachmentRequest) (*http.Response, error)
- func (volprov *DefaultVolumeProvider) ExpandVolume(expandVolumeRequest ExpandVolumeRequest) (int64, error)
- func (volprov *DefaultVolumeProvider) GetProviderDisplayName() VolumeProvider
- func (volprov *DefaultVolumeProvider) GetSecurityGroupForVolumeAccessPoint(securityGroupRequest SecurityGroupRequest) (string, error)
- func (volprov *DefaultVolumeProvider) GetSnapshot(snapshotID string) (*Snapshot, error)
- func (volprov *DefaultVolumeProvider) GetSnapshotByName(snapshotName string) (*Snapshot, error)
- func (volprov *DefaultVolumeProvider) GetSubnetForVolumeAccessPoint(subnetRequest SubnetRequest) (string, error)
- func (volprov *DefaultVolumeProvider) GetVolume(id string) (*Volume, error)
- func (volprov *DefaultVolumeProvider) GetVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
- func (volprov *DefaultVolumeProvider) GetVolumeAttachment(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
- func (volprov *DefaultVolumeProvider) GetVolumeByName(name string) (*Volume, error)
- func (volprov *DefaultVolumeProvider) GetVolumeByRequestID(requestID string) (*Volume, error)
- func (volprov *DefaultVolumeProvider) ListSnapshots(limit int, start string, tags map[string]string) (*SnapshotList, error)
- func (volprov *DefaultVolumeProvider) ListVolumes(limit int, start string, tags map[string]string) (*VolumeList, error)
- func (volprov *DefaultVolumeProvider) OrderSnapshot(VolumeRequest Volume) error
- func (volprov *DefaultVolumeProvider) ProviderName() VolumeProvider
- func (volprov *DefaultVolumeProvider) Type() VolumeType
- func (volprov *DefaultVolumeProvider) UpdateVolume(Volume) error
- func (volprov *DefaultVolumeProvider) WaitForAttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
- func (volprov *DefaultVolumeProvider) WaitForCreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
- func (volprov *DefaultVolumeProvider) WaitForDeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) error
- func (volprov *DefaultVolumeProvider) WaitForDetachVolume(detachRequest VolumeAttachmentRequest) error
- type Error
- type ExpandVolumeRequest
- type Fault
- type FaultResponse
- type GenerationType
- type IKSVolumeAttachment
- type InitialOwner
- type PrimaryIP
- type PrimaryIPAddress
- type PrimaryIPID
- type Profile
- type RequestIDType
- type ResourceGroup
- type SecurityGroup
- type SecurityGroupRequest
- type Session
- type Snapshot
- type SnapshotList
- type SnapshotManager
- type SnapshotParameters
- type SnapshotTags
- type SubnetRequest
- type VPC
- type VPCBlockVolume
- type VPCFileVolume
- type VPCVolume
- type Volume
- type VolumeAccessPoint
- type VolumeAccessPointRequest
- type VolumeAccessPointResponse
- type VolumeAttachManager
- type VolumeAttachment
- type VolumeAttachmentRequest
- type VolumeAttachmentResponse
- type VolumeAuthorization
- type VolumeEncryptionKey
- type VolumeFileAccessPointManager
- type VolumeList
- type VolumeManager
- type VolumeProvider
- type VolumeProviderType
- type VolumeType
- type Zone
Constants ¶
const ( // IaaSAPIKey is an IaaS-native user ID and API key IaaSAPIKey = AuthType("IAAS_API_KEY") // IAMAPIKey is an IAM account ID and API key IAMAPIKey = AuthType("IAM_API_KEY") // IAMAccessToken indicates the credential is an IAM access token IAMAccessToken = AuthType("IAM_ACCESS_TOKEN") )
const ( // SUCCESS ... SUCCESS = "Success" // FAILURE ... FAILURE = "Failure" // NOTSUPPORTED ... NOTSUPPORTED = "Not supported" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { VolumeManager VolumeAttachManager SnapshotManager VolumeFileAccessPointManager }
Context represents the volume provider management API for individual account, user ID, etc.
type ContextCredentials ¶
type ContextCredentials struct { AuthType AuthType DefaultAccount bool Region string IAMAccountID string UserID string `json:"-"` // Do not trace Credential string `json:"-"` // Do not trace // ContextID is an optional request/context/correlation identifier for diagnostics (need not be unique) ContextID string }
ContextCredentials represents user credentials (e.g. API key) for volume operations from IaaS provider
type DefaultVolumeProvider ¶ added in v1.1.0
type DefaultVolumeProvider struct {
// contains filtered or unexported fields
}
DefaultVolumeProvider Implementation
func (*DefaultVolumeProvider) AttachVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) AttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
AttachVolume attaches a volume
func (*DefaultVolumeProvider) AuthorizeVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) AuthorizeVolume(volumeAuthorization VolumeAuthorization) error
AuthorizeVolume allows aceess to volume based on given authorization
func (*DefaultVolumeProvider) Close ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) Close()
Close is called when the Session is nolonger required
func (*DefaultVolumeProvider) CreateSnapshot ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) CreateSnapshot(sourceVolumeID string, snapshotParameters SnapshotParameters) (*Snapshot, error)
CreateSnapshot on the volume
func (*DefaultVolumeProvider) CreateVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) CreateVolume(VolumeRequest Volume) (*Volume, error)
CreateVolume creates a volume
func (*DefaultVolumeProvider) CreateVolumeAccessPoint ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) CreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
CreateVolumeAccessPoint to create access point
func (*DefaultVolumeProvider) CreateVolumeFromSnapshot ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) CreateVolumeFromSnapshot(snapshot Snapshot, tags map[string]string) (*Volume, error)
CreateVolumeFromSnapshot creates a volume from snapshot
func (*DefaultVolumeProvider) DeleteSnapshot ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) DeleteSnapshot(*Snapshot) error
DeleteSnapshot deletes the snapshot
func (*DefaultVolumeProvider) DeleteVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) DeleteVolume(*Volume) error
DeleteVolume deletes the volume
func (*DefaultVolumeProvider) DeleteVolumeAccessPoint ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) DeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) (*http.Response, error)
DeleteVolumeAccessPoint method delete a access point
func (*DefaultVolumeProvider) DetachVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) DetachVolume(detachRequest VolumeAttachmentRequest) (*http.Response, error)
DetachVolume by passing required information in the volume object
func (*DefaultVolumeProvider) ExpandVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) ExpandVolume(expandVolumeRequest ExpandVolumeRequest) (int64, error)
ExpandVolume expand the volume with authorization by passing required information in the volume object
func (*DefaultVolumeProvider) GetProviderDisplayName ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetProviderDisplayName() VolumeProvider
GetProviderDisplayName gets provider by displayname
func (*DefaultVolumeProvider) GetSecurityGroupForVolumeAccessPoint ¶ added in v1.2.0
func (volprov *DefaultVolumeProvider) GetSecurityGroupForVolumeAccessPoint(securityGroupRequest SecurityGroupRequest) (string, error)
GetSecurityGroupForVolumeAccessPoint retrieves the securityGroup matching with available cluster SG in the VPC
func (*DefaultVolumeProvider) GetSnapshot ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetSnapshot(snapshotID string) (*Snapshot, error)
GetSnapshot gets the snapshot
func (*DefaultVolumeProvider) GetSnapshotByName ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetSnapshotByName(snapshotName string) (*Snapshot, error)
GetSnapshotByName gets the snapshot
func (*DefaultVolumeProvider) GetSubnetForVolumeAccessPoint ¶ added in v1.2.0
func (volprov *DefaultVolumeProvider) GetSubnetForVolumeAccessPoint(subnetRequest SubnetRequest) (string, error)
GetSubnetForVolumeAccessPoint retrieves the subnetId matching with available subnets in the zone
func (*DefaultVolumeProvider) GetVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetVolume(id string) (*Volume, error)
GetVolume by using ID
func (*DefaultVolumeProvider) GetVolumeAccessPoint ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
GetVolumeAccessPoint retrieves the current status of given volume AccessPoint request
func (*DefaultVolumeProvider) GetVolumeAttachment ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetVolumeAttachment(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
GetVolumeAttachment retirves the current status of given volume attach request
func (*DefaultVolumeProvider) GetVolumeByName ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetVolumeByName(name string) (*Volume, error)
GetVolumeByName gets volume by name, actually some of providers(like VPC) has the capability to provide volume details by usig user provided volume name
func (*DefaultVolumeProvider) GetVolumeByRequestID ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) GetVolumeByRequestID(requestID string) (*Volume, error)
GetVolumeByRequestID fetch the volume by request ID. Request Id is the one that is returned when volume is provsioning request is placed with Iaas provider.
func (*DefaultVolumeProvider) ListSnapshots ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) ListSnapshots(limit int, start string, tags map[string]string) (*SnapshotList, error)
ListSnapshots list the snapshots
func (*DefaultVolumeProvider) ListVolumes ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) ListVolumes(limit int, start string, tags map[string]string) (*VolumeList, error)
ListVolumes Get volume lists by using filters
func (*DefaultVolumeProvider) OrderSnapshot ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) OrderSnapshot(VolumeRequest Volume) error
OrderSnapshot orders the snapshot
func (*DefaultVolumeProvider) ProviderName ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) ProviderName() VolumeProvider
ProviderName returns provider
func (*DefaultVolumeProvider) Type ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) Type() VolumeType
Type returns the underlying volume type
func (*DefaultVolumeProvider) UpdateVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) UpdateVolume(Volume) error
UpdateVolume the volume
func (*DefaultVolumeProvider) WaitForAttachVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) WaitForAttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error)
WaitForAttachVolume waits for the volume to be attached to the host Return error if wait is timed out OR there is other error
func (*DefaultVolumeProvider) WaitForCreateVolumeAccessPoint ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) WaitForCreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error)
WaitForCreateVolumeAccessPoint waits for the volume access point to be created Return error if wait is timed out OR there is other error
func (*DefaultVolumeProvider) WaitForDeleteVolumeAccessPoint ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) WaitForDeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) error
WaitForDeleteVolumeAccessPoint waits for the volume access point to be deleted Return error if wait is timed out OR there is other error
func (*DefaultVolumeProvider) WaitForDetachVolume ¶ added in v1.1.0
func (volprov *DefaultVolumeProvider) WaitForDetachVolume(detachRequest VolumeAttachmentRequest) error
WaitForDetachVolume waits for the volume to be detached from the host Return error if wait is timed out OR there is other error
type Error ¶
type Error struct { // Fault ... Fault Fault }
Error implements the error interface for a Fault. Most easily constructed using util.NewError() or util.NewErrorWithProperties()
func (Error) Code ¶
func (err Error) Code() reasoncode.ReasonCode
Code satisfies the legacy provider.Error interface
func (Error) Properties ¶
Properties satisfies the legacy provider.Error interface
type ExpandVolumeRequest ¶ added in v1.1.0
type ExpandVolumeRequest struct { // VolumeID id for the volume VolumeID string `json:"volumeID"` // changed Volume name Name *string `json:"name,omitempty"` // The new Capacity of the volume, in GiB Capacity int64 `json:"capacity"` }
ExpandVolumeRequest ...
type Fault ¶
type Fault struct { // Message is the fault message (required) Message string `json:"msg"` // ReasonCode is fault reason code (required) //TODO: will have better reasoncode mechanism ReasonCode reasoncode.ReasonCode `json:"code"` // WrappedErrors contains wrapped error messages (if applicable) Wrapped []string `json:"wrapped,omitempty"` // Properties contains diagnostic properties (if applicable) Properties map[string]string `json:"properties,omitempty"` }
Fault encodes a fault condition. Does not implement the error interface so that cannot be accidentally misassigned to error variables when returned in a function response.
type FaultResponse ¶
type FaultResponse struct {
Fault *Fault `json:"fault,omitempty"`
}
FaultResponse is an optional Fault
type IKSVolumeAttachment ¶
type IKSVolumeAttachment struct {
ClusterID *string `json:"clusterID,omitempty"`
}
IKSVolumeAttachment encapulates IKS related attachment parameters
type InitialOwner ¶ added in v1.1.0
type InitialOwner struct { GroupID int64 `json:"gid,omitempty"` UserID int64 `json:"uid,omitempty"` }
InitialOwner ...
type PrimaryIP ¶ added in v1.2.0
type PrimaryIP struct { PrimaryIPID PrimaryIPAddress }
PrimaryIP ...
type PrimaryIPAddress ¶ added in v1.2.0
type PrimaryIPAddress struct { Address string `json:"address,omitempty"` AutoDelete bool `json:"auto_delete,omitempty"` Name string `json:"name,omitempty"` }
PrimaryIPAddress ...
type PrimaryIPID ¶ added in v1.2.0
PrimaryIPID ...
type Profile ¶
type Profile struct { Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` CRN string `json:"crn,omitempty"` }
Profile ...
type RequestIDType ¶
type RequestIDType string
RequestIDType ... Context won't allow keys as "string" type
const ( // RequestID ... RequestID RequestIDType = RequestIDType("request-id") )
type ResourceGroup ¶
type ResourceGroup struct { Href string `json:"href,omitempty"` ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` }
ResourceGroup ...
type SecurityGroup ¶ added in v1.2.0
type SecurityGroup struct { ID string `json:"id"` CRN string `json:"crn,omitempty"` Href string `json:"href,omitempty"` }
SecurityGroup ...
type SecurityGroupRequest ¶ added in v1.2.0
type SecurityGroupRequest struct { //Name to find out the cluster SG for ENI Name string `json:"name,omitempty"` //ResourceGroup to find out the cluster SG for ENI ResourceGroup *ResourceGroup `json:"resource_group,omitempty"` //VPCID to find out the cluster SG for ENI VPCID string `json:"vpc_id,omitempty"` }
SecurityGroupRequest used for fetching the securityGroup for volume access point
type Session ¶
type Session interface { Context // GetProviderDisplayName returns the name of the provider that is being used GetProviderDisplayName() VolumeProvider // Close is called when the Session is nolonger required Close() }
Session is an Context that is notified when it is no longer required
type Snapshot ¶
type Snapshot struct { VolumeID string `json:"volumeID"` // a unique Snapshot ID which created by the provider SnapshotID string `json:"snapshotID"` // The size of the snapshot, in bytes SnapshotSize int64 `json:"snapshotSize"` // Time stamp when snapshot creation was initiated SnapshotCreationTime time.Time `json:"snapCreationTime"` // tags for the snapshot SnapshotTags SnapshotTags `json:"tags,omitempty"` // status of snapshot ReadyToUse bool `json:"readyToUse"` // VPC contains vpc fields VPC }
Snapshot ...
type SnapshotList ¶ added in v1.1.0
SnapshotList ...
type SnapshotManager ¶
type SnapshotManager interface { // Create the snapshot on the volume CreateSnapshot(sourceVolumeID string, snapshotParameters SnapshotParameters) (*Snapshot, error) // Delete the snapshot DeleteSnapshot(*Snapshot) error // Get the snapshot GetSnapshot(snapshotID string) (*Snapshot, error) // Get the snapshot By name GetSnapshotByName(snapshotName string) (*Snapshot, error) // Snapshot list by using tags ListSnapshots(limit int, start string, tags map[string]string) (*SnapshotList, error) }
SnapshotManager ...
type SnapshotParameters ¶ added in v1.1.0
type SnapshotParameters struct { // Name of snapshot Name string `json:"name,omitempty"` // tags for the snapshot SnapshotTags SnapshotTags `json:"tags,omitempty"` }
SnapshotParameters ...
type SubnetRequest ¶ added in v1.2.0
type SubnetRequest struct { //SubnetIDList to match the subnetID from available list of subnets. SubnetIDList string `json:"subnet_id_list,omitempty"` //Zone to find out the subnet-id for ENI ZoneName string `json:"zone_name,omitempty"` //ResourceGroup to find out the subnet-id for ENI ResourceGroup *ResourceGroup `json:"resource_group,omitempty"` //VPCID to find out the subnet-id for ENI VPCID string `json:"vpc_id,omitempty"` }
SubnetRequest used for fetching the subnet for volume access point
type VPC ¶ added in v1.1.0
type VPC struct { ID string `json:"id"` CRN string `json:"crn,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` }
VPC ...
type VPCBlockVolume ¶ added in v1.1.0
type VPCBlockVolume struct { Tags []string `json:"volume_tags,omitempty"` VolumeAttachments *[]VolumeAttachment `json:"volume_attachments,omitempty"` }
VPCBlockVolume specific parameters
type VPCFileVolume ¶ added in v1.1.0
type VPCFileVolume struct { VolumeAccessPoints *[]VolumeAccessPoint `json:"volume_access_points,omitempty"` InitialOwner *InitialOwner `json:"initial_owner,omitempty"` AccessControlMode string `json:"access_control_mode,omitempty"` VPCID string `json:"vpc_id,omitempty"` SecurityGroups *[]SecurityGroup `json:"security_groups,omitempty"` PrimaryIP *PrimaryIP `json:"primary_ip,omitempty"` SubnetID string `json:"subnet_id,omitempty"` }
VPCFileVolume specific parameters
type VPCVolume ¶
type VPCVolume struct { Href string `json:"href,omitempty"` ResourceGroup *ResourceGroup `json:"resource_group,omitempty"` VolumeEncryptionKey *VolumeEncryptionKey `json:"encryption_key,omitempty"` Profile *Profile `json:"profile,omitempty"` CRN string `json:"crn,omitempty"` VPCBlockVolume VPCFileVolume }
VPCVolume specific parameters
type Volume ¶
type Volume struct { // ID of the storage volume, for which we can track the volume VolumeID string `json:"volumeID,omitempty"` // order id should be there in the pv object as k10 looks for that in pv object // volume provider name Provider VolumeProvider `json:"provider"` // volume type block or file VolumeType VolumeType `json:"volumeType"` // Volume provider type i.e Endurance or Performance or any other name ProviderType VolumeProviderType `json:"providerType,omitempty"` // The Capacity of the volume, in GiB Capacity *int `json:"capacity"` // Volume IOPS for performance storage type only Iops *string `json:"iops"` // for endurance storage type only Tier *string `json:"tier"` // region of the volume Region string `json:"region,omitempty"` // Availability zone/datacenter/location of the storage volume Az string `json:"az,omitempty"` // billing type monthly or hourly BillingType string `json:"billingType,omitempty"` // Time stamp when volume creation was initiated CreationTime time.Time `json:"creationTime"` // storage_as_a_service|enterprise|performance default from SL is storage_as_a_service ServiceOffering *string `json:"serviceOffering,omitempty"` // Name of a device Name *string `json:"name,omitempty"` // Backend Ipaddress OR Hostname of a device. Applicable for file storage only BackendIPAddress *string `json:"backendIpAddress,omitempty"` // Service address for mounting NFS volume Applicable for file storage only FileNetworkMountAddress *string `json:"fileNetworkMountAddress,omitempty"` // VolumeNotes notes field as a map for all note fileds // will keep {"plugin":"{plugin_name}","region":"{region}","cluster":"{cluster_id}","type":"Endurance","pvc":"{pvc_name}","pv":"{pv_name}","storgeclass":"{storage_class}","reclaim":"Delete/retain"} VolumeNotes map[string]string `json:"volumeNotes,omitempty"` // LunID the lun of volume, Only for Softlayer block LunID string `json:"lunId,omitempty"` // Attributes map of specific storage provider volume attributes Attributes map[string]string `json:"attributes,omitempty"` // IscsiTargetIPAddresses list of target IP addresses for iscsi. Applicable for Iscsi block storage only IscsiTargetIPAddresses []string `json:"iscsiTargetIpAddresses,omitempty"` // Only for VPC volume provider VPCVolume // ID of snapshot to be restored SnapshotID string `json:"snapshotID,omitempty"` }
Volume ...
type VolumeAccessPoint ¶ added in v1.1.0
type VolumeAccessPoint struct { ID string `json:"id,omitempty"` Href string `json:"href,omitempty"` Name string `json:"name,omitempty"` // Status of volume target named - deleted, deleting, failed, pending_deletion, stable, updating, waiting, suspended Status string `json:"status,omitempty"` MountPath *string `json:"mount_path,omitempty"` VPC *VPC `json:"vpc,omitempty"` Zone *Zone `json:"zone,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` }
VolumeAccessPoint ...
type VolumeAccessPointRequest ¶ added in v1.1.0
type VolumeAccessPointRequest struct { //AccessPoint name is optional. AccessPointName string `json:"name,omitempty"` //Volume to create the AccessPoint for VolumeID string `json:"volumeID"` //AccessPointID to search or delete access point AccessPointID string `json:"accessPointID,omitempty"` //Subnet to create AccessPoint for SubnetID string `json:"subnet_id,omitempty"` //VPC to create AccessPoint for VPCID string `json:"vpc_id,omitempty"` //AccessControlMode to enable/disable Elastic Network Interface AccessControlMode string `json:"access_control_mode,omitempty"` //PrimaryIP PrimaryIP *PrimaryIP `json:"primary_ip,omitempty"` //SecurityGroups to be used for ENI SecurityGroups *[]SecurityGroup `json:"security_groups,omitempty"` //ResourceGroup for ENI ResourceGroup *ResourceGroup `json:"resource_group,omitempty"` //EncryptionInTransit EncryptionInTransit string `json:"transit_encryption,omitempty"` }
VolumeAccessPointRequest used for both create and delete access point
type VolumeAccessPointResponse ¶ added in v1.1.0
type VolumeAccessPointResponse struct { VolumeID string `json:"volumeID"` AccessPointID string `json:"AccessPointID"` Status string `json:"status"` MountPath string `json:"mount_path"` CreatedAt *time.Time `json:"created_at,omitempty"` }
VolumeAccessPointResponse used for both delete and create access point
type VolumeAttachManager ¶
type VolumeAttachManager interface { //Attach method attaches a volume/ fileset to a server //Its non bloking call and does not wait to complete the attachment AttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error) //Detach detaches the volume/ fileset from the server //Its non bloking call and does not wait to complete the detachment DetachVolume(detachRequest VolumeAttachmentRequest) (*http.Response, error) //WaitForAttachVolume waits for the volume to be attached to the host //Return error if wait is timed out OR there is other error WaitForAttachVolume(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error) //WaitForDetachVolume waits for the volume to be detached from the host //Return error if wait is timed out OR there is other error WaitForDetachVolume(detachRequest VolumeAttachmentRequest) error //GetAttachAttachment retirves the current status of given volume attach request GetVolumeAttachment(attachRequest VolumeAttachmentRequest) (*VolumeAttachmentResponse, error) }
VolumeAttachManager ...
type VolumeAttachment ¶
type VolumeAttachment struct { Href string `json:"href,omitempty"` // ID volume attachment identifier ID string `json:"id,omitempty"` // Name volume attachment named Name string `json:"name,omitempty"` // Type of the volume - boot,data Type string `json:"type,omitempty"` // If set to true, when deleting the instance the volume will also be deleted DeleteVolumeOnInstanceDelete bool `json:"delete_volume_on_instance_delete,omitempty"` // device path for attachment DevicePath string `json:"device_path,omitempty"` }
VolumeAttachment ...
type VolumeAttachmentRequest ¶
type VolumeAttachmentRequest struct { VolumeID string `json:"volumeID"` InstanceID string `json:"instanceID"` // Only for SL provider SoftlayerOptions map[string]string `json:"softlayerOptions,omitempty"` // Only for VPC provider VPCVolumeAttachment *VolumeAttachment `json:"vpcVolumeAttachment"` // Only IKS provider IKSVolumeAttachment *IKSVolumeAttachment `json:"iksVolumeAttachment"` }
VolumeAttachmentRequest used for both attach and detach operation
type VolumeAttachmentResponse ¶
type VolumeAttachmentResponse struct { VolumeAttachmentRequest //Status status of the volume attachment success, failed, attached, attaching, detaching Status string `json:"status,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` }
VolumeAttachmentResponse used for both attach and detach operation
type VolumeAuthorization ¶
type VolumeAuthorization struct { // Volume to update the authorization Volume Volume `json:"volume"` // List of subnets to authorize. It might be SubnetIDs or CIDR based on the providers implementaions // For example, IBM Softlyaer provider expects SubnetIDs to be passed Subnets []string `json:"subnets,omitempty"` // List of HostIPs to authorize HostIPs []string `json:"hostIPs,omitempty"` }
VolumeAuthorization capture details of autorization to be made
type VolumeEncryptionKey ¶
type VolumeEncryptionKey struct {
CRN string `json:"crn,omitempty"`
}
VolumeEncryptionKey ...
type VolumeFileAccessPointManager ¶ added in v1.1.0
type VolumeFileAccessPointManager interface { //CreateVolumeAccessPoint to create a access point CreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error) //DeleteVolumeAccessPoint method delete a access point DeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) (*http.Response, error) //WaitForCreateVolumeAccessPoint waits for the volume access point to be created //Return error if wait is timed out OR there is other error WaitForCreateVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error) //WaitForDeleteVolumeAccessPoint waits for the volume access point to be deleted //Return error if wait is timed out OR there is other error WaitForDeleteVolumeAccessPoint(deleteAccessPointRequest VolumeAccessPointRequest) error //GetVolumeAccessPoint retrieves the current status of given volume AccessPoint request GetVolumeAccessPoint(accessPointRequest VolumeAccessPointRequest) (*VolumeAccessPointResponse, error) //GetSubnetForVolumeAccessPoint retrieves the subnet for volume AccessPoint GetSubnetForVolumeAccessPoint(subnetRequest SubnetRequest) (string, error) //GetSecurityGroupForVolumeAccessPoint retrieves the securityGroup for volume AccessPoint GetSecurityGroupForVolumeAccessPoint(securityGroupRequest SecurityGroupRequest) (string, error) }
VolumeFileAccessPointManager ...
type VolumeList ¶
VolumeList ...
type VolumeManager ¶
type VolumeManager interface { // Provider name ProviderName() VolumeProvider // Type returns the underlying volume type Type() VolumeType // Volume operations // Create the volume with authorization by passing required information in the volume object CreateVolume(VolumeRequest Volume) (*Volume, error) // Create the volume from snapshot with snapshot tags CreateVolumeFromSnapshot(snapshot Snapshot, tags map[string]string) (*Volume, error) // UpdateVolume the volume UpdateVolume(Volume) error // Delete the volume DeleteVolume(*Volume) error // Get the volume by using ID // GetVolume(id string) (*Volume, error) // Get the volume by using Name, // actually some of providers(like VPC) has the capability to provide volume // details by usig user provided volume name GetVolumeByName(name string) (*Volume, error) // Get volume lists by using filters ListVolumes(limit int, start string, tags map[string]string) (*VolumeList, error) // GetVolumeByRequestID fetch the volume by request ID. // Request Id is the one that is returned when volume is provsioning request is // placed with Iaas provider. GetVolumeByRequestID(requestID string) (*Volume, error) //AuthorizeVolume allows aceess to volume based on given authorization AuthorizeVolume(volumeAuthorization VolumeAuthorization) error // Volume operations // Expand the volume with authorization by passing required information in the volume object ExpandVolume(expandVolumeRequest ExpandVolumeRequest) (int64, error) }
VolumeManager ...