Documentation ¶
Index ¶
- func CheckError(err error)
- func IsVolumeExist(volname string) error
- func NewCmdCompletion(rootCmd *cobra.Command) *cobra.Command
- func NewCmdVersion() *cobra.Command
- func NewCmdVolume() *cobra.Command
- func NewCmdVolumeCreate() *cobra.Command
- func NewCmdVolumeDelete() *cobra.Command
- func NewCmdVolumeInfo() *cobra.Command
- func NewCmdVolumeStats() *cobra.Command
- func NewCmdVolumesList() *cobra.Command
- func NewMayaCommand() *cobra.Command
- func RunCompletion(out io.Writer, cmd *cobra.Command, args []string)
- func RunCompletionBash(out io.Writer, cmd *cobra.Command)
- func RunCompletionZsh(out io.Writer, cmd *cobra.Command)
- type CASType
- type CmdVolumeOptions
- func (c *CmdVolumeOptions) DisplayVolumeInfo(v *VolumeInfo, collection client.ReplicaCollection) error
- func (c *CmdVolumeOptions) RunVolumeCreate(cmd *cobra.Command) error
- func (c *CmdVolumeOptions) RunVolumeDelete(cmd *cobra.Command) error
- func (c *CmdVolumeOptions) RunVolumeInfo(cmd *cobra.Command) error
- func (c *CmdVolumeOptions) RunVolumesList(cmd *cobra.Command) error
- func (c *CmdVolumeOptions) Validate(cmd *cobra.Command, snapshotnameverify, sourcenameverify, volnameverify bool) error
- type PortalInfo
- type ReplicaInfo
- type ReplicaStats
- type Value
- type VolumeInfo
- func (volInfo *VolumeInfo) GetCASType() string
- func (volInfo *VolumeInfo) GetCVRName() string
- func (volInfo *VolumeInfo) GetClusterIP() string
- func (volInfo *VolumeInfo) GetControllerNode() string
- func (volInfo *VolumeInfo) GetControllerStatus() string
- func (volInfo *VolumeInfo) GetIQN() string
- func (volInfo *VolumeInfo) GetNodeName() string
- func (volInfo *VolumeInfo) GetReplicaCount() string
- func (volInfo *VolumeInfo) GetReplicaIP() string
- func (volInfo *VolumeInfo) GetReplicaStatus() string
- func (volInfo *VolumeInfo) GetStoragePool() string
- func (volInfo *VolumeInfo) GetTargetPortal() string
- func (volInfo *VolumeInfo) GetVolumeName() string
- func (volInfo *VolumeInfo) GetVolumeSize() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
IsVolumeExist checks whether the volume already exists or not
func NewCmdCompletion ¶
NewCmdCompletion creates the completion command
func NewCmdVolume ¶
NewCmdVolume provides options for managing OpenEBS Volume
func NewCmdVolumeCreate ¶
NewCmdVolumeCreate creates a new OpenEBS Volume
func NewCmdVolumeDelete ¶
NewCmdVolumeDelete creates a new OpenEBS Volume
func NewCmdVolumeInfo ¶
NewCmdVolumeInfo displays OpenEBS Volume information.
func NewCmdVolumeStats ¶
NewCmdVolumeStats displays the runtime statistics of volume
func NewCmdVolumesList ¶
NewCmdVolumesList displays status of OpenEBS Volume(s)
func NewMayaCommand ¶
NewMayaCommand creates the `maya` command and its nested children.
Types ¶
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 ¶
ReplicaInfo keep info about the replicas.
type ReplicaStats ¶
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 ¶
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