Documentation
¶
Index ¶
- Variables
- func StorageFormatRequest(mc Control, parms interface{}, ch chan ClientResult)
- type AccessControlList
- type Addresses
- type ClientBioResult
- type ClientResult
- type ClientSmdResult
- type Configuration
- type Connect
- type Control
- type ControllerFactory
- type External
- type LeaderQueryReq
- type LeaderQueryResp
- type ListPoolsReq
- type ListPoolsResp
- type NetworkScanResult
- type NetworkScanResultMap
- type NvmeScanResult
- type NvmeScanResults
- type PoolCreateReq
- type PoolCreateResp
- type PoolDeleteACLReq
- type PoolDeleteACLResp
- type PoolDestroyReq
- type PoolDiscovery
- type PoolGetACLReq
- type PoolGetACLResp
- type PoolOverwriteACLReq
- type PoolOverwriteACLResp
- type PoolUpdateACLReq
- type PoolUpdateACLResp
- type ProviderListResult
- type ResultMap
- type ResultQueryMap
- type ResultSmdMap
- type ScmScanResult
- type ScmScanResults
- type StorageFormatReq
- type StorageFormatResult
- type StorageFormatResults
- type StorageScanReq
- type StorageScanResp
Constants ¶
This section is empty.
Variables ¶
var ( MockServers = Addresses{"1.2.3.4:10000", "1.2.3.5:10001"} MockCtrlrs = NvmeControllers{MockNvmeController()} MockSuccessState = ctlpb.ResponseState{Status: ctlpb.ResponseStatus_CTL_SUCCESS} MockState = ctlpb.ResponseState{ Status: ctlpb.ResponseStatus_CTL_ERR_APP, Error: "example application error", } MockCtrlrResults = NvmeControllerResults{ &ctlpb.NvmeControllerResult{ Pciaddr: "0000:81:00.0", State: &MockState, }, } MockScmModules = ScmModules{MockScmModule()} MockModuleResults = ScmModuleResults{ &ctlpb.ScmModuleResult{ Loc: &ctlpb.ScmModule_Location{}, State: &MockState, }, } MockScmNamespaces = ScmNamespaces{MockPmemDevice()} MockMounts = ScmMounts{MockScmMount()} MockMountResults = ScmMountResults{ &ctlpb.ScmMountResult{ Mntpoint: "/mnt/daos", State: &MockState, }, } MockACL = &mockACLResult{ acl: []string{ "A::OWNER@:rw", "A::GROUP@:r", }, } MockPoolList = []*mgmtpb.ListPoolsResp_Pool{ {Uuid: "12345678-1234-1234-1234-123456789abc", Svcreps: []uint32{1, 2}}, {Uuid: "12345678-1234-1234-1234-cba987654321", Svcreps: []uint32{0}}, } MockErr = errors.New("unknown failure") )
Functions ¶
func StorageFormatRequest ¶
func StorageFormatRequest(mc Control, parms interface{}, ch chan ClientResult)
StorageFormatRequest attempts to format nonvolatile storage devices on a remote server over gRPC.
Calls control StorageFormat routine which activates StorageFormat service rpc and returns an open stream handle. Receive on stream and send ClientResult over channel for each.
Types ¶
type AccessControlList ¶
type AccessControlList struct {
Entries []string // Access Control Entries in short string format
}
AccessControlList is a structure for the access control list.
func (*AccessControlList) Empty ¶
func (acl *AccessControlList) Empty() bool
Empty checks whether there are any entries in the AccessControlList
func (*AccessControlList) String ¶
func (acl *AccessControlList) String() string
String converts the AccessControlList to a human-readable string.
type Addresses ¶
type Addresses []string
Addresses is an alias for a slice of <ipv4/hostname>:<port> addresses.
type ClientBioResult ¶
type ClientBioResult struct {
Address string
Stats *mgmtpb.BioHealthResp
Err error
}
ClientBioResult is a container for output of BIO health query client requests.
func (ClientBioResult) String ¶
func (cr ClientBioResult) String() string
type ClientResult ¶
ClientResult is a container for output of any type of client request.
func (ClientResult) String ¶
func (cr ClientResult) String() string
type ClientSmdResult ¶
type ClientSmdResult struct {
Address string
Devs *mgmtpb.SmdDevResp
Pools *mgmtpb.SmdPoolResp
Err error
}
ClientSmdResult is a container for output of SMD dev list query client requests.
func (ClientSmdResult) String ¶
func (cr ClientSmdResult) String() string
type Configuration ¶
type Configuration struct {
SystemName string `yaml:"name"`
AccessPoints []string `yaml:"access_points"`
Port int `yaml:"port"`
HostList []string `yaml:"hostlist"`
RuntimeDir string `yaml:"runtime_dir"`
HostFile string `yaml:"host_file"`
LogFile string `yaml:"log_file"`
LogFileFormat string `yaml:"log_file_format"`
Path string
TransportConfig *security.TransportConfig `yaml:"transport_config"`
Ext External
}
Configuration contains all known configuration variables available to the client
func GetConfig ¶
func GetConfig(log logging.Logger, ConfigPath string) (*Configuration, error)
GetConfig loads a configuration file from the path given, or from the default location if none is provided. It returns a populated Configuration struct based upon the default values and any config file overrides.
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration creates a new instance of the Configuration struct populated with defaults and default external interface.
func (*Configuration) LoadConfig ¶
func (c *Configuration) LoadConfig() error
LoadConfig reads the configuration file specified by Configuration.Path and parses it. Parsed values override any default values.
type Connect ¶
type Connect interface {
BioHealthQuery(*mgmtpb.BioHealthReq) ResultQueryMap
ClearConns() ResultMap
ConnectClients(Addresses) ResultMap
GetActiveConns(ResultMap) ResultMap
KillRank(rank uint32) ResultMap
NetworkListProviders() ResultMap
NetworkScanDevices(searchProvider string) NetworkScanResultMap
PoolCreate(*PoolCreateReq) (*PoolCreateResp, error)
PoolDestroy(*PoolDestroyReq) error
PoolGetACL(PoolGetACLReq) (*PoolGetACLResp, error)
PoolOverwriteACL(PoolOverwriteACLReq) (*PoolOverwriteACLResp, error)
PoolUpdateACL(PoolUpdateACLReq) (*PoolUpdateACLResp, error)
PoolDeleteACL(PoolDeleteACLReq) (*PoolDeleteACLResp, error)
SetTransportConfig(*security.TransportConfig)
SmdListDevs(*mgmtpb.SmdDevReq) ResultSmdMap
SmdListPools(*mgmtpb.SmdPoolReq) ResultSmdMap
StorageScan(*StorageScanReq) *StorageScanResp
StorageFormat(reformat bool) StorageFormatResults
StoragePrepare(*ctlpb.StoragePrepareReq) ResultMap
SystemMemberQuery() (common.SystemMembers, error)
SystemStop() (common.SystemMemberResults, error)
LeaderQuery(LeaderQueryReq) (*LeaderQueryResp, error)
ListPools(ListPoolsReq) (*ListPoolsResp, error)
}
Connect is an external interface providing functionality across multiple connected clients (controllers).
func NewConnect ¶
NewConnect is a factory for Connect interface to operate over multiple clients.
type Control ¶
type Control interface {
// contains filtered or unexported methods
}
Control interface provides connection handling capabilities.
type ControllerFactory ¶
type ControllerFactory interface {
// contains filtered or unexported methods
}
ControllerFactory is an interface providing capability to connect clients.
type LeaderQueryReq ¶ added in v0.8.0
type LeaderQueryReq struct {
System string
}
LeaderQueryReq contains the inputs for the list pools command.
type LeaderQueryResp ¶ added in v0.8.0
LeaderQueryResp contains the status of the request and, if successful, the list of pools in the system.
type ListPoolsReq ¶ added in v0.8.0
type ListPoolsReq struct {
SysName string
}
ListPoolsReq contains the inputs for the list pools command.
type ListPoolsResp ¶ added in v0.8.0
type ListPoolsResp struct {
Status int32
Pools []*PoolDiscovery
}
ListPoolsResp contains the status of the request and, if successful, the list of pools in the system.
type NetworkScanResult ¶
type NetworkScanResult struct {
// contains filtered or unexported fields
}
func (NetworkScanResult) String ¶
func (nsr NetworkScanResult) String() string
type NetworkScanResultMap ¶
type NetworkScanResultMap map[string][]NetworkScanResult
func (NetworkScanResultMap) String ¶
func (nsrm NetworkScanResultMap) String() string
type NvmeScanResult ¶
type NvmeScanResult struct {
Ctrlrs proto.NvmeControllers
Err error
}
NvmeScanResult represents the result of scanning for SCM modules installed on a storage node.
func (*NvmeScanResult) String ¶
func (result *NvmeScanResult) String() string
func (*NvmeScanResult) StringHealthStats ¶
func (result *NvmeScanResult) StringHealthStats() string
func (*NvmeScanResult) Summary ¶
func (result *NvmeScanResult) Summary() (out string)
type NvmeScanResults ¶
type NvmeScanResults map[string]*NvmeScanResult
NvmeScanResults maps NvmeScanResult structs to the addresses of remote servers identified by an address string.
type PoolCreateReq ¶
type PoolCreateReq struct {
ScmBytes uint64
NvmeBytes uint64
RankList []uint32
NumSvcReps uint32
Sys string
Usr string
Grp string
ACL *AccessControlList
UUID string
}
PoolCreateReq struct contains request
type PoolCreateResp ¶
PoolCreateResp struct contains response
type PoolDeleteACLReq ¶
type PoolDeleteACLReq struct {
UUID string // UUID of the pool
Principal string // Principal whose entry will be removed
}
PoolDeleteACLReq contains the input parameters for PoolDeleteACL.
type PoolDeleteACLResp ¶
type PoolDeleteACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolDeleteACLResp returns the updated ACL for the pool.
type PoolDestroyReq ¶
PoolDestroyReq struct contains request
type PoolDiscovery ¶ added in v0.8.0
type PoolDiscovery struct {
UUID string // Unique identifier
SvcReplicas []uint32 // Ranks of pool service replicas
}
PoolDiscovery represents the basic discovery information for a pool.
type PoolGetACLReq ¶
type PoolGetACLReq struct {
UUID string // pool UUID
}
PoolGetACLReq contains the input parameters for PoolGetACL
type PoolGetACLResp ¶
type PoolGetACLResp struct {
ACL *AccessControlList
}
PoolGetACLResp contains the output results for PoolGetACL
type PoolOverwriteACLReq ¶
type PoolOverwriteACLReq struct {
UUID string // pool UUID
ACL *AccessControlList // new ACL for the pool
}
PoolOverwriteACLReq contains the input parameters for PoolOverwriteACL
type PoolOverwriteACLResp ¶
type PoolOverwriteACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolOverwriteACLResp returns the updated ACL for the pool
type PoolUpdateACLReq ¶
type PoolUpdateACLReq struct {
UUID string // pool UUID
ACL *AccessControlList // ACL entries to add to the pool
}
PoolUpdateACLReq contains the input parameters for PoolUpdateACL
type PoolUpdateACLResp ¶
type PoolUpdateACLResp struct {
ACL *AccessControlList // actual ACL of the pool
}
PoolUpdateACLResp returns the updated ACL for the pool
type ProviderListResult ¶
type ProviderListResult struct {
// contains filtered or unexported fields
}
type ResultMap ¶
type ResultMap map[string]ClientResult
ResultMap map client addresses to method call ClientResults
type ResultQueryMap ¶
type ResultQueryMap map[string]ClientBioResult
func (ResultQueryMap) String ¶
func (rm ResultQueryMap) String() string
type ResultSmdMap ¶
type ResultSmdMap map[string]ClientSmdResult
func (ResultSmdMap) String ¶
func (rm ResultSmdMap) String() string
type ScmScanResult ¶
type ScmScanResult struct {
Modules storage.ScmModules
Namespaces storage.ScmNamespaces
Err error
}
ScmScanResult represents the result of scanning for SCM modules installed on a storage node and SCM namespaces.
func (*ScmScanResult) String ¶
func (result *ScmScanResult) String() string
func (*ScmScanResult) Summary ¶
func (result *ScmScanResult) Summary() (out string)
type ScmScanResults ¶
type ScmScanResults map[string]*ScmScanResult
ScmScanMap maps ScmModuleScanResult structs to the addresses of remote servers identified by an address string.
type StorageFormatReq ¶ added in v0.8.0
type StorageFormatReq struct {
Reformat bool
}
StorageFormatReq encapsulated subsystem format parameters.
type StorageFormatResult ¶
type StorageFormatResult struct {
Nvme proto.NvmeControllerResults
Scm proto.ScmMountResults
Err error
}
func (*StorageFormatResult) HasErrors ¶ added in v0.8.0
func (sfr *StorageFormatResult) HasErrors() bool
type StorageFormatResults ¶ added in v0.8.0
type StorageFormatResults map[string]StorageFormatResult
StorageFormatResults stores results of format operations on NVMe controllers and SCM mountpoints.
func (StorageFormatResults) Keys ¶ added in v0.8.0
func (sfr StorageFormatResults) Keys() (keys []string)
type StorageScanReq ¶
type StorageScanReq struct{}
StorageScanReq encapsulated subsystem scan parameters.
type StorageScanResp ¶
type StorageScanResp struct {
Servers []string
Nvme NvmeScanResults
Scm ScmScanResults
}
StorageScanResp encapsulated subsystem results.
func MockScanResp ¶
func MockScanResp(cs NvmeControllers, ms ScmModules, nss ScmNamespaces, addrs Addresses) *StorageScanResp
MockScanResp mocks scan results from scm and nvme for multiple servers. Each result indicates success or failure through presence of Err.
func (*StorageScanResp) StringHealthStats ¶
func (ssr *StorageScanResp) StringHealthStats() string