Documentation
¶
Overview ¶
Copyright 2017 The Goock Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2017 The Goock Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Variables
- func BeautifyHostInfo(info connector.HostInfo)
- func BeautifyVolumeInfo(info connector.VolumeInfo)
- func Convert2ConnectionProperty(wwns []string, lunID string) connector.ConnectionProperty
- func FetchVolumeInfo(sessions []model.ISCSISession, lun int) (connector.VolumeInfo, error)
- func HandleConnect(args ...string) error
- func HandleDisconnect(args ...string) error
- func HandleExtend(args ...string) error
- func HandleFCConnect(args ...string) error
- func HandleFCExtend(args ...string) error
- func HandleISCSIConnect(args ...string) error
- func HandleISCSIDisconnect(args ...string) error
- func HandleISCSIExtend(args ...string) error
- func HandleInfo(args ...string) error
- func InitLog(debug bool) error
- func IsFcLike(data string) bool
- func IsIPLike(data string) bool
- func IsLunLike(data string) bool
- func Session2ConnectionProperty(sessions []model.ISCSISession, lun int) connector.ConnectionProperty
- func SetFcConnector(fc connector.FibreChannelInterface)
- func SetISCSIConnector(iscsi connector.ISCSIInterface)
- func ValidateLunID(lunIDs []string) ([]int, error)
Constants ¶
This section is empty.
Variables ¶
var HostInfoFormat = `` /* 166-byte string literal not displayed */
HostInfoFormat defines the `info` command output
var VolumeFormat = `Volume Information:
Multipath: %s
Single Paths:
%s
Multipath ID: %s
WWN: %s
`
VolumeFormat defines the `volume` output format
Functions ¶
func BeautifyHostInfo ¶ added in v0.1.1
BeautifyHostInfo prints the output to console
func BeautifyVolumeInfo ¶
func BeautifyVolumeInfo(info connector.VolumeInfo)
BeautifyVolumeInfo output the volume information to stdout.
func Convert2ConnectionProperty ¶ added in v0.1.1
func Convert2ConnectionProperty(wwns []string, lunID string) connector.ConnectionProperty
Convert2ConnectionProperty converts wwn and lunid pair into ConnnectionProperty
func FetchVolumeInfo ¶
func FetchVolumeInfo(sessions []model.ISCSISession, lun int) (connector.VolumeInfo, error)
FetchVolumeInfo fetches the volume information via iscsiConnector.
func HandleConnect ¶ added in v0.1.1
HandleConnect dispatches the cli to iscsi/fc respectively.
func HandleDisconnect ¶ added in v0.1.2
HandleDisconnect dispatches the cli to iscsi/fc respectively.
func HandleExtend ¶
HandleExtend handles the Extend request based the device type
func HandleFCConnect ¶
HandleFCConnect handles the connection of FC target
func HandleFCExtend ¶
HandleFCExtend handle the request to extend the FC devices.
func HandleISCSIConnect ¶
HandleISCSIConnect connects the iSCSI target via iscsiadm
func HandleISCSIDisconnect ¶
HandleISCSIDisconnect disconnects the volume devices from local host Accessible format likes follows:
/dev/sdb sdb <Target IP> <LUN ID>
func HandleISCSIExtend ¶
HandleISCSIExtend extends the iscsi block device
func HandleInfo ¶ added in v0.1.1
HandleInfo displays the host information
func Session2ConnectionProperty ¶
func Session2ConnectionProperty(sessions []model.ISCSISession, lun int) connector.ConnectionProperty
Session2ConnectionProperty converts a session to an ConnectionProperty
func SetFcConnector ¶ added in v0.1.1
func SetFcConnector(fc connector.FibreChannelInterface)
SetFcConnector sets the connector for FC connection
func SetISCSIConnector ¶
func SetISCSIConnector(iscsi connector.ISCSIInterface)
SetISCSIConnector sets the iSCSI connector This will help when doing mock testing
func ValidateLunID ¶ added in v0.1.2
ValidateLunID validates the LunIDs as integer
Types ¶
This section is empty.