Documentation
¶
Index ¶
- Constants
- func EncodeName(id string) string
- func Gb2Sector(gb int64) int64
- func Sector2Gb(sec int64) int64
- type Auth
- type AuthData
- type AuthOptions
- type CIFS
- type CIFSShare
- type CIFSShareClient
- type CIFSShareClientData
- type CIFSShareData
- type CIFSShareList
- type Client
- type Config
- type Count
- type DeleteError
- type Driver
- func (d *Driver) CreateFileShare(opt *pb.CreateFileShareOpts) (*model.FileShareSpec, error)
- func (d *Driver) CreateFileShareAcl(opt *pb.CreateFileShareAclOpts) (*model.FileShareAclSpec, error)
- func (d *Driver) CreateFileShareAclParamCheck(opt *pb.CreateFileShareAclOpts) (string, string, string, string, error)
- func (d *Driver) CreateFileShareSnapshot(opt *pb.CreateFileShareSnapshotOpts) (*model.FileShareSnapshotSpec, error)
- func (d *Driver) DeleteFileShare(opt *pb.DeleteFileShareOpts) error
- func (d *Driver) DeleteFileShareAcl(opt *pb.DeleteFileShareAclOpts) error
- func (d *Driver) DeleteFileShareAclParamCheck(opt *pb.DeleteFileShareAclOpts) (string, string, string, error)
- func (d *Driver) DeleteFileShareSnapshot(opt *pb.DeleteFileShareSnapshotOpts) error
- func (d *Driver) DeleteFileSystem(fsName string) error
- func (d *Driver) InitConf()
- func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
- func (d *Driver) Setup() error
- func (d *Driver) Unset() error
- type Error
- type FSSnapshot
- type FSSnapshotData
- type FSSnapshotList
- type FileSystem
- type FileSystemData
- type FileSystemList
- type LogicalPortData
- type LogicalPortList
- type NFS
- type NFSShare
- type NFSShareClient
- type NFSShareData
- type NFSShareList
- type Protocol
- type ShareAuthClientData
- type ShareAuthClientList
- type StoragePool
- type StoragePoolList
Constants ¶
View Source
const ( DefaultConfPath = "/etc/opensds/driver/oceanstor_fileshare.yaml" PwdExpired = 3 PwdReset = 4 NFSProto = "nfs" CIFSProto = "cifs" UnitGi = 1024 * 1024 * 1024 StatusFSHealth = "1" StatusFSRunning = "27" AccessLevelRW = "rw" AccessLevelRO = "ro" AccessNFSRw = "1" AccessNFSRo = "0" AccessCIFSRo = "0" AccessCIFSFullControl = "1" MaxRetry = 3 NamePrefix = "opensds" AccessTypeUser = "user" AccessTypeIp = "ip" AccessLevelRead = "read" AccessLevelWrite = "write" AccessLevelExecute = "execute" )
Variables ¶
This section is empty.
Functions ¶
func EncodeName ¶
Types ¶
type AuthData ¶
type AuthData struct { AccountState int `json:"accountstate"` DeviceId string `json:"deviceid"` IBaseToken string `json:"iBaseToken"` LastLoginIp string `json:"lastloginip"` LastLoginTime int `json:"lastlogintime"` Level int `json:"level"` PwdChanGeTime int `json:"pwdchangetime"` UserGroup string `json:"usergroup"` UserId string `json:"userid"` UserName string `json:"username"` UserScope string `json:"userscope"` }
type AuthOptions ¶
type CIFSShareClient ¶
type CIFSShareClient struct {}
type CIFSShareClientData ¶
type CIFSShareClientData struct {}
type CIFSShareData ¶
type CIFSShareData struct {}
type CIFSShareList ¶
type CIFSShareList struct {}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ListStoragePools ¶
func (c *Client) ListStoragePools() ([]StoragePool, error)
type Config ¶
type Config struct { AuthOptions `yaml:"authOptions"` Pool map[string]PoolProperties `yaml:"pool,flow"` }
type DeleteError ¶
type DeleteError struct {
Error `json:"error"`
}
type Driver ¶
func (*Driver) CreateFileShare ¶
func (d *Driver) CreateFileShare(opt *pb.CreateFileShareOpts) (*model.FileShareSpec, error)
func (*Driver) CreateFileShareAcl ¶
func (d *Driver) CreateFileShareAcl(opt *pb.CreateFileShareAclOpts) (*model.FileShareAclSpec, error)
AllowAccess allow access to the share
func (*Driver) CreateFileShareAclParamCheck ¶
func (*Driver) CreateFileShareSnapshot ¶
func (d *Driver) CreateFileShareSnapshot(opt *pb.CreateFileShareSnapshotOpts) (*model.FileShareSnapshotSpec, error)
func (*Driver) DeleteFileShare ¶
func (d *Driver) DeleteFileShare(opt *pb.DeleteFileShareOpts) error
func (*Driver) DeleteFileShareAcl ¶
func (d *Driver) DeleteFileShareAcl(opt *pb.DeleteFileShareAclOpts) error
func (*Driver) DeleteFileShareAclParamCheck ¶
func (*Driver) DeleteFileShareSnapshot ¶
func (d *Driver) DeleteFileShareSnapshot(opt *pb.DeleteFileShareSnapshotOpts) error
func (*Driver) DeleteFileSystem ¶
type FSSnapshot ¶
type FSSnapshot struct { Data FSSnapshotData `json:"data"` Error `json:"error"` }
type FSSnapshotData ¶
type FSSnapshotData struct { Type int `json:"TYPE"` ID string `json:"ID"` Name string `json:"NAME"` ConsumeCapacity string `json:"CONSUMEDCAPACITY"` HealthStatus string `json:"HEALTHSTATUS"` ParentID string `json:"PARENTID"` ParentName string `json:"PARENTNAME"` ParentType int `json:"PARENTTYPE"` Capacity string `json:"USERCAPACITY"` }
FSSnapshot file system snapshot ...
type FSSnapshotList ¶
type FSSnapshotList struct { Data []FSSnapshotData `json:"data"` Error `json:"error"` }
type FileSystem ¶
type FileSystem struct { Data FileSystemData `json:"data"` Error `json:"error"` }
type FileSystemData ¶
type FileSystemList ¶
type FileSystemList struct { Data []FileSystemData `json:"data"` Error `json:"error"` }
type LogicalPortData ¶
type LogicalPortList ¶
type LogicalPortList struct { Data []LogicalPortData `json:"data"` Error `json:"error"` }
LogicalPortList logical portal ...
type NFSShareClient ¶
type NFSShareClient struct {
}type NFSShareData ¶
type NFSShareData struct {}
type NFSShareList ¶
type NFSShareList struct {}
type Protocol ¶
type Protocol interface {
// contains filtered or unexported methods
}
func NewProtocol ¶
type ShareAuthClientData ¶
type ShareAuthClientData struct { // contains filtered or unexported fields }
type ShareAuthClientList ¶
type ShareAuthClientList struct {}
type StoragePool ¶
type StoragePoolList ¶
type StoragePoolList struct { Data []StoragePool `json:"data"` Error `json:"error"` }
Click to show internal directories.
Click to hide internal directories.