Documentation ¶
Overview ¶
Package nfs from common/admin contains a set of APIs used to interact with and administer NFS support for ceph clusters.
Index ¶
- type Admin
- func (nfsa *Admin) CreateCephFSExport(spec CephFSExportSpec) (*ExportResult, error)
- func (nfsa *Admin) ExportInfo(clusterID, pseudoPath string) (ExportInfo, error)
- func (nfsa *Admin) ListDetailedExports(clusterID string) ([]ExportInfo, error)
- func (nfsa *Admin) RemoveExport(clusterID, pseudoPath string) error
- type CephFSExportSpec
- type ClientInfo
- type ExportInfo
- type ExportResult
- type FSALInfo
- type SecType
- type SquashMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Admin struct {
// contains filtered or unexported fields
}
Admin is used to administer ceph nfs features.
func NewFromConn ¶
func NewFromConn(conn ccom.RadosCommander) *Admin
NewFromConn creates an new management object from a preexisting rados connection. The existing connection can be rados.Conn or any type implementing the RadosCommander interface.
func (*Admin) CreateCephFSExport ¶
func (nfsa *Admin) CreateCephFSExport(spec CephFSExportSpec) ( *ExportResult, error)
CreateCephFSExport will create a new NFS export for a CephFS file system.
Similar To:
ceph nfs export create cephfs
func (*Admin) ExportInfo ¶
func (nfsa *Admin) ExportInfo(clusterID, pseudoPath string) (ExportInfo, error)
ExportInfo will return a structure describing the export specified by it's pseudo-path.
Similar To:
ceph nfs export info
func (*Admin) ListDetailedExports ¶
func (nfsa *Admin) ListDetailedExports(clusterID string) ([]ExportInfo, error)
ListDetailedExports will return a list of exports with details.
Similar To:
ceph nfs export ls --detailed
func (*Admin) RemoveExport ¶
RemoveExport will remove an NFS export based on the pseudo-path of the export.
Similar To:
ceph nfs export rm
type CephFSExportSpec ¶
type CephFSExportSpec struct { FileSystemName string `json:"fsname"` ClusterID string `json:"cluster_id"` PseudoPath string `json:"pseudo_path"` Path string `json:"path,omitempty"` ReadOnly bool `json:"readonly"` ClientAddr []string `json:"client_addr,omitempty"` Squash SquashMode `json:"squash,omitempty"` SecType []SecType `json:"sectype,omitempty"` }
CephFSExportSpec is used to specify the parameters used to create a new CephFS based export.
type ClientInfo ¶
type ClientInfo struct { Addresses []string `json:"addresses"` AccessType string `json:"access_type"` Squash SquashMode `json:"squash"` }
ClientInfo describes per-client parameters of an export.
type ExportInfo ¶
type ExportInfo struct { ExportID int64 `json:"export_id"` Path string `json:"path"` ClusterID string `json:"cluster_id"` PseudoPath string `json:"pseudo"` AccessType string `json:"access_type"` Squash SquashMode `json:"squash"` SecurityLabel bool `json:"security_label"` Protocols []int `json:"protocols"` Transports []string `json:"transports"` FSAL FSALInfo `json:"fsal"` Clients []ClientInfo `json:"clients"` SecType []SecType `json:"sectype"` }
ExportInfo describes an NFS export.
type ExportResult ¶
type ExportResult struct { Bind string `json:"bind"` FileSystemName string `json:"fs"` Path string `json:"path"` ClusterID string `json:"cluster"` Mode string `json:"mode"` }
ExportResult is returned along with newly created exports.
type FSALInfo ¶
type FSALInfo struct { Name string `json:"name"` UserID string `json:"user_id"` FileSystemName string `json:"fs_name"` }
FSALInfo describes NFS-Ganesha specific FSAL properties of an export.
type SecType ¶
type SecType string
SecType indicates the kind of security/authentication to be used by an export.
type SquashMode ¶
type SquashMode string
SquashMode indicates the kind of user-id squashing performed on an export.
const ( // NoneSquash performs no id squashing. NoneSquash SquashMode = "None" // RootSquash performs squashing of root user (with any gid). RootSquash SquashMode = "Root" // AllSquash performs squashing of all users. AllSquash SquashMode = "All" // RootIDSquash performs squashing of root uid/gid. RootIDSquash SquashMode = "RootId" // NoRootSquash is equivalent to NoneSquash NoRootSquash = NoneSquash // Unspecifiedquash Unspecifiedquash SquashMode = "" )
src: https://github.com/nfs-ganesha/nfs-ganesha/blob/next/src/config_samples/export.txt