Documentation ¶
Index ¶
- Constants
- Variables
- func CheckValidVolume(cStorVolume *apis.CStorVolume) error
- func CreateIstgtConf(cStorVolume *apis.CStorVolume) ([]byte, error)
- func CreateVolumeTarget(cStorVolume *apis.CStorVolume) error
- func ExecuteDesiredReplicationFactorCommand(cStorVolume *apis.CStorVolume, getDRFCmd func(*apis.CStorVolume) string) error
- func GetScaleDownCommand(cStorVolume *apis.CStorVolume) string
- func GetScaleUpCommand(cstorVolume *apis.CStorVolume) string
- func GetVolumeStatus(cStorVolume *apis.CStorVolume) (*apis.CVStatus, error)
- func ResizeTargetVolume(cStorVolume *apis.CStorVolume) error
Constants ¶
const (
// VolumeOperator is the name of the tool that makes volume-related operations.
VolumeOperator = "iscsi"
)
Variables ¶
var FileOperatorVar util.FileOperator
FileOperatorVar is used for doing File Operations
var UnixSockVar util.UnixSock
UnixSockVar is used for communication through Unix Socket
Functions ¶
func CheckValidVolume ¶
func CheckValidVolume(cStorVolume *apis.CStorVolume) error
CheckValidVolume checks for validity of CStorVolume resource.
func CreateIstgtConf ¶
func CreateIstgtConf(cStorVolume *apis.CStorVolume) ([]byte, error)
CreateIstgtConf creates istgt.conf file
func CreateVolumeTarget ¶
func CreateVolumeTarget(cStorVolume *apis.CStorVolume) error
CreateVolumeTarget creates a new cStor volume istgt config.
func ExecuteDesiredReplicationFactorCommand ¶
func ExecuteDesiredReplicationFactorCommand( cStorVolume *apis.CStorVolume, getDRFCmd func(*apis.CStorVolume) string) error
ExecuteDesiredReplicationFactorCommand executes istgtcontrol command to update desired replication factor
func GetScaleDownCommand ¶
func GetScaleDownCommand(cStorVolume *apis.CStorVolume) string
GetScaleDownCommand return replica scale down command Ex command: drf <vol_name> <value> <known replica list>
func GetScaleUpCommand ¶
func GetScaleUpCommand(cstorVolume *apis.CStorVolume) string
GetScaleUpCommand will return data required to execute istgtcontrol drf command Ex command: drf <vol_name> <value>
func GetVolumeStatus ¶
func GetVolumeStatus(cStorVolume *apis.CStorVolume) (*apis.CVStatus, error)
GetVolumeStatus retrieves an array of replica statuses.
func ResizeTargetVolume ¶
func ResizeTargetVolume(cStorVolume *apis.CStorVolume) error
ResizeTargetVolume sends resize volume command to istgt and get the response
Types ¶
This section is empty.