Documentation
¶
Index ¶
- Constants
- Variables
- func Initialize() error
- type ConfigFile
- type DefaultServerControllerProvider
- type DisabledServerController
- func (*DisabledServerController) Connected() bool
- func (*DisabledServerController) CreateFileSystem(*Storage, FileSystemApi, FileSystemOptions) error
- func (*DisabledServerController) Delete(*Storage) error
- func (*DisabledServerController) DeleteFileSystem(*Storage, FileSystemApi) error
- func (*DisabledServerController) GetServerInfo() ServerInfo
- func (*DisabledServerController) GetStatus(*Storage) (StorageStatus, error)
- func (*DisabledServerController) MountFileSystem(*Storage, FileSystemApi, string) error
- func (*DisabledServerController) NewStorage(uuid.UUID, []StorageNamespace) *Storage
- func (*DisabledServerController) UnmountFileSystem(*Storage, FileSystemApi, string) error
- type FileSystem
- type FileSystemApi
- type FileSystemConfig
- type FileSystemControllerApi
- type FileSystemError
- type FileSystemGfs2
- func (f *FileSystemGfs2) Create(devices []string, opts FileSystemOptions) (err error)
- func (*FileSystemGfs2) IsMockable() bool
- func (*FileSystemGfs2) IsType(oem *FileSystemOem) bool
- func (*FileSystemGfs2) MkfsDefault() string
- func (f *FileSystemGfs2) Mount(mountpoint string) error
- func (f *FileSystemGfs2) Name() string
- func (*FileSystemGfs2) New(oem FileSystemOem) (FileSystemApi, error)
- func (*FileSystemGfs2) Type() string
- func (*FileSystemGfs2) VgChangeActivateDefault() string
- type FileSystemInstallConfig
- type FileSystemLustre
- func (f *FileSystemLustre) Create(devices []string, options FileSystemOptions) error
- func (f *FileSystemLustre) Delete() error
- func (f *FileSystemLustre) GenerateRecoveryData() map[string]string
- func (*FileSystemLustre) IsMockable() bool
- func (*FileSystemLustre) IsType(oem *FileSystemOem) bool
- func (f *FileSystemLustre) LoadRecoveryData(map[string]string)
- func (f *FileSystemLustre) MkfsDefault() string
- func (f *FileSystemLustre) Mount(mountpoint string) error
- func (f *FileSystemLustre) Name() string
- func (*FileSystemLustre) New(oem FileSystemOem) (FileSystemApi, error)
- func (*FileSystemLustre) Type() string
- func (f *FileSystemLustre) VgChangeActivateDefault() string
- type FileSystemLvm
- func (f *FileSystemLvm) Create(devices []string, opts FileSystemOptions) error
- func (f *FileSystemLvm) Delete() error
- func (f *FileSystemLvm) GenerateRecoveryData() map[string]string
- func (*FileSystemLvm) IsMockable() bool
- func (*FileSystemLvm) IsType(oem *FileSystemOem) bool
- func (f *FileSystemLvm) LoadRecoveryData(data map[string]string)
- func (f *FileSystemLvm) MkfsDefault() string
- func (f *FileSystemLvm) Mount(mountpoint string) error
- func (f *FileSystemLvm) Name() string
- func (*FileSystemLvm) New(oem FileSystemOem) (FileSystemApi, error)
- func (*FileSystemLvm) Type() string
- func (f *FileSystemLvm) VgChangeActivateDefault() string
- type FileSystemOem
- type FileSystemOemGfs2
- type FileSystemOemLustre
- type FileSystemOemLvm
- type FileSystemOemMkfsMount
- type FileSystemOemVgChange
- type FileSystemOemZfs
- type FileSystemOperationConfig
- type FileSystemOptions
- type FileSystemRaw
- type FileSystemXfs
- func (f *FileSystemXfs) Create(devices []string, opts FileSystemOptions) (err error)
- func (*FileSystemXfs) IsMockable() bool
- func (*FileSystemXfs) IsType(oem *FileSystemOem) bool
- func (f *FileSystemXfs) MkfsDefault() string
- func (f *FileSystemXfs) Mount(mountpoint string) error
- func (f *FileSystemXfs) Name() string
- func (*FileSystemXfs) New(oem FileSystemOem) (FileSystemApi, error)
- func (*FileSystemXfs) Type() string
- type FileSystemZfs
- func (f *FileSystemZfs) Create(devices []string, options FileSystemOptions) error
- func (f *FileSystemZfs) Delete() error
- func (f *FileSystemZfs) GenerateRecoveryData() map[string]string
- func (*FileSystemZfs) IsMockable() bool
- func (*FileSystemZfs) IsType(oem *FileSystemOem) bool
- func (f *FileSystemZfs) LoadRecoveryData(map[string]string)
- func (f *FileSystemZfs) MkfsDefault() string
- func (f *FileSystemZfs) Mount(mountpoint string) error
- func (f *FileSystemZfs) Name() string
- func (*FileSystemZfs) New(oem FileSystemOem) (FileSystemApi, error)
- func (*FileSystemZfs) Type() string
- func (f *FileSystemZfs) Unmount(mountpoint string) error
- func (f *FileSystemZfs) VgChangeActivateDefault() string
- type LocalServerController
- func (c *LocalServerController) Connected() bool
- func (c *LocalServerController) CreateFileSystem(s *Storage, fs FileSystemApi, opts FileSystemOptions) error
- func (c *LocalServerController) Delete(s *Storage) error
- func (c *LocalServerController) DeleteFileSystem(s *Storage, fs FileSystemApi) error
- func (c *LocalServerController) Discover(s *Storage) error
- func (c *LocalServerController) GetServerInfo() ServerInfo
- func (c *LocalServerController) GetStatus(s *Storage) (StorageStatus, error)
- func (c *LocalServerController) MountFileSystem(s *Storage, fs FileSystemApi, mountPoint string) error
- func (c *LocalServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
- func (c *LocalServerController) UnmountFileSystem(s *Storage, fs FileSystemApi, mountPoint string) error
- type MockServerController
- func (c *MockServerController) Connected() bool
- func (*MockServerController) CreateFileSystem(s *Storage, fs FileSystemApi, opts FileSystemOptions) error
- func (c *MockServerController) Delete(s *Storage) error
- func (*MockServerController) DeleteFileSystem(s *Storage, fs FileSystemApi) error
- func (m *MockServerController) GetServerInfo() ServerInfo
- func (*MockServerController) GetStatus(s *Storage) (StorageStatus, error)
- func (*MockServerController) MountFileSystem(s *Storage, fs FileSystemApi, mountpoint string) error
- func (c *MockServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
- func (*MockServerController) UnmountFileSystem(s *Storage, fs FileSystemApi, mountpoint string) error
- type MockServerControllerProvider
- type RemoteServerController
- func (c *RemoteServerController) Connected() bool
- func (c *RemoteServerController) CreateFileSystem(*Storage, FileSystemApi, FileSystemOptions) error
- func (c *RemoteServerController) Delete(s *Storage) error
- func (r *RemoteServerController) DeleteFileSystem(*Storage, FileSystemApi) error
- func (c *RemoteServerController) GetServerInfo() ServerInfo
- func (c *RemoteServerController) GetStatus(s *Storage) (StorageStatus, error)
- func (r *RemoteServerController) MountFileSystem(*Storage, FileSystemApi, string) error
- func (c *RemoteServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
- func (r *RemoteServerController) UnmountFileSystem(*Storage, FileSystemApi, string) error
- type ServerControllerApi
- type ServerControllerOptions
- type ServerControllerProvider
- type ServerInfo
- type Storage
- func (s *Storage) CreateFileSystem(fs FileSystemApi, opts FileSystemOptions) error
- func (s *Storage) Delete() error
- func (s *Storage) DeleteFileSystem(fs FileSystemApi) error
- func (s *Storage) Devices() []string
- func (s *Storage) GetStatus() (StorageStatus, error)
- func (s *Storage) MountFileSystem(fs FileSystemApi, mountPoint string) error
- func (s *Storage) UnmountFileSystem(fs FileSystemApi, mountPoint string) error
- type StorageNamespace
- type StoragePoolOem
- type StorageStatus
Constants ¶
const ( UserID = "userID" GroupID = "groupID" )
const ( TargetMGT string = "MGT" TargetMDT string = "MDT" TargetMGTMDT string = "MGTMDT" TargetOST string = "OST" )
const ( BackFsLdiskfs string = "ldiskfs" BackFsZfs string = "zfs" )
const ( VolumeGroupName = "volumeGroupName" LogicalVolumeName = "logicalVolumeName" )
const ( RemoteStorageServiceId = "NNFServer" RemoteStorageServicePort = 60050 )
const ( StorageStatus_Starting StorageStatus = "starting" StorageStatus_Ready = "ready" StorageStatus_Error = "error" StorageStatus_Disabled = "disabled" )
Variables ¶
var ErrServerControllerDisabled = fmt.Errorf("Server Controller Disabled")
var (
FileSystemRegistry fileSystemRegistry
)
Functions ¶
func Initialize ¶
func Initialize() error
Types ¶
type ConfigFile ¶
type ConfigFile struct {
Version string
Metadata struct {
Name string
}
FileSystems []FileSystemConfig `yaml:"fileSystems"` // yaml sucks, and doesnt understand camelCase
}
type DefaultServerControllerProvider ¶
type DefaultServerControllerProvider struct{}
func (DefaultServerControllerProvider) NewServerController ¶
func (DefaultServerControllerProvider) NewServerController(opts ServerControllerOptions) ServerControllerApi
type DisabledServerController ¶
type DisabledServerController struct{}
Server Controller API for when there is no server present, or the server is disabled
func (*DisabledServerController) Connected ¶
func (*DisabledServerController) Connected() bool
func (*DisabledServerController) CreateFileSystem ¶
func (*DisabledServerController) CreateFileSystem(*Storage, FileSystemApi, FileSystemOptions) error
func (*DisabledServerController) Delete ¶
func (*DisabledServerController) Delete(*Storage) error
func (*DisabledServerController) DeleteFileSystem ¶
func (*DisabledServerController) DeleteFileSystem(*Storage, FileSystemApi) error
func (*DisabledServerController) GetServerInfo ¶
func (*DisabledServerController) GetServerInfo() ServerInfo
func (*DisabledServerController) GetStatus ¶
func (*DisabledServerController) GetStatus(*Storage) (StorageStatus, error)
func (*DisabledServerController) MountFileSystem ¶
func (*DisabledServerController) MountFileSystem(*Storage, FileSystemApi, string) error
func (*DisabledServerController) NewStorage ¶
func (*DisabledServerController) NewStorage(uuid.UUID, []StorageNamespace) *Storage
func (*DisabledServerController) UnmountFileSystem ¶
func (*DisabledServerController) UnmountFileSystem(*Storage, FileSystemApi, string) error
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem - Represents an abstract file system, with individual operations defined by the underlying FileSystemApi implementation
func (*FileSystem) LoadDeviceList ¶
func (f *FileSystem) LoadDeviceList(devices []string)
func (*FileSystem) Unmount ¶
func (f *FileSystem) Unmount(mountpoint string) error
type FileSystemApi ¶
type FileSystemApi interface {
New(oem FileSystemOem) (FileSystemApi, error)
IsType(oem *FileSystemOem) bool // Returns true if the provided oem fields match the file system type, false otherwise
IsMockable() bool // Returns true if the file system can be instantiated by the mock server, false otherwise
Type() string
Name() string
Create(devices []string, opts FileSystemOptions) error
Delete() error
VgChangeActivateDefault() string
MkfsDefault() string
Mount(mountpoint string) error
Unmount(mountpoint string) error
GenerateRecoveryData() map[string]string
LoadRecoveryData(data map[string]string)
LoadDeviceList(devices []string)
}
FileSystemApi - Defines the interface for interacting with various file systems supported by the NNF element controller.
type FileSystemConfig ¶
type FileSystemConfig struct {
Name string
Install []FileSystemInstallConfig
Operations []FileSystemOperationConfig
}
type FileSystemControllerApi ¶
type FileSystemControllerApi interface {
NewFileSystem(oem *FileSystemOem) (FileSystemApi, error)
}
var (
FileSystemController FileSystemControllerApi
)
func NewFileSystemController ¶
func NewFileSystemController(config *ConfigFile) FileSystemControllerApi
type FileSystemError ¶
type FileSystemError struct {
// contains filtered or unexported fields
}
func (*FileSystemError) Error ¶
func (e *FileSystemError) Error() string
func (*FileSystemError) Unwrap ¶
func (e *FileSystemError) Unwrap() error
type FileSystemGfs2 ¶
type FileSystemGfs2 struct {
FileSystemLvm
Oem FileSystemOemGfs2
MkfsMount FileSystemOemMkfsMount
}
func (*FileSystemGfs2) Create ¶
func (f *FileSystemGfs2) Create(devices []string, opts FileSystemOptions) (err error)
func (*FileSystemGfs2) IsMockable ¶
func (*FileSystemGfs2) IsMockable() bool
func (*FileSystemGfs2) IsType ¶
func (*FileSystemGfs2) IsType(oem *FileSystemOem) bool
func (*FileSystemGfs2) MkfsDefault ¶
func (*FileSystemGfs2) MkfsDefault() string
func (*FileSystemGfs2) Mount ¶
func (f *FileSystemGfs2) Mount(mountpoint string) error
func (*FileSystemGfs2) Name ¶
func (f *FileSystemGfs2) Name() string
func (*FileSystemGfs2) New ¶
func (*FileSystemGfs2) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemGfs2) Type ¶
func (*FileSystemGfs2) Type() string
func (*FileSystemGfs2) VgChangeActivateDefault ¶
func (*FileSystemGfs2) VgChangeActivateDefault() string
type FileSystemInstallConfig ¶
type FileSystemLustre ¶
type FileSystemLustre struct {
// Satisfy FileSystemApi interface.
FileSystem
TargetType string
Oem FileSystemOemLustre
MkfsMount FileSystemOemMkfsMount
ZfsArgs FileSystemOemZfs
}
func (*FileSystemLustre) Create ¶
func (f *FileSystemLustre) Create(devices []string, options FileSystemOptions) error
func (*FileSystemLustre) Delete ¶
func (f *FileSystemLustre) Delete() error
func (*FileSystemLustre) GenerateRecoveryData ¶
func (f *FileSystemLustre) GenerateRecoveryData() map[string]string
func (*FileSystemLustre) IsMockable ¶
func (*FileSystemLustre) IsMockable() bool
func (*FileSystemLustre) IsType ¶
func (*FileSystemLustre) IsType(oem *FileSystemOem) bool
func (*FileSystemLustre) LoadRecoveryData ¶
func (f *FileSystemLustre) LoadRecoveryData(map[string]string)
func (*FileSystemLustre) MkfsDefault ¶
func (f *FileSystemLustre) MkfsDefault() string
func (*FileSystemLustre) Mount ¶
func (f *FileSystemLustre) Mount(mountpoint string) error
func (*FileSystemLustre) Name ¶
func (f *FileSystemLustre) Name() string
func (*FileSystemLustre) New ¶
func (*FileSystemLustre) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemLustre) Type ¶
func (*FileSystemLustre) Type() string
func (*FileSystemLustre) VgChangeActivateDefault ¶
func (f *FileSystemLustre) VgChangeActivateDefault() string
type FileSystemLvm ¶
type FileSystemLvm struct {
// Satisfy FileSystemApi interface.
FileSystem
CmdArgs FileSystemOemLvm
// contains filtered or unexported fields
}
func (*FileSystemLvm) Create ¶
func (f *FileSystemLvm) Create(devices []string, opts FileSystemOptions) error
func (*FileSystemLvm) Delete ¶
func (f *FileSystemLvm) Delete() error
func (*FileSystemLvm) GenerateRecoveryData ¶
func (f *FileSystemLvm) GenerateRecoveryData() map[string]string
func (*FileSystemLvm) IsMockable ¶
func (*FileSystemLvm) IsMockable() bool
func (*FileSystemLvm) IsType ¶
func (*FileSystemLvm) IsType(oem *FileSystemOem) bool
func (*FileSystemLvm) LoadRecoveryData ¶
func (f *FileSystemLvm) LoadRecoveryData(data map[string]string)
func (*FileSystemLvm) MkfsDefault ¶
func (f *FileSystemLvm) MkfsDefault() string
func (*FileSystemLvm) Mount ¶
func (f *FileSystemLvm) Mount(mountpoint string) error
func (*FileSystemLvm) Name ¶
func (f *FileSystemLvm) Name() string
func (*FileSystemLvm) New ¶
func (*FileSystemLvm) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemLvm) Type ¶
func (*FileSystemLvm) Type() string
func (*FileSystemLvm) VgChangeActivateDefault ¶
func (f *FileSystemLvm) VgChangeActivateDefault() string
type FileSystemOem ¶
type FileSystemOem struct {
Type string `json:"Type"`
Name string `json:"Name"`
Lustre FileSystemOemLustre `json:"Lustre,omitempty"`
Gfs2 FileSystemOemGfs2 `json:"Gfs2,omitempty"`
LvmCmd FileSystemOemLvm `json:"Lvm,omitempty"`
MkfsMount FileSystemOemMkfsMount `json:"MkfsMount,omitempty"`
ZfsCmd FileSystemOemZfs `json:"Zfs,omitempty"`
}
File System OEM defines the structure that is expected to be included inside a Redfish / Swordfish FileSystemV122FileSystem
func (*FileSystemOem) IsEmpty ¶
func (oem *FileSystemOem) IsEmpty() bool
func (*FileSystemOem) LoadDefaults ¶
func (oem *FileSystemOem) LoadDefaults(fs FileSystemApi)
type FileSystemOemGfs2 ¶
type FileSystemOemGfs2 struct {
ClusterName string `json:"ClusterName"`
}
type FileSystemOemLustre ¶
type FileSystemOemLvm ¶
type FileSystemOemLvm struct {
// The pvcreate commandline, minus the "pvcreate" command.
PvCreate string `json:"PvCreate,omitempty"`
// The vgcreate commandline, minus the "vgcreate" command.
VgCreate string `json:"VgCreate,omitempty"`
// The lvcreate commandline, minus the "lvcreate" command.
LvCreate string `json:"LvCreate,omitempty"`
// The vgchange commandline, minus the "vgchange" command.
VgChange FileSystemOemVgChange `json:"VgChange,omitempty"`
// The vgremove commandline, minus the "vgremove" command.
VgRemove string `json:"VgRemove,omitempty"`
// The lvremove commandline, minus the "lvremove" command
LvRemove string `json:"LvRemove,omitempty"`
}
type FileSystemOemMkfsMount ¶
type FileSystemOemVgChange ¶
type FileSystemOemVgChange struct {
// The vgchange commandline, minus the "vgchange" command
Activate string `json:"Activate,omitempty"`
// The vgchange commandline, minus the "vgchange" command
Deactivate string `json:"Deactivate,omitempty"`
// The vgchange commandline, minus the "vgchange" command
LockStart string `json:"Lockstart,omitempty"`
}
type FileSystemOemZfs ¶
type FileSystemOemZfs struct {
// The zpool create commandline, minus the "zpool create" command.
ZpoolCreate string `json:"ZpoolCreate,omitempty"`
}
type FileSystemOptions ¶
type FileSystemOptions = map[string]interface{}
type FileSystemRaw ¶
type FileSystemRaw struct {
FileSystemLvm
// contains filtered or unexported fields
}
func (*FileSystemRaw) Create ¶
func (f *FileSystemRaw) Create(devices []string, opts FileSystemOptions) error
func (*FileSystemRaw) IsType ¶
func (*FileSystemRaw) IsType(oem *FileSystemOem) bool
func (*FileSystemRaw) Mount ¶
func (f *FileSystemRaw) Mount(mountpoint string) error
func (*FileSystemRaw) New ¶
func (*FileSystemRaw) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemRaw) Type ¶
func (*FileSystemRaw) Type() string
type FileSystemXfs ¶
type FileSystemXfs struct {
FileSystemLvm
MkfsMount FileSystemOemMkfsMount
}
FileSystemXfs establishes an XFS file system on an underlying LVM logical volume.
func (*FileSystemXfs) Create ¶
func (f *FileSystemXfs) Create(devices []string, opts FileSystemOptions) (err error)
func (*FileSystemXfs) IsMockable ¶
func (*FileSystemXfs) IsMockable() bool
func (*FileSystemXfs) IsType ¶
func (*FileSystemXfs) IsType(oem *FileSystemOem) bool
func (*FileSystemXfs) MkfsDefault ¶
func (f *FileSystemXfs) MkfsDefault() string
func (*FileSystemXfs) Mount ¶
func (f *FileSystemXfs) Mount(mountpoint string) error
func (*FileSystemXfs) Name ¶
func (f *FileSystemXfs) Name() string
func (*FileSystemXfs) New ¶
func (*FileSystemXfs) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemXfs) Type ¶
func (*FileSystemXfs) Type() string
type FileSystemZfs ¶
type FileSystemZfs struct {
// Satisfy FileSystemApi interface.
FileSystem
}
func (*FileSystemZfs) Create ¶
func (f *FileSystemZfs) Create(devices []string, options FileSystemOptions) error
func (*FileSystemZfs) Delete ¶
func (f *FileSystemZfs) Delete() error
func (*FileSystemZfs) GenerateRecoveryData ¶
func (f *FileSystemZfs) GenerateRecoveryData() map[string]string
func (*FileSystemZfs) IsMockable ¶
func (*FileSystemZfs) IsMockable() bool
func (*FileSystemZfs) IsType ¶
func (*FileSystemZfs) IsType(oem *FileSystemOem) bool
func (*FileSystemZfs) LoadRecoveryData ¶
func (f *FileSystemZfs) LoadRecoveryData(map[string]string)
func (*FileSystemZfs) MkfsDefault ¶
func (f *FileSystemZfs) MkfsDefault() string
func (*FileSystemZfs) Mount ¶
func (f *FileSystemZfs) Mount(mountpoint string) error
func (*FileSystemZfs) Name ¶
func (f *FileSystemZfs) Name() string
func (*FileSystemZfs) New ¶
func (*FileSystemZfs) New(oem FileSystemOem) (FileSystemApi, error)
func (*FileSystemZfs) Type ¶
func (*FileSystemZfs) Type() string
func (*FileSystemZfs) Unmount ¶
func (f *FileSystemZfs) Unmount(mountpoint string) error
func (*FileSystemZfs) VgChangeActivateDefault ¶
func (f *FileSystemZfs) VgChangeActivateDefault() string
type LocalServerController ¶
type LocalServerController struct {
// contains filtered or unexported fields
}
func (*LocalServerController) Connected ¶
func (c *LocalServerController) Connected() bool
func (*LocalServerController) CreateFileSystem ¶
func (c *LocalServerController) CreateFileSystem(s *Storage, fs FileSystemApi, opts FileSystemOptions) error
func (*LocalServerController) Delete ¶
func (c *LocalServerController) Delete(s *Storage) error
func (*LocalServerController) DeleteFileSystem ¶
func (c *LocalServerController) DeleteFileSystem(s *Storage, fs FileSystemApi) error
func (*LocalServerController) Discover ¶
func (c *LocalServerController) Discover(s *Storage) error
func (*LocalServerController) GetServerInfo ¶
func (c *LocalServerController) GetServerInfo() ServerInfo
func (*LocalServerController) GetStatus ¶
func (c *LocalServerController) GetStatus(s *Storage) (StorageStatus, error)
func (*LocalServerController) MountFileSystem ¶
func (c *LocalServerController) MountFileSystem(s *Storage, fs FileSystemApi, mountPoint string) error
func (*LocalServerController) NewStorage ¶
func (c *LocalServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
func (*LocalServerController) UnmountFileSystem ¶
func (c *LocalServerController) UnmountFileSystem(s *Storage, fs FileSystemApi, mountPoint string) error
type MockServerController ¶
type MockServerController struct {
// contains filtered or unexported fields
}
func (*MockServerController) Connected ¶
func (c *MockServerController) Connected() bool
func (*MockServerController) CreateFileSystem ¶
func (*MockServerController) CreateFileSystem(s *Storage, fs FileSystemApi, opts FileSystemOptions) error
func (*MockServerController) Delete ¶
func (c *MockServerController) Delete(s *Storage) error
func (*MockServerController) DeleteFileSystem ¶
func (*MockServerController) DeleteFileSystem(s *Storage, fs FileSystemApi) error
func (*MockServerController) GetServerInfo ¶
func (m *MockServerController) GetServerInfo() ServerInfo
func (*MockServerController) GetStatus ¶
func (*MockServerController) GetStatus(s *Storage) (StorageStatus, error)
func (*MockServerController) MountFileSystem ¶
func (*MockServerController) MountFileSystem(s *Storage, fs FileSystemApi, mountpoint string) error
func (*MockServerController) NewStorage ¶
func (c *MockServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
func (*MockServerController) UnmountFileSystem ¶
func (*MockServerController) UnmountFileSystem(s *Storage, fs FileSystemApi, mountpoint string) error
type MockServerControllerProvider ¶
type MockServerControllerProvider struct{}
func (MockServerControllerProvider) NewServerController ¶
func (MockServerControllerProvider) NewServerController(ServerControllerOptions) ServerControllerApi
type RemoteServerController ¶
type RemoteServerController struct{}
Remote Server Controller defines a Server Controller API for a connected server that is not local to the running process. This contains many "do nothing" methods as management of storage, file systems, and related content is done "off-rabbit".
func (*RemoteServerController) Connected ¶
func (c *RemoteServerController) Connected() bool
func (*RemoteServerController) CreateFileSystem ¶
func (c *RemoteServerController) CreateFileSystem(*Storage, FileSystemApi, FileSystemOptions) error
func (*RemoteServerController) Delete ¶
func (c *RemoteServerController) Delete(s *Storage) error
func (*RemoteServerController) DeleteFileSystem ¶
func (r *RemoteServerController) DeleteFileSystem(*Storage, FileSystemApi) error
func (*RemoteServerController) GetServerInfo ¶
func (c *RemoteServerController) GetServerInfo() ServerInfo
func (*RemoteServerController) GetStatus ¶
func (c *RemoteServerController) GetStatus(s *Storage) (StorageStatus, error)
func (*RemoteServerController) MountFileSystem ¶
func (r *RemoteServerController) MountFileSystem(*Storage, FileSystemApi, string) error
func (*RemoteServerController) NewStorage ¶
func (c *RemoteServerController) NewStorage(pid uuid.UUID, expectedNamespaces []StorageNamespace) *Storage
func (*RemoteServerController) UnmountFileSystem ¶
func (r *RemoteServerController) UnmountFileSystem(*Storage, FileSystemApi, string) error
type ServerControllerApi ¶
type ServerControllerApi interface {
Connected() bool
GetServerInfo() ServerInfo
// Allocate a new Storage object to be managed by this controller
NewStorage(uuid.UUID, []StorageNamespace) *Storage
Delete(*Storage) error
// Retrieve the status of the provided Storage object from the controller
GetStatus(*Storage) (StorageStatus, error)
CreateFileSystem(*Storage, FileSystemApi, FileSystemOptions) error
DeleteFileSystem(*Storage, FileSystemApi) error
MountFileSystem(*Storage, FileSystemApi, string) error
UnmountFileSystem(*Storage, FileSystemApi, string) error
}
Server Controller API defines the interface for interacting with and controlling a Server in the Rabbit NNF topology. That is - A remote initiator endpoint or the local NNF server.
func NewDisabledServerController ¶
func NewDisabledServerController() ServerControllerApi
func NewMockServerController ¶
func NewMockServerController() ServerControllerApi
func NewRemoteServerController ¶
func NewRemoteServerController(opts ServerControllerOptions) ServerControllerApi
type ServerControllerOptions ¶
type ServerControllerProvider ¶
type ServerControllerProvider interface {
NewServerController(ServerControllerOptions) ServerControllerApi
}
type ServerInfo ¶
type ServerInfo struct {
LNetNids []string
}
type Storage ¶
type Storage struct {
// ID is the Pool ID identified by recovering the NVMe Namespace Metadata
// for this particular namespace. The Pool ID is common for all namespaces
// which are part of that storage pool.
Id uuid.UUID
// contains filtered or unexported fields
}
Storage represents a unique collection of Server Storage Volumes that are identified by a shared Storage Pool ID.
func (*Storage) CreateFileSystem ¶
func (s *Storage) CreateFileSystem(fs FileSystemApi, opts FileSystemOptions) error
func (*Storage) DeleteFileSystem ¶
func (s *Storage) DeleteFileSystem(fs FileSystemApi) error
func (*Storage) GetStatus ¶
func (s *Storage) GetStatus() (StorageStatus, error)
func (*Storage) MountFileSystem ¶
func (s *Storage) MountFileSystem(fs FileSystemApi, mountPoint string) error
func (*Storage) UnmountFileSystem ¶
func (s *Storage) UnmountFileSystem(fs FileSystemApi, mountPoint string) error
type StorageNamespace ¶
type StorageNamespace struct {
// The drive serial number
SerialNumber string `json:"SerialNumber"`
// The NVMe Namespace Identifer
Id nvme.NamespaceIdentifier `json:"Id"`
// contains filtered or unexported fields
}
Storage Namespace represents an NVMe Namespace present on the host.
type StoragePoolOem ¶
type StoragePoolOem struct {
Namespaces []StorageNamespace `json:"Namespaces"`
}
type StorageStatus ¶
type StorageStatus string
func (StorageStatus) State ¶
func (s StorageStatus) State() sf.ResourceState