client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 11 Imported by: 1

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

Constants

This section is empty.

Variables

View Source
var HostInfoFormat = `` /* 166-byte string literal not displayed */

HostInfoFormat defines the `info` command output

View Source
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

func BeautifyHostInfo(info connector.HostInfo)

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

func HandleConnect(args ...string) error

HandleConnect dispatches the cli to iscsi/fc respectively.

func HandleDisconnect added in v0.1.2

func HandleDisconnect(args ...string) error

HandleDisconnect dispatches the cli to iscsi/fc respectively.

func HandleExtend

func HandleExtend(args ...string) error

HandleExtend handles the Extend request based the device type

func HandleFCConnect

func HandleFCConnect(args ...string) error

HandleFCConnect handles the connection of FC target

func HandleFCExtend

func HandleFCExtend(args ...string) error

HandleFCExtend handle the request to extend the FC devices.

func HandleISCSIConnect

func HandleISCSIConnect(args ...string) error

HandleISCSIConnect connects the iSCSI target via iscsiadm

func HandleISCSIDisconnect

func HandleISCSIDisconnect(args ...string) error

HandleISCSIDisconnect disconnects the volume devices from local host Accessible format likes follows:

/dev/sdb
sdb
<Target IP> <LUN ID>

func HandleISCSIExtend

func HandleISCSIExtend(args ...string) error

HandleISCSIExtend extends the iscsi block device

func HandleInfo added in v0.1.1

func HandleInfo(args ...string) error

HandleInfo displays the host information

func InitLog

func InitLog(debug bool) error

InitLog enables the console log for client

func IsFcLike added in v0.1.1

func IsFcLike(data string) bool

IsFcLike tests if *data* is a fc wwn.

func IsIPLike added in v0.1.2

func IsIPLike(data string) bool

IsIPLike tests if *data* is a ipv4 address.

func IsLunLike added in v0.1.1

func IsLunLike(data string) bool

IsLunLike tests if *data* is a lun id.

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

func ValidateLunID(lunIDs []string) ([]int, error)

ValidateLunID validates the LunIDs as integer

Types

This section is empty.

Jump to

Keyboard shortcuts

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