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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OBJECT_NOT_EXIST             int64 = 1077948996
	OBJECT_ID_NOT_UNIQUE         int64 = 1077948997
	LUN_ALREADY_IN_GROUP         int64 = 1077936862
	HOSTGROUP_NOT_IN_MAPPING     int64 = 1073804552
	LUNGROUP_NOT_IN_MAPPING      int64 = 1073804554
	HOSTGROUP_ALREADY_IN_MAPPING int64 = 1073804556
	LUNGROUP_ALREADY_IN_MAPPING  int64 = 1073804560
	HOST_ALREADY_IN_HOSTGROUP    int64 = 1077937501
	HOST_NOT_IN_HOSTGROUP        int64 = 1073745412
	OBJECT_NAME_ALREADY_EXIST    int64 = 1077948993
	HOST_NOT_EXIST               int64 = 1077937498
	HOSTGROUP_NOT_EXIST          int64 = 1077937500
	LUN_NOT_EXIST                int64 = 1077936859
	MAPPING_NOT_EXIST            int64 = 1077951819
	FILESYSTEM_NOT_EXIST         int64 = 1073752065
	SHARE_NOT_EXIST              int64 = 1077939717
	SHARE_PATH_INVALID           int64 = 1077939729
	SHARE_ALREADY_EXIST          int64 = 1077939724
	SHARE_PATH_ALREADY_EXIST     int64 = 1077940500
	LUNCOPY_NOT_EXIST            int64 = 1077950183
	CLONEPAIR_NOT_EXIST          int64 = 1073798147
	LUN_SNAPSHOT_NOT_EXIST       int64 = 1077937880
	SNAPSHOT_NOT_ACTIVATED       int64 = 1077937891
	FS_SNAPSHOT_NOT_EXIST        int64 = 1073754118
	REPLICATION_NOT_EXIST        int64 = 1077937923
	HYPERMETRO_NOT_EXIST         int64 = 1077674242
	SNAPSHOT_PARENT_NOT_EXIST    int64 = 1073754117
	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": map[string]bool{
			"/xx/sessions": true,
		},
		"GET": map[string]bool{
			"/storagepool":     true,
			"/license/feature": true,
		},
	}

	LOG_REGEX_FILTER = map[string][]string{
		"GET": {
			`/vstore_pair\?filter=ID`,
		},
	}
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(urls []string, user, password, vstoreName, parallelNum string) *Client

func (*Client) ActivateLunSnapshot

func (cli *Client) ActivateLunSnapshot(snapshotID string) error

func (*Client) ActivateQos

func (cli *Client) ActivateQos(qosID string) error

func (*Client) AddFCInitiatorToHost

func (cli *Client) AddFCInitiatorToHost(initiator, hostID string) error

func (*Client) AddGroupToMapping

func (cli *Client) AddGroupToMapping(groupType int, groupID, mappingID string) error

func (*Client) AddHostToGroup

func (cli *Client) AddHostToGroup(hostID, hostGroupID string) error

func (*Client) AddIscsiInitiator

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

func (*Client) AddIscsiInitiatorToHost

func (cli *Client) AddIscsiInitiatorToHost(initiator, hostID string) error

func (*Client) AddLunToGroup

func (cli *Client) AddLunToGroup(lunID string, groupID string) error

func (*Client) AddRoCEInitiator

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

func (*Client) AddRoCEInitiatorToHost

func (cli *Client) AddRoCEInitiatorToHost(initiator, hostID string) error

func (*Client) AllowNfsShareAccess

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

func (*Client) CloneFileSystem

func (cli *Client) CloneFileSystem(name string, allocType int, parentID, parentSnapshotID string) (map[string]interface{}, error)

func (*Client) CreateClonePair

func (cli *Client) CreateClonePair(srcLunID, dstLunID string, cloneSpeed int) (map[string]interface{}, error)

func (*Client) CreateFSSnapshot

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

func (*Client) CreateFileSystem

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

func (*Client) CreateHost

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

func (*Client) CreateHostGroup

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

func (*Client) CreateHyperMetroPair

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

func (*Client) CreateLun

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

func (*Client) CreateLunCopy

func (cli *Client) CreateLunCopy(name, srcLunID, dstLunID string, copySpeed int) (map[string]interface{}, error)

func (*Client) CreateLunGroup

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

func (*Client) CreateLunSnapshot

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

func (*Client) CreateMapping

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

func (*Client) CreateNfsShare

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

func (*Client) CreateQos

func (cli *Client) CreateQos(name, objID, objType string, params map[string]int) (map[string]interface{}, error)

func (*Client) CreateReplicationPair

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

func (*Client) DeactivateLunSnapshot

func (cli *Client) DeactivateLunSnapshot(snapshotID string) error

func (*Client) DeactivateQos

func (cli *Client) DeactivateQos(qosID string) error

func (*Client) DeleteClonePair

func (cli *Client) DeleteClonePair(clonePairID string) error

func (*Client) DeleteFSSnapshot

func (cli *Client) DeleteFSSnapshot(snapshotID string) error

func (*Client) DeleteFileSystem

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

func (*Client) DeleteHost

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

func (*Client) DeleteHostGroup

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

func (*Client) DeleteHyperMetroPair

func (cli *Client) DeleteHyperMetroPair(pairID string) error

func (*Client) DeleteLun

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

func (*Client) DeleteLunCopy

func (cli *Client) DeleteLunCopy(lunCopyID string) error

func (*Client) DeleteLunGroup

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

func (*Client) DeleteLunSnapshot

func (cli *Client) DeleteLunSnapshot(snapshotID string) error

func (*Client) DeleteMapping

func (cli *Client) DeleteMapping(id 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(qosID string) error

func (*Client) DeleteReplicationPair

func (cli *Client) DeleteReplicationPair(pairID string) error

func (*Client) DuplicateClient

func (cli *Client) DuplicateClient() *Client

func (*Client) ExtendFileSystem

func (cli *Client) ExtendFileSystem(fsID string, newCapacity int64) error

func (*Client) ExtendLun

func (cli *Client) ExtendLun(lunID string, newCapacity int64) error

func (*Client) GetAllPools

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

func (*Client) GetClonePairInfo

func (cli *Client) GetClonePairInfo(clonePairID string) (map[string]interface{}, error)
func (cli *Client) GetFCHostLink(hostID string) ([]interface{}, error)

func (*Client) GetFCInitiator

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

func (*Client) GetFCInitiatorByID

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

func (*Client) GetFSHyperMetroDomain

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

func (*Client) GetFSSnapshotByName

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

func (*Client) GetFSSnapshotCountByParentId

func (cli *Client) GetFSSnapshotCountByParentId(ParentId string) (int, error)

func (*Client) GetFileSystemByID

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

func (*Client) GetFileSystemByName

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

func (*Client) GetHostByName

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

func (*Client) GetHostGroupByName

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

func (*Client) GetHyperMetroDomain

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

func (*Client) GetHyperMetroDomainByName

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

func (*Client) GetHyperMetroPair

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

func (*Client) GetHyperMetroPairByLocalObjID

func (cli *Client) GetHyperMetroPairByLocalObjID(objID string) (map[string]interface{}, error)
func (cli *Client) GetISCSIHostLink(hostID string) ([]interface{}, error)

func (*Client) GetIscsiInitiator

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

func (*Client) GetIscsiInitiatorByID

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

func (*Client) GetIscsiTgtPort

func (cli *Client) GetIscsiTgtPort() ([]interface{}, error)

func (*Client) GetLicenseFeature

func (cli *Client) GetLicenseFeature() (map[string]int, error)

func (*Client) GetLunByID

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

func (*Client) GetLunByName

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

func (*Client) GetLunCopyByID

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

func (*Client) GetLunCopyByName

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

func (*Client) GetLunCountOfHost

func (cli *Client) GetLunCountOfHost(hostID string) (int64, error)

func (*Client) GetLunCountOfMapping

func (cli *Client) GetLunCountOfMapping(mappingID string) (int64, error)

func (*Client) GetLunGroupByName

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

func (*Client) GetLunSnapshotByName

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

func (*Client) GetMappingByName

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

func (*Client) GetNfsShareAccess

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

func (*Client) GetNfsShareAccessCount

func (cli *Client) GetNfsShareAccessCount(parentID string) (int64, error)

func (*Client) GetNfsShareAccessRange

func (cli *Client) GetNfsShareAccessRange(parentID string, startRange, endRange int64) ([]interface{}, error)

func (*Client) GetNfsShareByPath

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

func (*Client) GetPoolByName

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

func (*Client) GetQosByID

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

func (*Client) GetQosByName

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

func (*Client) GetRemoteDeviceBySN

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

func (*Client) GetReplicationPairByID

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

func (*Client) GetReplicationPairByResID

func (cli *Client) GetReplicationPairByResID(resID string, resType int) ([]map[string]interface{}, error)

func (*Client) GetReplicationvStorePairByvStore

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

func (*Client) GetReplicationvStorePairCount

func (cli *Client) GetReplicationvStorePairCount() (int64, error)

func (*Client) GetReplicationvStorePairRange

func (cli *Client) GetReplicationvStorePairRange(startRange, endRange int64) ([]interface{}, error)

func (*Client) GetRoCEInitiator

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

func (*Client) GetRoCEInitiatorByID

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

func (*Client) GetRoCEPortalByIP

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

func (*Client) GetSystem

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

func (*Client) GetvStoreByName

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

func (*Client) GetvStoreName

func (cli *Client) GetvStoreName() string

func (*Client) GetvStorePairByID

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

func (*Client) Login

func (cli *Client) Login() error

func (*Client) Logout

func (cli *Client) Logout()

func (*Client) QueryAssociateHostGroup

func (cli *Client) QueryAssociateHostGroup(objType int, objID string) ([]interface{}, error)

func (*Client) QueryAssociateLunGroup

func (cli *Client) QueryAssociateLunGroup(objType int, objID string) ([]interface{}, error)

func (*Client) QueryFCInitiatorByHost

func (cli *Client) QueryFCInitiatorByHost(hostID string) ([]interface{}, error)

func (*Client) RemoveGroupFromMapping

func (cli *Client) RemoveGroupFromMapping(groupType int, groupID, mappingID string) error

func (*Client) RemoveHostFromGroup

func (cli *Client) RemoveHostFromGroup(hostID, hostGroupID string) error

func (*Client) RemoveLunFromGroup

func (cli *Client) RemoveLunFromGroup(lunID, groupID string) error

func (*Client) SplitCloneFS

func (cli *Client) SplitCloneFS(fsID string, splitSpeed int, isDeleteParentSnapshot bool) error

func (*Client) SplitReplicationPair

func (cli *Client) SplitReplicationPair(pairID string) error

func (*Client) StartLunCopy

func (cli *Client) StartLunCopy(lunCopyID string) error

func (*Client) StopCloneFSSplit

func (cli *Client) StopCloneFSSplit(fsID string) error

func (*Client) StopHyperMetroPair

func (cli *Client) StopHyperMetroPair(pairID string) error

func (*Client) StopLunCopy

func (cli *Client) StopLunCopy(lunCopyID string) error

func (*Client) SyncClonePair

func (cli *Client) SyncClonePair(clonePairID string) error

func (*Client) SyncHyperMetroPair

func (cli *Client) SyncHyperMetroPair(pairID string) error

func (*Client) SyncReplicationPair

func (cli *Client) SyncReplicationPair(pairID string) error

func (*Client) UpdateFCInitiator

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

func (*Client) UpdateFileSystem

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

func (*Client) UpdateHost

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

func (*Client) UpdateIscsiInitiator

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

func (*Client) UpdateLun

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

func (*Client) UpdateQos

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

type Response

type Response struct {
	Error map[string]interface{} `json:"error"`
	Data  interface{}            `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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