client

package
v0.0.0-...-36737da Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NO_AUTHENTICATED        int64 = 10000003
	VOLUME_NAME_NOT_EXIST   int64 = 50150005
	DELETE_VOLUME_NOT_EXIST int64 = 32150005
	QUERY_VOLUME_NOT_EXIST  int64 = 31000000
	INITIATOR_NOT_EXIST     int64 = 50155103
	HOSTNAME_ALREADY_EXIST  int64 = 50157019
	INITIATOR_ALREADY_EXIST int64 = 50155102
	INITIATOR_ADDED_TO_HOST int64 = 50157021
	OFF_LINE_CODE                 = "1077949069"
	SNAPSHOT_NOT_EXIST      int64 = 50150006
	FILE_SYSTEM_NOT_EXIST   int64 = 33564678
	QUOTA_NOT_EXIST         int64 = 37767685
	DEFAULT_PARALLEL_COUNT  int   = 50
	MAX_PARALLEL_COUNT      int   = 1000
	MIN_PARALLEL_COUNT      int   = 20
)

Variables

View Source
var (
	LOG_FILTER = map[string]map[string]bool{
		"POST": {
			"/dsware/service/v1.3/sec/login":     true,
			"/dsware/service/v1.3/sec/keepAlive": true,
		},
		"GET": {
			"/dsware/service/v1.3/storagePool": true,
		},
	}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url, user, password, parallelNum string) *Client

func (*Client) AddLunToHost

func (cli *Client) AddLunToHost(lunName, hostName string) error

func (*Client) AddPortToHost

func (cli *Client) AddPortToHost(initiatorName, hostName string) error

func (*Client) AllowNfsShareAccess

func (cli *Client) AllowNfsShareAccess(params map[string]interface{}) error

func (*Client) AssociateQoSWithVolume

func (cli *Client) AssociateQoSWithVolume(volName, qosName string) error

func (*Client) AttachVolume

func (cli *Client) AttachVolume(name, ip string) error

func (*Client) CreateFileSystem

func (cli *Client) CreateFileSystem(params map[string]interface{}) (map[string]interface{}, error)

func (*Client) CreateHost

func (cli *Client) CreateHost(hostName string, alua map[string]interface{}) error

func (*Client) CreateInitiator

func (cli *Client) CreateInitiator(name string) error

func (*Client) CreateNfsShare

func (cli *Client) CreateNfsShare(params map[string]interface{}) (map[string]interface{}, error)

func (*Client) CreateQoS

func (cli *Client) CreateQoS(qosName string, qosData map[string]int) error

func (*Client) CreateQuota

func (cli *Client) CreateQuota(params map[string]interface{}) error

func (*Client) CreateSnapshot

func (cli *Client) CreateSnapshot(snapshotName, volName string) error

func (*Client) CreateVolume

func (cli *Client) CreateVolume(params map[string]interface{}) error

func (*Client) CreateVolumeFromSnapshot

func (cli *Client) CreateVolumeFromSnapshot(volName string, volSize int64, snapshotName string) error

func (*Client) DeleteFileSystem

func (cli *Client) DeleteFileSystem(id string) error

func (*Client) DeleteLunFromHost

func (cli *Client) DeleteLunFromHost(lunName, hostName string) error

func (*Client) DeleteNfsShare

func (cli *Client) DeleteNfsShare(id string) error

func (*Client) DeleteNfsShareAccess

func (cli *Client) DeleteNfsShareAccess(accessID string) error

func (*Client) DeleteQoS

func (cli *Client) DeleteQoS(qosName string) error

func (*Client) DeleteQuota

func (cli *Client) DeleteQuota(quotaID string) error

func (*Client) DeleteSnapshot

func (cli *Client) DeleteSnapshot(snapshotName string) error

func (*Client) DeleteVolume

func (cli *Client) DeleteVolume(name string) error

func (*Client) DetachVolume

func (cli *Client) DetachVolume(name, ip string) error

func (*Client) DisassociateQoSWithVolume

func (cli *Client) DisassociateQoSWithVolume(volName, qosName string) error

func (*Client) DuplicateClient

func (cli *Client) DuplicateClient() *Client

func (*Client) ExtendVolume

func (cli *Client) ExtendVolume(lunName string, newCapacity int64) error

func (*Client) GetAllPools

func (cli *Client) GetAllPools() (map[string]interface{}, error)

func (*Client) GetAssociateCountOfQoS

func (cli *Client) GetAssociateCountOfQoS(qosName string) (int, error)

func (*Client) GetFileSystemByName

func (cli *Client) GetFileSystemByName(name string) (map[string]interface{}, error)

func (*Client) GetHostByName

func (cli *Client) GetHostByName(hostName string) (map[string]interface{}, error)

func (*Client) GetInitiatorByName

func (cli *Client) GetInitiatorByName(name string) (map[string]interface{}, error)

func (*Client) GetNfsShareAccess

func (cli *Client) GetNfsShareAccess(shareID string) (map[string]interface{}, error)

func (*Client) GetNfsShareByPath

func (cli *Client) GetNfsShareByPath(path string) (map[string]interface{}, error)

func (*Client) GetPoolById

func (cli *Client) GetPoolById(poolId int64) (map[string]interface{}, error)

func (*Client) GetPoolByName

func (cli *Client) GetPoolByName(poolName string) (map[string]interface{}, error)

func (*Client) GetQoSNameByVolume

func (cli *Client) GetQoSNameByVolume(volName string) (string, error)

func (*Client) GetQuotaByFileSystem

func (cli *Client) GetQuotaByFileSystem(fsID string) (map[string]interface{}, error)

func (*Client) GetSnapshotByName

func (cli *Client) GetSnapshotByName(snapshotName string) (map[string]interface{}, error)

func (*Client) GetVolumeByName

func (cli *Client) GetVolumeByName(name string) (map[string]interface{}, error)

func (*Client) KeepAlive

func (cli *Client) KeepAlive()

func (*Client) Login

func (cli *Client) Login() error

func (*Client) Logout

func (cli *Client) Logout()

func (*Client) QueryHostByPort

func (cli *Client) QueryHostByPort(port string) (string, error)

func (*Client) QueryHostOfVolume

func (cli *Client) QueryHostOfVolume(lunName string) ([]map[string]interface{}, error)

func (*Client) QueryIscsiPortal

func (cli *Client) QueryIscsiPortal() ([]map[string]interface{}, error)

func (*Client) UpdateHost

func (cli *Client) UpdateHost(hostName string, alua map[string]interface{}) error

Jump to

Keyboard shortcuts

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