v1.12.1 Latest Latest

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

Go to latest
Published: Sep 11, 2020 License: Apache-2.0, Apache-2.0 Imports: 25 Imported by: 4




This section is empty.


This section is empty.


func CheckError

func CheckError(err error)

CheckError prints err to stderr and exits with code 1 if err is not nil. Otherwise, it is a no-op.

func IsVolumeExist

func IsVolumeExist(volname string) error

IsVolumeExist checks whether the volume already exists or not

func NewCmdCompletion

func NewCmdCompletion(rootCmd *cobra.Command) *cobra.Command

NewCmdCompletion creates the completion command

func NewCmdVersion

func NewCmdVersion() *cobra.Command

NewCmdVersion creates the version command

func NewCmdVolume

func NewCmdVolume() *cobra.Command

NewCmdVolume provides options for managing OpenEBS Volume

func NewCmdVolumeCreate

func NewCmdVolumeCreate() *cobra.Command

NewCmdVolumeCreate creates a new OpenEBS Volume

func NewCmdVolumeDelete

func NewCmdVolumeDelete() *cobra.Command

NewCmdVolumeDelete creates a new OpenEBS Volume

func NewCmdVolumeInfo

func NewCmdVolumeInfo() *cobra.Command

NewCmdVolumeInfo displays OpenEBS Volume information.

func NewCmdVolumeStats

func NewCmdVolumeStats() *cobra.Command

NewCmdVolumeStats displays the runtime statistics of volume

func NewCmdVolumesList

func NewCmdVolumesList() *cobra.Command

NewCmdVolumesList displays status of OpenEBS Volume(s)

func NewMayaCommand

func NewMayaCommand() *cobra.Command

NewMayaCommand creates the `maya` command and its nested children.

func RunCompletion

func RunCompletion(out io.Writer, cmd *cobra.Command, args []string)

func RunCompletionBash

func RunCompletionBash(out io.Writer, cmd *cobra.Command)

func RunCompletionZsh

func RunCompletionZsh(out io.Writer, cmd *cobra.Command)


type CASType

type CASType string

CASType is engine type

const (
	// VolumeAPIPath is the api path to get volume information
	VolumeAPIPath = "/latest/volumes/"

	// JivaStorageEngine is constant for jiva engine
	JivaStorageEngine CASType = "jiva"
	// CstorStorageEngine is constant for cstor engine
	CstorStorageEngine CASType = "cstor"

type CmdVolumeOptions

type CmdVolumeOptions struct {
	// contains filtered or unexported fields

CmdVolumeOptions stores information of volume being operated

func (*CmdVolumeOptions) DisplayVolumeInfo

func (c *CmdVolumeOptions) DisplayVolumeInfo(v *VolumeInfo, collection client.ReplicaCollection) error

DisplayVolumeInfo displays the outputs in standard I/O. Currently it displays volume access modes and target portal details only.

func (*CmdVolumeOptions) RunVolumeCreate

func (c *CmdVolumeOptions) RunVolumeCreate(cmd *cobra.Command) error

RunVolumeCreate makes create volume request to maya-apiserver after verifying whether the volume already exists or not. In case if the volume already exists it returns the error and come out of execution.

func (*CmdVolumeOptions) RunVolumeDelete

func (c *CmdVolumeOptions) RunVolumeDelete(cmd *cobra.Command) error

RunVolumeDelete will initiate the process of deleting a volume from maya-apiserver

func (*CmdVolumeOptions) RunVolumeInfo

func (c *CmdVolumeOptions) RunVolumeInfo(cmd *cobra.Command) error

RunVolumeInfo runs info command and make call to DisplayVolumeInfo to display the results

func (*CmdVolumeOptions) RunVolumesList

func (c *CmdVolumeOptions) RunVolumesList(cmd *cobra.Command) error

RunVolumesList fetchs the volumes from maya-apiserver

func (*CmdVolumeOptions) Validate

func (c *CmdVolumeOptions) Validate(cmd *cobra.Command, snapshotnameverify, sourcenameverify, volnameverify bool) error

Validate verifies whether a volume name,source name or snapshot name is provided or not followed by stats command. It returns nil and proceeds to execute the command if there is no error and returns an error if it is missing.

type PortalInfo

type PortalInfo struct {
	IQN            string
	VolumeName     string
	Portal         string
	Size           string
	Status         string
	ReplicaCount   string
	ControllerNode string

PortalInfo keep info about the ISCSI Target Portal.

type ReplicaInfo

type ReplicaInfo struct {
	IP         string
	AccessMode string
	Status     string
	Name       string
	NodeName   string

ReplicaInfo keep info about the replicas.

type ReplicaStats

type ReplicaStats struct {
	Replica         string
	Status          string
	DataUpdateIndex string

ReplicaStats keep info about the replicas.

type Value

type Value struct {
	// contains filtered or unexported fields

Value keeps info of the values of a current address in replicaIPStatus map

type VolumeInfo

type VolumeInfo struct {
	Volume v1alpha1.CASVolume

VolumeInfo stores the volume information

func NewVolumeInfo

func NewVolumeInfo(URL string, volname string, namespace string) (volInfo *VolumeInfo, err error)

NewVolumeInfo fetches and fills CASVolume structure from URL given to it

func (*VolumeInfo) GetCASType

func (volInfo *VolumeInfo) GetCASType() string

GetCASType returns the CASType of the volume in lowercase

func (*VolumeInfo) GetCVRName

func (volInfo *VolumeInfo) GetCVRName() string

GetCVRName returns the name of the CVR

func (*VolumeInfo) GetClusterIP

func (volInfo *VolumeInfo) GetClusterIP() string

GetClusterIP returns the ClusterIP of the cluster

func (*VolumeInfo) GetControllerNode

func (volInfo *VolumeInfo) GetControllerNode() string

GetControllerNode returns the node name of the controller

func (*VolumeInfo) GetControllerStatus

func (volInfo *VolumeInfo) GetControllerStatus() string

GetControllerStatus returns the status of the volume controller

func (*VolumeInfo) GetIQN

func (volInfo *VolumeInfo) GetIQN() string

GetIQN returns the IQN of the volume

func (*VolumeInfo) GetNodeName

func (volInfo *VolumeInfo) GetNodeName() string

GetNodeName returns the name of the node

func (*VolumeInfo) GetReplicaCount

func (volInfo *VolumeInfo) GetReplicaCount() string

GetReplicaCount returns the volume replica count

func (*VolumeInfo) GetReplicaIP

func (volInfo *VolumeInfo) GetReplicaIP() string

GetReplicaIP returns the IP of volume replica

func (*VolumeInfo) GetReplicaStatus

func (volInfo *VolumeInfo) GetReplicaStatus() string

GetReplicaStatus returns the replica status of the volume replica

func (*VolumeInfo) GetStoragePool

func (volInfo *VolumeInfo) GetStoragePool() string

GetStoragePool returns the name of the storage pool

func (*VolumeInfo) GetTargetPortal

func (volInfo *VolumeInfo) GetTargetPortal() string

GetTargetPortal returns the TargetPortal of the volume

func (*VolumeInfo) GetVolumeName

func (volInfo *VolumeInfo) GetVolumeName() string

GetVolumeName returns the volume name

func (*VolumeInfo) GetVolumeSize

func (volInfo *VolumeInfo) GetVolumeSize() string

GetVolumeSize returns the capacity of the volume


Path Synopsis

Jump to

Keyboard shortcuts

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