Documentation ¶
Overview ¶
Package systems ...
Package systems ...
Package systems ...
Package systems ...
Package systems ...
Index ¶
- Variables
- func GetMembers(ctx context.Context, allowed map[string]map[string]bool, expression []string, ...) ([]dmtf.Link, response.RPC, error)
- func GetSystemsCollection(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
- func LogicalOperation(interm [][]dmtf.Link, lo string) []dmtf.Link
- func SearchAndFilter(ctx context.Context, paramStr []string, resp response.RPC) (response.RPC, error)
- func UpdateTaskData(ctx context.Context, taskData common.TaskData) error
- type BiosSetting
- type Boot
- type BootOrderSettings
- type DB
- type ExternalInterface
- type PluginContact
- func (p *PluginContact) ChangeBiosSettings(ctx context.Context, req *systemsproto.BiosSettingsRequest) response.RPC
- func (p *PluginContact) ChangeBootOrderSettings(ctx context.Context, req *systemsproto.BootOrderSettingsRequest) response.RPC
- func (p *PluginContact) ComputerSystemReset(ctx context.Context, req *systemsproto.ComputerSystemResetRequest, ...) response.RPC
- func (p *PluginContact) GetSystemResource(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
- func (p *PluginContact) GetSystems(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
- func (p *PluginContact) SetDefaultBootOrder(ctx context.Context, systemID string) response.RPC
- type ResetComputerSystem
Constants ¶
This section is empty.
Variables ¶
var ( // GetSystemResetInfoFunc function pointer for the smodel.GetSystemResetInfo GetSystemResetInfoFunc = smodel.GetSystemResetInfo // GetResourceInfoFromDeviceFunc function pointer for the scommon.GetResourceInfoFromDevice GetResourceInfoFromDeviceFunc = scommon.GetResourceInfoFromDevice // GetAllKeysFromTableFunc function pointer for the smodel.GetAllKeysFromTable GetAllKeysFromTableFunc = smodel.GetAllKeysFromTable // GetDeviceLoadInfoFunc function pointer for the getDeviceLoadInfo GetDeviceLoadInfoFunc = getDeviceLoadInfo // GetStringFunc function pointer for the smodel.GetString GetStringFunc = smodel.GetString )
var ( // StringContain function pointer for the strings.Contains StringContain = strings.Contains // RequestParamsCaseValidatorFunc function pointer for the common.RequestParamsCaseValidator RequestParamsCaseValidatorFunc = common.RequestParamsCaseValidator // StringsEqualFold function pointer for the strings.EqualFold StringsEqualFold = strings.EqualFold // ContactPluginFunc function pointer for the scommon.ContactPlugin ContactPluginFunc = scommon.ContactPlugin // JSONUnmarshalFunc function pointer for the json.Unmarshal JSONUnmarshalFunc = json.Unmarshal // StringTrimSpace function pointer for the strings.TrimSpace StringTrimSpace = strings.TrimSpace )
var ( // JSONUnMarshal function pointer for the json.Unmarshal JSONUnMarshal = json.Unmarshal )
Functions ¶
func GetMembers ¶
func GetMembers(ctx context.Context, allowed map[string]map[string]bool, expression []string, resp response.RPC) ([]dmtf.Link, response.RPC, error)
GetMembers will fetch the resource members based on the filter expression
func GetSystemsCollection ¶
func GetSystemsCollection(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
GetSystemsCollection is to fetch all the Systems uri's and retruns with created collection of systems data from odimra
func LogicalOperation ¶
LogicalOperation will take slice of slices of member collection and logical operation to perform return 1 slice of member collection with logical operation performed on them
Types ¶
type BiosSetting ¶
type BiosSetting struct { OdataContext string `json:"@odata.context"` OdataID string `json:"@odata.id"` Odatatype string `json:"@odata.type"` ID string `json:"Id"` Name string `json:"Name"` AttributeRegistry string `json:"AttributeRegistry"` Attributes interface{} `json:"Attributes"` }
BiosSetting structure for checking request body case
type Boot ¶
type Boot struct { BootOrder []string `json:"BootOrder"` BootSourceOverrideEnabled string `json:"BootSourceOverrideEnabled"` BootSourceOverrideMode string `json:"BootSourceOverrideMode"` BootSourceOverrideTarget string `json:"BootSourceOverrideTarget"` UefiTargetBootSourceOverride string `json:"UefiTargetBootSourceOverride"` }
Boot structure for checking request body case in BootOrderSettings
type BootOrderSettings ¶
type BootOrderSettings struct {
Boot Boot `json:"Boot"`
}
BootOrderSettings structure for checking request body case
type DB ¶
type DB struct { GetResource func(context.Context, string, string) (string, *errors.Error) DeleteVolume func(context.Context, string) *errors.Error AddSystemResetInfo func(context.Context, string, string) *errors.Error GetPluginData func(string) (smodel.Plugin, *errors.Error) GetTarget func(string) (*smodel.Target, *errors.Error) }
DB struct to inject the contact DB function into the handlers
type ExternalInterface ¶
type ExternalInterface struct { ContactClient func(context.Context, string, string, string, string, interface{}, map[string]string) (*http.Response, error) DevicePassword func([]byte) ([]byte, error) DB DB GetPluginStatus func(context.Context, smodel.Plugin) bool }
ExternalInterface holds all the external connections managers package functions uses
func GetExternalInterface ¶
func GetExternalInterface() *ExternalInterface
GetExternalInterface retrieves all the external connections managers package functions uses
func (*ExternalInterface) CreateVolume ¶
func (e *ExternalInterface) CreateVolume(ctx context.Context, req *systemsproto.VolumeRequest) response.RPC
CreateVolume defines the logic for creating a volume under storage
func (*ExternalInterface) DeleteVolume ¶
func (e *ExternalInterface) DeleteVolume(ctx context.Context, req *systemsproto.VolumeRequest) response.RPC
DeleteVolume defines the logic for deleting a volume under storage
type PluginContact ¶
type PluginContact struct { ContactClient func(context.Context, string, string, string, string, interface{}, map[string]string) (*http.Response, error) DevicePassword func([]byte) ([]byte, error) GetPluginStatus func(context.Context, smodel.Plugin) bool UpdateTask func(context.Context, common.TaskData) error }
PluginContact struct to inject the pmb client function into the handlers
func (*PluginContact) ChangeBiosSettings ¶
func (p *PluginContact) ChangeBiosSettings(ctx context.Context, req *systemsproto.BiosSettingsRequest) response.RPC
ChangeBiosSettings defines the logic for change bios settings
func (*PluginContact) ChangeBootOrderSettings ¶
func (p *PluginContact) ChangeBootOrderSettings(ctx context.Context, req *systemsproto.BootOrderSettingsRequest) response.RPC
ChangeBootOrderSettings defines the logic for change boot order settings
func (*PluginContact) ComputerSystemReset ¶
func (p *PluginContact) ComputerSystemReset(ctx context.Context, req *systemsproto.ComputerSystemResetRequest, taskID, sessionUserName string) response.RPC
ComputerSystemReset performs a reset action on the requeseted computer system with the specified ResetType
func (*PluginContact) GetSystemResource ¶
func (p *PluginContact) GetSystemResource(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
GetSystemResource is used to fetch resource data. The function is supposed to be used as part of RPC For getting system resource information, parameters need to be passed GetSystemsRequest . GetSystemsRequest holds the Uuid,Url and Resourceid , Url will be parsed from that search key will created There will be two return values for the fuction. One is the RPC response, which contains the status code, status message, headers and body and the second value is error.
func (*PluginContact) GetSystems ¶
func (p *PluginContact) GetSystems(ctx context.Context, req *systemsproto.GetSystemsRequest) response.RPC
GetSystems is used to fetch resource data. The function is supposed to be used as part of RPC For getting system resource information, parameters need to be passed GetSystemsRequest . GetSystemsRequest holds the Uuid,Url, Url will be parsed from that search key will created There will be two return values for the function. One is the RPC response, which contains the status code, status message, headers and body and the second value is error.
func (*PluginContact) SetDefaultBootOrder ¶
SetDefaultBootOrder defines the logic for setting the boot order to the default
type ResetComputerSystem ¶
type ResetComputerSystem struct {
ResetType string `json:"ResetType"`
}
ResetComputerSystem structure for checking request body case