Documentation ¶
Overview ¶
Package rfputilities ...
Package rfputilities ...
Index ¶
- Variables
- func GetPlainText(password []byte) ([]byte, error)
- func TrackConfigFileChanges(configFilePath string)
- type Identifier
- type RedfishClient
- func (client *RedfishClient) AuthWithDevice(device *RedfishDevice) error
- func (client *RedfishClient) BasicAuthWithDevice(device *RedfishDevice, requestURI string) (*http.Response, error)
- func (client *RedfishClient) DeleteSubscriptionDetail(device *RedfishDevice) (*http.Response, error)
- func (client *RedfishClient) DeviceCall(device *RedfishDevice, url, method string) (*http.Response, error)
- func (client *RedfishClient) Get(device *RedfishDevice, requestURI string) (*http.Response, error)
- func (client *RedfishClient) GetRootService(device *RedfishDevice) error
- func (client *RedfishClient) GetSubscriptionDetail(device *RedfishDevice) (*http.Response, error)
- func (client *RedfishClient) GetWithBasicAuth(device *RedfishDevice, requestURI string) (*http.Response, error)
- func (client *RedfishClient) ResetComputerSystem(device *RedfishDevice, uri string) (*http.Response, error)
- func (client *RedfishClient) SetDefaultBootOrder(device *RedfishDevice, uri string) (*http.Response, error)
- func (client *RedfishClient) SubscribeForEvents(device *RedfishDevice) (*http.Response, error)
- type RedfishDevice
- type RedfishDeviceCollection
- type UnreachableRedfishDevice
Constants ¶
This section is empty.
Variables ¶
var PluginStartTime time.Time
PluginStartTime hold the time from which plugin started
var Status rfpresponse.Status
Status holds the Status of plugin it will be intizaied during startup time
Functions ¶
func TrackConfigFileChanges ¶
func TrackConfigFileChanges(configFilePath string)
TrackConfigFileChanges monitors the odim config changes using fsnotfiy
Types ¶
type RedfishClient ¶
type RedfishClient struct {
// contains filtered or unexported fields
}
RedfishClient struct definition
func GetRedfishClient ¶
func GetRedfishClient() (*RedfishClient, error)
GetRedfishClient : Returns a new RedfishClient with insecure flag set.
func (*RedfishClient) AuthWithDevice ¶
func (client *RedfishClient) AuthWithDevice(device *RedfishDevice) error
AuthWithDevice : Performs authentication with the given device and saves the token
func (*RedfishClient) BasicAuthWithDevice ¶
func (client *RedfishClient) BasicAuthWithDevice(device *RedfishDevice, requestURI string) (*http.Response, error)
BasicAuthWithDevice : Performs authentication with the given device and saves the token
func (*RedfishClient) DeleteSubscriptionDetail ¶
func (client *RedfishClient) DeleteSubscriptionDetail(device *RedfishDevice) (*http.Response, error)
DeleteSubscriptionDetail will accepts device struct and it will delete the subscription detail
func (*RedfishClient) DeviceCall ¶
func (client *RedfishClient) DeviceCall(device *RedfishDevice, url, method string) (*http.Response, error)
DeviceCall will call device with the given device details on the url given TODO: use same method to all other calls in this file
func (*RedfishClient) Get ¶
func (client *RedfishClient) Get(device *RedfishDevice, requestURI string) (*http.Response, error)
Get : Executes the REST call with the specified host and URI, then returns the response object.
func (*RedfishClient) GetRootService ¶
func (client *RedfishClient) GetRootService(device *RedfishDevice) error
GetRootService : Retrieves the ServiceRoot endpoint for the device and saves the return in the device object
func (*RedfishClient) GetSubscriptionDetail ¶
func (client *RedfishClient) GetSubscriptionDetail(device *RedfishDevice) (*http.Response, error)
GetSubscriptionDetail will accepts device struct and it will get the subscription detail
func (*RedfishClient) GetWithBasicAuth ¶
func (client *RedfishClient) GetWithBasicAuth(device *RedfishDevice, requestURI string) (*http.Response, error)
GetWithBasicAuth : Performs authentication with the given device and saves the token
func (*RedfishClient) ResetComputerSystem ¶
func (client *RedfishClient) ResetComputerSystem(device *RedfishDevice, uri string) (*http.Response, error)
ResetComputerSystem :Reset the computer system with given ResetType
func (*RedfishClient) SetDefaultBootOrder ¶
func (client *RedfishClient) SetDefaultBootOrder(device *RedfishDevice, uri string) (*http.Response, error)
SetDefaultBootOrder : sets default boot order
func (*RedfishClient) SubscribeForEvents ¶
func (client *RedfishClient) SubscribeForEvents(device *RedfishDevice) (*http.Response, error)
SubscribeForEvents :Subscribes for events with Basic Auth
type RedfishDevice ¶
type RedfishDevice struct { Host string `json:"hostAddress"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Token string `json:"token,omitempty"` Tags []string `json:"Tags"` RootNode *dmtf.ServiceRoot `json:"rootNode,omitempty"` ComputerSystems []*Identifier PostBody []byte `json:"PostBody,omitempty"` Location string `json:"Location"` }
RedfishDevice struct definition
func (RedfishDevice) MarshalJSON ¶
func (rfd RedfishDevice) MarshalJSON() ([]byte, error)
MarshalJSON Custom marshalling code used to prevent the display of password or authtoken
type RedfishDeviceCollection ¶
type RedfishDeviceCollection struct { RedfishDevices []*RedfishDevice `json:"targetHosts"` UnreachableRedfishDevices []UnreachableRedfishDevice `json:"failedHosts,omitempty"` }
RedfishDeviceCollection struct definition
type UnreachableRedfishDevice ¶
type UnreachableRedfishDevice struct { Host string `json:"hostAddress"` ErrorMessage string `json:"errorMessage"` }
UnreachableRedfishDevice struct definition