Documentation ¶
Overview ¶
Package smodel ....
Index ¶
- Variables
- func AddSystemResetInfo(ctx context.Context, systemID, resetType string) *errors.Error
- func DeleteVolume(ctx context.Context, key string) *errors.Error
- func Find(table, key string, r interface{}) *errors.Error
- func FindAll(table, key string) ([][]byte, error)
- func GenericSave(ctx context.Context, body []byte, table string, key string) error
- func GetAllKeysFromTable(table string) ([]string, error)
- func GetRange(index string, min, max int, regexFlag bool) ([]string, error)
- func GetResource(ctx context.Context, Table, key string) (string, *errors.Error)
- func GetStorageList(index, condition string, match float64, regexFlag bool) ([]string, error)
- func GetString(index, match string, regexFlag bool) ([]string, error)
- func GetSystemByUUID(ctx context.Context, systemUUID string) (string, *errors.Error)
- func GetSystemResetInfo(ctx context.Context, systemURI string) (map[string]string, *errors.Error)
- type Fabric
- type Links
- type OdataIDLink
- type Plugin
- type Target
- type Volume
Constants ¶
This section is empty.
Variables ¶
var ( // GetDBConnectionFunc function pointer for the common.GetDBConnection GetDBConnectionFunc = common.GetDBConnection // JSONUnmarshalFunc function pointer for the json.Unmarshal JSONUnmarshalFunc = json.Unmarshal )
var ( // GetPluginDataFunc function pointer for the GetPluginData GetPluginDataFunc = GetPluginData )
Functions ¶
func AddSystemResetInfo ¶
AddSystemResetInfo connects to the persistencemgr and Add the system reset info to db
Inputs:
1.systemURI: computer system uri for which system operation is maintained 2.resetType : reset type which is performed
func DeleteVolume ¶
DeleteVolume will delete the volume from InMemory
func Find ¶
Find fetches a resource from database using table and key and store the data to an interface
func GenericSave ¶
GenericSave will save any resource data into the database
func GetAllKeysFromTable ¶
GetAllKeysFromTable fetches all keys in a given table
func GetRange ¶
GetRange is used to retrive index values of type string
Inputs:
1. index is the index name to search with 2. min is the minimum value passed 3. max is the max value passed
func GetResource ¶
GetResource fetches a resource from database using table and key
func GetStorageList ¶
GetStorageList is used to storage list of capacity
1.index name to search with 2. condition is the value for condition operation 3. match is the search for list float type
func GetString ¶
GetString is used to retrive index values of type string
Inputs:
1. index is the index name to search with 2. match is the value to match with
func GetSystemByUUID ¶
GetSystemByUUID fetches computer system details by UUID from database
Types ¶
type Fabric ¶
type Fabric struct {
PluginID string
}
Fabric is the model to collect fabric plugin id from DB
type Links ¶
type Links struct { Drives []OdataIDLink `json:"Drives"` DedicatedSpareDrives []OdataIDLink `json:"DedicatedSpareDrives,omitempty"` }
Links contains Drives resoruces info
type OdataIDLink ¶
type OdataIDLink struct {
OdataID string `json:"@odata.id"`
}
OdataIDLink contains link to a resource
type Plugin ¶
type Plugin struct { IP string Port string Username string Password []byte ID string PluginType string PreferredAuthType string ManagerUUID string }
Plugin is the model for plugin information
func GetFabricManagers ¶
GetFabricManagers fetches all the fabrics details from DB
type Target ¶
type Target struct { ManagerAddress string `json:"ManagerAddress"` Password []byte `json:"Password"` UserName string `json:"UserName"` PostBody []byte `json:"PostBody"` DeviceUUID string `json:"DeviceUUID"` PluginID string `json:"PluginID"` }
Target is for sending the requst to south bound/plugin
type Volume ¶
type Volume struct { RAIDType string `json:"RAIDType"` Links *Links `json:"Links"` OperationApplyTime string `json:"@Redfish.OperationApplyTime"` DisplayName string `json:"DisplayName,omitempty"` WriteCachePolicy string `json:"WriteCachePolicy,omitempty"` ReadCachePolicy string `json:"ReadCachePolicy,omitempty"` IOPerfModeEnabled bool `json:"IOPerfModeEnabled,omitempty"` }
Volume is for sending a volume's request to south bound