Documentation ¶
Overview ¶
Package client provides fusion storage client
Index ¶
- Constants
- type AllowNfsShareAccessRequest
- type Client
- func (cli *Client) AddLunToHost(ctx context.Context, lunName, hostName string) error
- func (cli *Client) AddPortToHost(ctx context.Context, initiatorName, hostName string) error
- func (cli *Client) AllowNfsShareAccess(ctx context.Context, req *AllowNfsShareAccessRequest) error
- func (cli *Client) AssociateConvergedQoSWithVolume(ctx context.Context, req *types.AssociateConvergedQoSWithVolumeReq) error
- func (cli *Client) AssociateQoSWithVolume(ctx context.Context, volName, qosName string) error
- func (cli *Client) AttachVolume(ctx context.Context, name, ip string) error
- func (cli *Client) CreateConvergedQoS(ctx context.Context, req *types.CreateConvergedQoSReq) (int, error)
- func (cli *Client) CreateFileSystem(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (cli *Client) CreateHost(ctx context.Context, hostName string, alua map[string]interface{}) error
- func (cli *Client) CreateInitiator(ctx context.Context, name string) error
- func (cli *Client) CreateNfsShare(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
- func (cli *Client) CreateQoS(ctx context.Context, qosName string, qosData map[string]int) error
- func (cli *Client) CreateQuota(ctx context.Context, params map[string]interface{}) error
- func (cli *Client) CreateSnapshot(ctx context.Context, snapshotName, volName string) error
- func (cli *Client) CreateVolume(ctx context.Context, params map[string]interface{}) error
- func (cli *Client) CreateVolumeFromSnapshot(ctx context.Context, volName string, volSize int64, snapshotName string) error
- func (cli *Client) DeleteConvergedQoS(ctx context.Context, qosName string) error
- func (cli *Client) DeleteFileSystem(ctx context.Context, id string) error
- func (cli *Client) DeleteLunFromHost(ctx context.Context, lunName, hostName string) error
- func (cli *Client) DeleteNfsShare(ctx context.Context, id, accountId string) error
- func (cli *Client) DeleteNfsShareAccess(ctx context.Context, accessID string) error
- func (cli *Client) DeleteQoS(ctx context.Context, qosName string) error
- func (cli *Client) DeleteQuota(ctx context.Context, quotaID string) error
- func (cli *Client) DeleteSnapshot(ctx context.Context, snapshotName string) error
- func (cli *Client) DeleteVolume(ctx context.Context, name string) error
- func (cli *Client) DetachVolume(ctx context.Context, name, ip string) error
- func (cli *Client) DisassociateConvergedQoSWithVolume(ctx context.Context, objectName string) error
- func (cli *Client) DisassociateQoSWithVolume(ctx context.Context, volName, qosName string) error
- func (cli *Client) DuplicateClient() *Client
- func (cli *Client) ExtendVolume(ctx context.Context, lunName string, newCapacity int64) error
- func (cli *Client) GetAccountIdByName(ctx context.Context, accountName string) (string, error)
- func (cli *Client) GetAllAccounts(ctx context.Context) ([]string, error)
- func (cli *Client) GetAllPools(ctx context.Context) (map[string]interface{}, error)
- func (cli *Client) GetAssociateCountOfQoS(ctx context.Context, qosName string) (int, error)
- func (cli *Client) GetConvergedQoSNameByID(ctx context.Context, qosId int) (string, error)
- func (cli *Client) GetFileSystemByName(ctx context.Context, name string) (map[string]interface{}, error)
- func (cli *Client) GetHostByName(ctx context.Context, hostName string) (map[string]interface{}, error)
- func (cli *Client) GetHostLunId(ctx context.Context, hostName, lunName string) (string, error)
- func (cli *Client) GetInitiatorByName(ctx context.Context, name string) (map[string]interface{}, error)
- func (cli *Client) GetNFSServiceSetting(ctx context.Context) (map[string]bool, error)
- func (cli *Client) GetNfsShareAccess(ctx context.Context, shareID string) (map[string]interface{}, error)
- func (cli *Client) GetNfsShareByPath(ctx context.Context, path, accountId string) (map[string]interface{}, error)
- func (cli *Client) GetPoolById(ctx context.Context, poolId int64) (map[string]interface{}, error)
- func (cli *Client) GetPoolByName(ctx context.Context, poolName string) (map[string]interface{}, error)
- func (cli *Client) GetQoSNameByVolume(ctx context.Context, volName string) (string, error)
- func (cli *Client) GetQoSPolicyAssociationCount(ctx context.Context, qosPolicyId int) (int, error)
- func (cli *Client) GetQoSPolicyIdByFsName(ctx context.Context, namespaceName string) (int, error)
- func (cli *Client) GetQuotaByFileSystemById(ctx context.Context, fsID string) (map[string]interface{}, error)
- func (cli *Client) GetQuotaByFileSystemName(ctx context.Context, fsName string) (map[string]interface{}, error)
- func (cli *Client) GetSnapshotByName(ctx context.Context, snapshotName string) (map[string]interface{}, error)
- func (cli *Client) GetVolumeByName(ctx context.Context, name string) (map[string]interface{}, error)
- func (cli *Client) KeepAlive(ctx context.Context)
- func (cli *Client) Login(ctx context.Context) error
- func (cli *Client) Logout(ctx context.Context)
- func (cli *Client) Post(ctx context.Context, url string, data map[string]interface{}) (map[string]interface{}, error)
- func (cli *Client) QueryHostByPort(ctx context.Context, port string) (string, error)
- func (cli *Client) QueryHostOfVolume(ctx context.Context, lunName string) ([]map[string]interface{}, error)
- func (cli *Client) QueryIscsiPortal(ctx context.Context) ([]map[string]interface{}, error)
- func (cli *Client) SetAccountId(ctx context.Context) error
- func (cli *Client) UpdateHost(ctx context.Context, hostName string, alua map[string]interface{}) error
- func (cli *Client) UpdateQuota(ctx context.Context, params map[string]interface{}) error
- func (cli *Client) ValidateLogin(ctx context.Context) error
- type NewClientConfig
Constants ¶
const (
// IPLock defines error code of ip lock
IPLock = 1077949071
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowNfsShareAccessRequest ¶
type AllowNfsShareAccessRequest struct {}
AllowNfsShareAccessRequest used for AllowNfsShareAccess request
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines fusion storage client
func NewClient ¶
func NewClient(ctx context.Context, clientConfig *NewClientConfig) *Client
NewClient used to init a new fusion storage client
func (*Client) AddLunToHost ¶
AddLunToHost usd to add lun to host
func (*Client) AddPortToHost ¶
AddPortToHost used add port to host
func (*Client) AllowNfsShareAccess ¶
func (cli *Client) AllowNfsShareAccess(ctx context.Context, req *AllowNfsShareAccessRequest) error
AllowNfsShareAccess used for create nfs share client
func (*Client) AssociateConvergedQoSWithVolume ¶
func (cli *Client) AssociateConvergedQoSWithVolume(ctx context.Context, req *types.AssociateConvergedQoSWithVolumeReq) error
AssociateConvergedQoSWithVolume used to add a converged QoS policy association
func (*Client) AssociateQoSWithVolume ¶
AssociateQoSWithVolume used to associate QoS with volume
func (*Client) AttachVolume ¶
AttachVolume attaches volume target ip
func (*Client) CreateConvergedQoS ¶
func (cli *Client) CreateConvergedQoS(ctx context.Context, req *types.CreateConvergedQoSReq) (int, error)
CreateConvergedQoS used to create converged QoS
func (*Client) CreateFileSystem ¶
func (cli *Client) CreateFileSystem(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
CreateFileSystem used to create file system by params
func (*Client) CreateHost ¶
func (cli *Client) CreateHost(ctx context.Context, hostName string, alua map[string]interface{}) error
CreateHost used to create host
func (*Client) CreateInitiator ¶
CreateInitiator used to create initiator by name
func (*Client) CreateNfsShare ¶
func (cli *Client) CreateNfsShare(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
CreateNfsShare used to create nfs share by params
func (*Client) CreateQuota ¶
CreateQuota creates quota by params
func (*Client) CreateSnapshot ¶
CreateSnapshot creates volume snapshot
func (*Client) CreateVolume ¶
CreateVolume creates volume by params
func (*Client) CreateVolumeFromSnapshot ¶
func (cli *Client) CreateVolumeFromSnapshot(ctx context.Context, volName string, volSize int64, snapshotName string) error
CreateVolumeFromSnapshot creates volume from snapshot
func (*Client) DeleteConvergedQoS ¶
DeleteConvergedQoS used to delete converged QoS by name
func (*Client) DeleteFileSystem ¶
DeleteFileSystem used to delete file system by id
func (*Client) DeleteLunFromHost ¶
DeleteLunFromHost used to delete lun from host
func (*Client) DeleteNfsShare ¶
DeleteNfsShare used to delete nfs share by id
func (*Client) DeleteNfsShareAccess ¶
DeleteNfsShareAccess used to delete nfs share access by id
func (*Client) DeleteQuota ¶
DeleteQuota deletes quota by id
func (*Client) DeleteSnapshot ¶
DeleteSnapshot deletes volume snapshot
func (*Client) DeleteVolume ¶
DeleteVolume deletes volume by name
func (*Client) DetachVolume ¶
DetachVolume detaches volume from target ip
func (*Client) DisassociateConvergedQoSWithVolume ¶
DisassociateConvergedQoSWithVolume used to delete a converged QoS policy association
func (*Client) DisassociateQoSWithVolume ¶
DisassociateQoSWithVolume used to disassociate QoS with volume
func (*Client) DuplicateClient ¶
DuplicateClient used to duplicate client
func (*Client) ExtendVolume ¶
ExtendVolume extends volume capacity
func (*Client) GetAccountIdByName ¶
GetAccountIdByName gets account id by account name
func (*Client) GetAllAccounts ¶
GetAllAccounts gets all accounts
func (*Client) GetAllPools ¶
GetAllPools gets all pools
func (*Client) GetAssociateCountOfQoS ¶
GetAssociateCountOfQoS used to get associate count of QoS
func (*Client) GetConvergedQoSNameByID ¶
GetConvergedQoSNameByID used to get qos name by id
func (*Client) GetFileSystemByName ¶
func (cli *Client) GetFileSystemByName(ctx context.Context, name string) (map[string]interface{}, error)
GetFileSystemByName used to get file system by name
func (*Client) GetHostByName ¶
func (cli *Client) GetHostByName(ctx context.Context, hostName string) (map[string]interface{}, error)
GetHostByName used to get host by name
func (*Client) GetHostLunId ¶
GetHostLunId gets host lun id of hostName
func (*Client) GetInitiatorByName ¶
func (cli *Client) GetInitiatorByName(ctx context.Context, name string) (map[string]interface{}, error)
GetInitiatorByName used to get initiator by name
func (*Client) GetNFSServiceSetting ¶
GetNFSServiceSetting gets nfs service settings
func (*Client) GetNfsShareAccess ¶
func (cli *Client) GetNfsShareAccess(ctx context.Context, shareID string) (map[string]interface{}, error)
GetNfsShareAccess used to get nfs share access by id
func (*Client) GetNfsShareByPath ¶
func (cli *Client) GetNfsShareByPath(ctx context.Context, path, accountId string) (map[string]interface{}, error)
GetNfsShareByPath used to get nfs share by path
func (*Client) GetPoolById ¶
GetPoolById gets pool by pool id
func (*Client) GetPoolByName ¶
func (cli *Client) GetPoolByName(ctx context.Context, poolName string) (map[string]interface{}, error)
GetPoolByName gets pool by pool name
func (*Client) GetQoSNameByVolume ¶
GetQoSNameByVolume used to get QoS name by volume name
func (*Client) GetQoSPolicyAssociationCount ¶
GetQoSPolicyAssociationCount used to get count of qos association
func (*Client) GetQoSPolicyIdByFsName ¶
GetQoSPolicyIdByFsName used to get qos id by fs name
func (*Client) GetQuotaByFileSystemById ¶
func (cli *Client) GetQuotaByFileSystemById(ctx context.Context, fsID string) (map[string]interface{}, error)
GetQuotaByFileSystemById query quota info by file system id
func (*Client) GetQuotaByFileSystemName ¶
func (cli *Client) GetQuotaByFileSystemName(ctx context.Context, fsName string) (map[string]interface{}, error)
GetQuotaByFileSystemName query quota info by file system name
func (*Client) GetSnapshotByName ¶
func (cli *Client) GetSnapshotByName(ctx context.Context, snapshotName string) (map[string]interface{}, error)
GetSnapshotByName get snapshot by name
func (*Client) GetVolumeByName ¶
func (cli *Client) GetVolumeByName(ctx context.Context, name string) (map[string]interface{}, error)
GetVolumeByName gets volume info by name
func (*Client) Post ¶
func (cli *Client) Post(ctx context.Context, url string, data map[string]interface{}) (map[string]interface{}, error)
Post used to send post request to storage client
func (*Client) QueryHostByPort ¶
QueryHostByPort used query host by port
func (*Client) QueryHostOfVolume ¶
func (cli *Client) QueryHostOfVolume(ctx context.Context, lunName string) ([]map[string]interface{}, error)
QueryHostOfVolume used to query host of volume
func (*Client) QueryIscsiPortal ¶
QueryIscsiPortal used to query iscsi portal
func (*Client) SetAccountId ¶
SetAccountId used to set account id of the client
func (*Client) UpdateHost ¶
func (cli *Client) UpdateHost(ctx context.Context, hostName string, alua map[string]interface{}) error
UpdateHost used to update host
func (*Client) UpdateQuota ¶
UpdateQuota updates quota by params