Documentation ¶
Index ¶
- Constants
- func EqualIP(ip1 string, ip2 string) bool
- func GetFnvHash(str string) string
- func GetPortNumber(caModuleId string, portNumber string) string
- func GetPortNumberV2(caModuleId string, portNumber string) string
- func IsIPv4(ip string) bool
- func ParseIPv4(ip string) string
- func ParseIPv6(ip string) string
- type AuthOptions
- type Driver
- func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)
- func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
- func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
- func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
- func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
- func (d *Driver) PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error)
- func (d *Driver) PullVolume(id string) (*model.VolumeSpec, error)
- func (d *Driver) Setup() (err error)
- func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
- func (d *Driver) Unset() error
- func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- type EternusClient
- func (c *EternusClient) AddFcHostWithCheck(name string, wwnName string) (string, bool, error)
- func (c *EternusClient) AddHostAffinity(lunGrpID string, hostID string, iscsiPort string) (string, error)
- func (c *EternusClient) AddIscsiHostWithCheck(name string, iscsiName string, ipAddr string) (string, bool, error)
- func (c *EternusClient) AddLunGroupWithCheck(lgName string, lunID string) (string, error)
- func (c *EternusClient) AddMapping(lunID string, hostLunID string, port string) error
- func (c *EternusClient) CreateSnapshot(srcLunID string, destLunID string) error
- func (c *EternusClient) CreateVolume(id string, size int64, desc string, poolName string, provPolicy string) (Volume, error)
- func (c *EternusClient) DeleteFcHostByName(name string) error
- func (c *EternusClient) DeleteHostAffinity(portNumber string, hostname string) error
- func (c *EternusClient) DeleteIscsiHostByName(name string) error
- func (c *EternusClient) DeleteLunGroupByName(lgName string) error
- func (c *EternusClient) DeleteMapping(hostLunID string, Port string) error
- func (c *EternusClient) DeleteSnapshot(sid string) error
- func (c *EternusClient) DeleteVolume(volumeNumber string) error
- func (c *EternusClient) Destroy() error
- func (c *EternusClient) ExtendVolume(volumeNumber string, size int64) error
- func (c *EternusClient) GetFcPortInfo(ceSupport bool, needHostAffinity bool) (FcPortInfo, error)
- func (c *EternusClient) GetHostLunID(lunGrpID string, lunID string) (string, error)
- func (c *EternusClient) GetIscsiPortInfo(ceSupport bool, needHostAffinity bool) (IscsiPortInfo, error)
- func (c *EternusClient) GetLunGroupByName(name string) (LunGroup, error)
- func (c *EternusClient) GetVolume(lunID string) (Volume, error)
- func (c *EternusClient) GetVolumeByName(name string) (Volume, error)
- func (c *EternusClient) ListAllStoragePools() ([]StoragePool, error)
- func (c *EternusClient) ListMapping(port string) ([]Mapping, error)
- func (c *EternusClient) ListSnapshot() ([]SnapShot, error)
- func (c *EternusClient) ListStoragePools() ([]StoragePool, error)
- func (c *EternusClient) RemoveVolumeFromLunGroup(lunID string, lgName string) error
- type EternusConfig
- type FcPortInfo
- type IscsiPortInfo
- type LunGroup
- type LunGroupVolume
- type Mapping
- type Replication
- type SnapShot
- type StoragePool
- type System
- type Volume
Constants ¶
const ( KLunId = "eternusVolId" KLunGrpId = "eternusLunGrpId" KLunMaskGrpNo = "eternusLunMaskGrpNo" KHostId = "eternusHostId" KSnapId = "eternusSnapshotId" KSnapLunId = "eternusSnapshotVolId" )
response key name
const (
CreateVolume = "create volume"
)
define command
const (
LBASize = 2097152
)
define eternus specific parameter
const (
NotFound = "0110"
)
define error code
const (
SSHPort = "22"
)
define config parameter
Variables ¶
This section is empty.
Functions ¶
func GetPortNumberV2 ¶
GetPortNumberV2
Types ¶
type AuthOptions ¶
type AuthOptions struct { Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` AdminUsername string `yaml:"adminUsername,omitempty"` AdminPassword string `yaml:"adminPassword,omitempty"` PwdEncrypter string `yaml:"PwdEncrypter,omitempty"` EnableEncrypted bool `yaml:"EnableEncrypted,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` Insecure bool `yaml:"insecure,omitempty"` }
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)
CreateSnapshot :
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error)
CreateVolume : create volume.
func (*Driver) CreateVolumeGroup ¶
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
func (*Driver) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
DeleteSnapshot :
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
DeleteVolume : delete volume
func (*Driver) DeleteVolumeGroup ¶
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
func (*Driver) ExtendVolume ¶
func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
ExtendVolume : extend volume
func (*Driver) InitializeConnection ¶
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
InitializeConnection :
func (*Driver) InitializeSnapshotConnection ¶
func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)
func (*Driver) ListPools ¶
func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
ListPools : get pool list
func (*Driver) PullSnapshot ¶
func (d *Driver) PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error)
PullSnapshot :
func (*Driver) PullVolume ¶
func (d *Driver) PullVolume(id string) (*model.VolumeSpec, error)
PullVolume : get volume information
func (*Driver) TerminateConnection ¶
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
TerminateConnection :
func (*Driver) TerminateSnapshotConnection ¶
func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
func (*Driver) UpdateVolumeGroup ¶
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
type EternusClient ¶
type EternusClient struct {
// contains filtered or unexported fields
}
EternusClient :
func NewClient ¶
func NewClient(opt *AuthOptions) (*EternusClient, error)
func NewClientForAdmin ¶
func NewClientForAdmin(opt *AuthOptions) (*EternusClient, error)
func (*EternusClient) AddFcHostWithCheck ¶
AddFcHostWithCheck :
func (*EternusClient) AddHostAffinity ¶
func (c *EternusClient) AddHostAffinity(lunGrpID string, hostID string, iscsiPort string) (string, error)
AddHostAffinity :
func (*EternusClient) AddIscsiHostWithCheck ¶
func (c *EternusClient) AddIscsiHostWithCheck(name string, iscsiName string, ipAddr string) (string, bool, error)
AddIscsiHostWithCheck :
func (*EternusClient) AddLunGroupWithCheck ¶
func (c *EternusClient) AddLunGroupWithCheck(lgName string, lunID string) (string, error)
AddLunGroupWithCheck :
func (*EternusClient) AddMapping ¶
func (c *EternusClient) AddMapping(lunID string, hostLunID string, port string) error
AddMapping :
func (*EternusClient) CreateSnapshot ¶
func (c *EternusClient) CreateSnapshot(srcLunID string, destLunID string) error
CreateSnapshot is for admin role
func (*EternusClient) CreateVolume ¶
func (c *EternusClient) CreateVolume(id string, size int64, desc string, poolName string, provPolicy string) (Volume, error)
CreateVolume :
func (*EternusClient) DeleteFcHostByName ¶
func (c *EternusClient) DeleteFcHostByName(name string) error
DeleteFcHost :
func (*EternusClient) DeleteHostAffinity ¶
func (c *EternusClient) DeleteHostAffinity(portNumber string, hostname string) error
DeleteHostAffinity :
func (*EternusClient) DeleteIscsiHostByName ¶
func (c *EternusClient) DeleteIscsiHostByName(name string) error
DeleteIscsiHost :
func (*EternusClient) DeleteLunGroupByName ¶
func (c *EternusClient) DeleteLunGroupByName(lgName string) error
DeleteLunGroup :
func (*EternusClient) DeleteMapping ¶
func (c *EternusClient) DeleteMapping(hostLunID string, Port string) error
DeleteMapping :
func (*EternusClient) DeleteSnapshot ¶
func (c *EternusClient) DeleteSnapshot(sid string) error
DeleteSnapshot is for admin role
func (*EternusClient) DeleteVolume ¶
func (c *EternusClient) DeleteVolume(volumeNumber string) error
DeleteVolume :
func (*EternusClient) Destroy ¶
func (c *EternusClient) Destroy() error
func (*EternusClient) ExtendVolume ¶
func (c *EternusClient) ExtendVolume(volumeNumber string, size int64) error
ExtendVolume :
func (*EternusClient) GetFcPortInfo ¶
func (c *EternusClient) GetFcPortInfo(ceSupport bool, needHostAffinity bool) (FcPortInfo, error)
GetFcPortInfo :
func (*EternusClient) GetHostLunID ¶
func (c *EternusClient) GetHostLunID(lunGrpID string, lunID string) (string, error)
GetHostLunID :
func (*EternusClient) GetIscsiPortInfo ¶
func (c *EternusClient) GetIscsiPortInfo(ceSupport bool, needHostAffinity bool) (IscsiPortInfo, error)
GetIscsiPortInfo :
func (*EternusClient) GetLunGroupByName ¶
func (c *EternusClient) GetLunGroupByName(name string) (LunGroup, error)
GetLunGroupByName :
func (*EternusClient) GetVolume ¶
func (c *EternusClient) GetVolume(lunID string) (Volume, error)
GetVolume :
func (*EternusClient) GetVolumeByName ¶
func (c *EternusClient) GetVolumeByName(name string) (Volume, error)
GetVolumeByName :
func (*EternusClient) ListAllStoragePools ¶
func (c *EternusClient) ListAllStoragePools() ([]StoragePool, error)
ListAllStoragePools :
func (*EternusClient) ListMapping ¶
func (c *EternusClient) ListMapping(port string) ([]Mapping, error)
ListMapping :
func (*EternusClient) ListSnapshot ¶
func (c *EternusClient) ListSnapshot() ([]SnapShot, error)
ListSnapshot is for admin role
func (*EternusClient) ListStoragePools ¶
func (c *EternusClient) ListStoragePools() ([]StoragePool, error)
ListStoragePools :
func (*EternusClient) RemoveVolumeFromLunGroup ¶
func (c *EternusClient) RemoveVolumeFromLunGroup(lunID string, lgName string) error
RemoveVolumeFromLunGroup :
type EternusConfig ¶
type EternusConfig struct { AuthOptions `yaml:"authOptions"` Replication `yaml:"replication"` Pool map[string]PoolProperties `yaml:"pool,flow"` TargetIp string `yaml:"targetIp,omitempty"` CeSupport bool `yaml:"ceSupport,omitempty"` }
type FcPortInfo ¶
FcPortInfo is iscsi port info
type IscsiPortInfo ¶
type IscsiPortInfo struct { PortNumber string IscsiName string Ip string TcpPort int IsnsServerIp string IsnsServerPort int }
IscsiPortInfo is iscsi port info
type LunGroupVolume ¶
type LunGroupVolume struct { Id string Name string RawStatus string RoundStatus string Size int64 Uid string Lun string }
LunGroupVolume is lun group info
type Mapping ¶
type Mapping struct { Lun string VolumeNumber string VolumeName string VolumeRawStatus string VolumeRoundStatus string VolumeSize int64 }
Mapping
type Replication ¶
type Replication struct {
RemoteAuthOpt AuthOptions `yaml:"remoteAuthOptions"`
}
type SnapShot ¶
type SnapShot struct { Sid string Gen string GenTotal string Type string VolumeType string SrcNo string SrcName string DestNo string DestName string Status string Phase string ErrorCode string Requestor string }
SnapShot
type StoragePool ¶
StoragePool is Pool information