volumeattachment

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is the builder object for CStorVolumeAttachment

func BuildFrom

func BuildFrom(volume *apis.CStorVolumeAttachment) *Builder

BuildFrom returns new instance of Builder from the provided api instance

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*apis.CStorVolumeAttachment, error)

Build returns csi volume API object

func (*Builder) WithAccessType

func (b *Builder) WithAccessType(accessType string) *Builder

WithAccessType sets the accessType of csi volume i.e. block or mount

func (*Builder) WithCapacity

func (b *Builder) WithCapacity(capacity string) *Builder

WithCapacity sets the Capacity of csi volume by converting string capacity into Quantity

func (*Builder) WithDevicePath

func (b *Builder) WithDevicePath(devicePath string) *Builder

WithDevicePath sets the devicePath of csi volume

func (*Builder) WithFSType

func (b *Builder) WithFSType(fstype string) *Builder

WithFSType sets the fstype of csi volume

func (*Builder) WithIQN

func (b *Builder) WithIQN(iqn string) *Builder

WithIQN sets the IQN of csi volume

func (*Builder) WithIscsiInterface

func (b *Builder) WithIscsiInterface(iscsiInterface string) *Builder

WithIscsiInterface sets the iscsiInterface of csi volume

func (*Builder) WithLabels

func (b *Builder) WithLabels(labels map[string]string) *Builder

WithLabels merges existing labels of csi volume if any with the ones that are provided here

func (*Builder) WithLabelsNew

func (b *Builder) WithLabelsNew(labels map[string]string) *Builder

WithLabelsNew resets existing labels of csi volume if any with ones that are provided here

func (*Builder) WithLun

func (b *Builder) WithLun(lun string) *Builder

WithLun sets the lunID of csi volume

func (*Builder) WithMountOptions

func (b *Builder) WithMountOptions(mountOptions []string) *Builder

WithMountOptions sets the mountoptions of csi volume

func (*Builder) WithMountOptionsNew

func (b *Builder) WithMountOptionsNew(mountOptions []string) *Builder

WithMountOptionsNew sets the mountoptions of csi volume

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the name of csi volume

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace sets the namespace of csi volume

func (*Builder) WithOwnerNodeID

func (b *Builder) WithOwnerNodeID(ownerNodeID string) *Builder

WithOwnerNodeID sets the ownerNodeID of csi volume

func (*Builder) WithReadOnly

func (b *Builder) WithReadOnly(readOnly bool) *Builder

WithReadOnly sets the readOnly property of csi volume

func (*Builder) WithStagingTargetPath

func (b *Builder) WithStagingTargetPath(stagingTargetPath string) *Builder

WithStagingTargetPath sets the stagingTargetpath of csi volume

func (*Builder) WithTargetPortal

func (b *Builder) WithTargetPortal(targetPortal string) *Builder

WithTargetPortal sets the TargetPortal of csi volume

func (*Builder) WithVolName

func (b *Builder) WithVolName(volName string) *Builder

WithVolName sets the VolName of csi volume

type CStorVolumeAttachment

type CStorVolumeAttachment struct {
	Object *apis.CStorVolumeAttachment
}

CStorVolumeAttachment is a wrapper over CStorVolumeAttachment API instance

func From

From returns a new instance of csi volume

func (*CStorVolumeAttachment) GetAPIObject

GetAPIObject returns csi volume's API instance

func (*CStorVolumeAttachment) HasLabel

func (p *CStorVolumeAttachment) HasLabel(key, value string) bool

HasLabel returns true if provided label is present in the provided CStorVolumeAttachment instance

func (*CStorVolumeAttachment) IsNil

func (p *CStorVolumeAttachment) IsNil() bool

IsNil returns true if the csi volume instance is nil

type CStorVolumeAttachmentList

type CStorVolumeAttachmentList struct {
	List apis.CStorVolumeAttachmentList
}

CStorVolumeAttachmentList holds the list of csi volume instances

func (*CStorVolumeAttachmentList) Len

func (p *CStorVolumeAttachmentList) Len() int

Len returns the number of items present in the CStorVolumeAttachmentList

type Kubeclient

type Kubeclient struct {
	// contains filtered or unexported fields
}

Kubeclient enables kubernetes API operations on csi volume instance

func NewKubeclient

func NewKubeclient(opts ...KubeclientBuildOption) *Kubeclient

NewKubeclient returns a new instance of kubeclient meant for csi volume operations

func (*Kubeclient) Create

Create creates a csi volume instance in kubernetes cluster

func (*Kubeclient) Delete

func (k *Kubeclient) Delete(name string) error

Delete deletes the csi volume from kubernetes

func (*Kubeclient) Get

Get returns csi volume object for given name

func (*Kubeclient) GetRaw

func (k *Kubeclient) GetRaw(
	name string,
	opts metav1.GetOptions,
) ([]byte, error)

GetRaw returns csi volume instance in bytes

func (*Kubeclient) List

List returns a list of csi volume instances present in kubernetes cluster

func (*Kubeclient) Update

Update updates this csi volume instance against kubernetes cluster

func (*Kubeclient) WithNamespace

func (k *Kubeclient) WithNamespace(namespace string) *Kubeclient

WithNamespace sets the provided namespace against this Kubeclient instance

type KubeclientBuildOption

type KubeclientBuildOption func(*Kubeclient)

KubeclientBuildOption defines the abstraction to build a kubeclient instance

func WithClientSet

func WithClientSet(c *clientset.Clientset) KubeclientBuildOption

WithClientSet sets the kubernetes client against the kubeclient instance

func WithKubeConfigPath

func WithKubeConfigPath(path string) KubeclientBuildOption

WithKubeConfigPath sets the kubernetes client against the provided path

func WithNamespace

func WithNamespace(namespace string) KubeclientBuildOption

WithNamespace sets the kubernetes client against the provided namespace

type ListBuilder

type ListBuilder struct {
	// contains filtered or unexported fields
}

ListBuilder enables building an instance of CStorVolumeAttachmentList

func ListBuilderFrom

func ListBuilderFrom(vols apis.CStorVolumeAttachmentList) *ListBuilder

ListBuilderFrom returns a new instance of ListBuilder from API list instance

func NewListBuilder

func NewListBuilder() *ListBuilder

NewListBuilder returns a new instance of ListBuilder

func (*ListBuilder) List

List returns the list of pod instances that was built by this builder

func (*ListBuilder) WithFilter

func (b *ListBuilder) WithFilter(pred ...Predicate) *ListBuilder

WithFilter add filters on which the pod has to be filtered

type Predicate

type Predicate func(*CStorVolumeAttachment) bool

Predicate defines an abstraction to determine conditional checks against the provided pod instance

func HasLabel

func HasLabel(key, value string) Predicate

HasLabel returns true if provided label is present in the provided CStorVolumeAttachment instance

func HasLabels

func HasLabels(keyValuePair map[string]string) Predicate

HasLabels returns true if provided labels are present in the provided CStorVolumeAttachment instance

func IsNil

func IsNil() Predicate

IsNil is predicate to filter out nil csi volume instances

Jump to

Keyboard shortcuts

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