Documentation ¶
Index ¶
- Constants
- func Int2str(i int) string
- func MountVirtualCdrom(ctx context.Context, api IRedfishDriver, cdromUrl string, boot bool) error
- func RegisterApiFactory(f IRedfishDriverFactory)
- func RegisterDefaultApiFactory(f IRedfishDriverFactory)
- func SortEvents(el []SEvent)
- func UmountVirtualCdrom(ctx context.Context, api IRedfishDriver) error
- type IRedfishDriver
- type IRedfishDriverFactory
- type SBaseRedfishClient
- func (r *SBaseRedfishClient) BmcReset(ctx context.Context) error
- func (r *SBaseRedfishClient) ClearLogs(ctx context.Context, urlPath string, subsys string, index int) error
- func (r *SBaseRedfishClient) ClearManagerLogs(ctx context.Context) error
- func (r *SBaseRedfishClient) ClearSystemLogs(ctx context.Context) error
- func (r *SBaseRedfishClient) Delete(ctx context.Context, path string) (http.Header, jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) Get(ctx context.Context, path string) (jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) GetBiosInfo(ctx context.Context) (SBiosInfo, error)
- func (r *SBaseRedfishClient) GetClearManagerLogsPath() string
- func (r *SBaseRedfishClient) GetClearSystemLogsPath() string
- func (r *SBaseRedfishClient) GetConsoleJNLP(ctx context.Context) (string, error)
- func (r *SBaseRedfishClient) GetEndpoint() string
- func (r *SBaseRedfishClient) GetHost() string
- func (r *SBaseRedfishClient) GetIndicatorLED(ctx context.Context) (bool, error)
- func (r *SBaseRedfishClient) GetIndicatorLEDInternal(ctx context.Context, subsys string) (string, string, error)
- func (r *SBaseRedfishClient) GetLanConfigs(ctx context.Context) ([]types.SIPMILanConfig, error)
- func (r *SBaseRedfishClient) GetManagerLogsPath() string
- func (r *SBaseRedfishClient) GetNTPConf(ctx context.Context) (SNTPConf, error)
- func (r *SBaseRedfishClient) GetPassword() string
- func (r *SBaseRedfishClient) GetPower(ctx context.Context) ([]SPower, error)
- func (r *SBaseRedfishClient) GetPowerPath() string
- func (r *SBaseRedfishClient) GetResource(ctx context.Context, resname ...string) (string, jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) GetResourceCount(ctx context.Context, resname ...string) (int, error)
- func (r *SBaseRedfishClient) GetSystemInfo(ctx context.Context) (string, SSystemInfo, error)
- func (r *SBaseRedfishClient) GetSystemLogsPath() string
- func (r *SBaseRedfishClient) GetThermal(ctx context.Context) ([]STemperature, error)
- func (r *SBaseRedfishClient) GetThermalPath() string
- func (r *SBaseRedfishClient) GetUsername() string
- func (r *SBaseRedfishClient) GetVirtualCdromInfo(ctx context.Context) (string, SCdromInfo, error)
- func (r *SBaseRedfishClient) GetVirtualCdromJSON(ctx context.Context) (string, jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) IRedfishDriver() IRedfishDriver
- func (r *SBaseRedfishClient) Login(ctx context.Context) error
- func (r *SBaseRedfishClient) Logout(ctx context.Context) error
- func (r *SBaseRedfishClient) MountVirtualCdrom(ctx context.Context, path string, cdromUrl string, boot bool) error
- func (r *SBaseRedfishClient) ParseRoot(root jsonutils.JSONObject) error
- func (r *SBaseRedfishClient) Patch(ctx context.Context, path string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) Post(ctx context.Context, path string, body jsonutils.JSONObject) (http.Header, jsonutils.JSONObject, error)
- func (r *SBaseRedfishClient) Probe(ctx context.Context) error
- func (r *SBaseRedfishClient) ReadManagerLogs(ctx context.Context, since time.Time) ([]SEvent, error)
- func (r *SBaseRedfishClient) ReadSystemLogs(ctx context.Context, since time.Time) ([]SEvent, error)
- func (r *SBaseRedfishClient) Reset(ctx context.Context, action string) error
- func (r *SBaseRedfishClient) SetIndicatorLED(ctx context.Context, on bool) error
- func (r *SBaseRedfishClient) SetIndicatorLEDInternal(ctx context.Context, subsys string, val string) error
- func (r *SBaseRedfishClient) SetNTPConf(ctx context.Context, conf SNTPConf) error
- func (r *SBaseRedfishClient) SetNextBootDev(ctx context.Context, dev string) error
- func (r *SBaseRedfishClient) SetNextBootVirtualCdrom(ctx context.Context) error
- func (r *SBaseRedfishClient) UmountVirtualCdrom(ctx context.Context, path string) error
- type SBiosInfo
- type SCdromInfo
- type SEvent
- type SEventList
- type SNTPConf
- type SPower
- type SSystemInfo
- type STemperature
Constants ¶
View Source
const ( EVENT_TYPE_SYSTEM = "system" EVENT_TYPE_MANAGER = "manager" )
Variables ¶
This section is empty.
Functions ¶
func MountVirtualCdrom ¶
func RegisterApiFactory ¶
func RegisterApiFactory(f IRedfishDriverFactory)
func RegisterDefaultApiFactory ¶
func RegisterDefaultApiFactory(f IRedfishDriverFactory)
func SortEvents ¶
func SortEvents(el []SEvent)
func UmountVirtualCdrom ¶
func UmountVirtualCdrom(ctx context.Context, api IRedfishDriver) error
Types ¶
type IRedfishDriver ¶
type IRedfishDriver interface { Login(ctx context.Context) error Logout(ctx context.Context) error Probe(ctx context.Context) error BasePath() string VersionKey() string LinkKey() string MemberKey() string LogItemsKey() string ParseRoot(root jsonutils.JSONObject) error GetParent(parent jsonutils.JSONObject) jsonutils.JSONObject GetResource(ctx context.Context, resname ...string) (string, jsonutils.JSONObject, error) GetResourceCount(ctx context.Context, resname ...string) (int, error) GetVirtualCdromInfo(ctx context.Context) (string, SCdromInfo, error) MountVirtualCdrom(ctx context.Context, path string, cdromUrl string, boot bool) error UmountVirtualCdrom(ctx context.Context, path string) error GetLanConfigs(ctx context.Context) ([]types.SIPMILanConfig, error) GetSystemInfo(ctx context.Context) (string, SSystemInfo, error) SetNextBootDev(ctx context.Context, dev string) error Reset(ctx context.Context, action string) error GetSystemLogsPath() string GetManagerLogsPath() string GetClearSystemLogsPath() string GetClearManagerLogsPath() string ReadSystemLogs(ctx context.Context, since time.Time) ([]SEvent, error) ReadManagerLogs(ctx context.Context, since time.Time) ([]SEvent, error) ClearSystemLogs(ctx context.Context) error ClearManagerLogs(ctx context.Context) error BmcReset(ctx context.Context) error GetBiosInfo(ctx context.Context) (SBiosInfo, error) GetIndicatorLED(ctx context.Context) (bool, error) SetIndicatorLED(ctx context.Context, on bool) error GetPowerPath() string GetThermalPath() string GetPower(ctx context.Context) ([]SPower, error) GetThermal(ctx context.Context) ([]STemperature, error) GetNTPConf(ctx context.Context) (SNTPConf, error) SetNTPConf(ctx context.Context, conf SNTPConf) error GetConsoleJNLP(ctx context.Context) (string, error) }
func NewRedfishDriver ¶
type IRedfishDriverFactory ¶
type IRedfishDriverFactory interface { Name() string NewApi(endpoint, username, password string, debug bool) IRedfishDriver }
type SBaseRedfishClient ¶
type SBaseRedfishClient struct { object.SObject SessionToken string Version string Registries map[string]string IsDebug bool // contains filtered or unexported fields }
func NewBaseRedfishClient ¶
func NewBaseRedfishClient(endpoint string, username, password string, debug bool) SBaseRedfishClient
func (*SBaseRedfishClient) BmcReset ¶
func (r *SBaseRedfishClient) BmcReset(ctx context.Context) error
func (*SBaseRedfishClient) ClearManagerLogs ¶
func (r *SBaseRedfishClient) ClearManagerLogs(ctx context.Context) error
func (*SBaseRedfishClient) ClearSystemLogs ¶
func (r *SBaseRedfishClient) ClearSystemLogs(ctx context.Context) error
func (*SBaseRedfishClient) Delete ¶
func (r *SBaseRedfishClient) Delete(ctx context.Context, path string) (http.Header, jsonutils.JSONObject, error)
func (*SBaseRedfishClient) Get ¶
func (r *SBaseRedfishClient) Get(ctx context.Context, path string) (jsonutils.JSONObject, error)
func (*SBaseRedfishClient) GetBiosInfo ¶
func (r *SBaseRedfishClient) GetBiosInfo(ctx context.Context) (SBiosInfo, error)
func (*SBaseRedfishClient) GetClearManagerLogsPath ¶
func (r *SBaseRedfishClient) GetClearManagerLogsPath() string
func (*SBaseRedfishClient) GetClearSystemLogsPath ¶
func (r *SBaseRedfishClient) GetClearSystemLogsPath() string
func (*SBaseRedfishClient) GetConsoleJNLP ¶
func (r *SBaseRedfishClient) GetConsoleJNLP(ctx context.Context) (string, error)
func (*SBaseRedfishClient) GetEndpoint ¶
func (r *SBaseRedfishClient) GetEndpoint() string
func (*SBaseRedfishClient) GetHost ¶
func (r *SBaseRedfishClient) GetHost() string
func (*SBaseRedfishClient) GetIndicatorLED ¶
func (r *SBaseRedfishClient) GetIndicatorLED(ctx context.Context) (bool, error)
func (*SBaseRedfishClient) GetIndicatorLEDInternal ¶
func (*SBaseRedfishClient) GetLanConfigs ¶
func (r *SBaseRedfishClient) GetLanConfigs(ctx context.Context) ([]types.SIPMILanConfig, error)
func (*SBaseRedfishClient) GetManagerLogsPath ¶
func (r *SBaseRedfishClient) GetManagerLogsPath() string
func (*SBaseRedfishClient) GetNTPConf ¶
func (r *SBaseRedfishClient) GetNTPConf(ctx context.Context) (SNTPConf, error)
func (*SBaseRedfishClient) GetPassword ¶
func (r *SBaseRedfishClient) GetPassword() string
func (*SBaseRedfishClient) GetPower ¶
func (r *SBaseRedfishClient) GetPower(ctx context.Context) ([]SPower, error)
func (*SBaseRedfishClient) GetPowerPath ¶
func (r *SBaseRedfishClient) GetPowerPath() string
func (*SBaseRedfishClient) GetResource ¶
func (r *SBaseRedfishClient) GetResource(ctx context.Context, resname ...string) (string, jsonutils.JSONObject, error)
func (*SBaseRedfishClient) GetResourceCount ¶
func (*SBaseRedfishClient) GetSystemInfo ¶
func (r *SBaseRedfishClient) GetSystemInfo(ctx context.Context) (string, SSystemInfo, error)
func (*SBaseRedfishClient) GetSystemLogsPath ¶
func (r *SBaseRedfishClient) GetSystemLogsPath() string
func (*SBaseRedfishClient) GetThermal ¶
func (r *SBaseRedfishClient) GetThermal(ctx context.Context) ([]STemperature, error)
func (*SBaseRedfishClient) GetThermalPath ¶
func (r *SBaseRedfishClient) GetThermalPath() string
func (*SBaseRedfishClient) GetUsername ¶
func (r *SBaseRedfishClient) GetUsername() string
func (*SBaseRedfishClient) GetVirtualCdromInfo ¶
func (r *SBaseRedfishClient) GetVirtualCdromInfo(ctx context.Context) (string, SCdromInfo, error)
func (*SBaseRedfishClient) GetVirtualCdromJSON ¶
func (r *SBaseRedfishClient) GetVirtualCdromJSON(ctx context.Context) (string, jsonutils.JSONObject, error)
func (*SBaseRedfishClient) IRedfishDriver ¶
func (r *SBaseRedfishClient) IRedfishDriver() IRedfishDriver
func (*SBaseRedfishClient) MountVirtualCdrom ¶
func (*SBaseRedfishClient) ParseRoot ¶
func (r *SBaseRedfishClient) ParseRoot(root jsonutils.JSONObject) error
func (*SBaseRedfishClient) Patch ¶
func (r *SBaseRedfishClient) Patch(ctx context.Context, path string, body jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SBaseRedfishClient) Post ¶
func (r *SBaseRedfishClient) Post(ctx context.Context, path string, body jsonutils.JSONObject) (http.Header, jsonutils.JSONObject, error)
func (*SBaseRedfishClient) ReadManagerLogs ¶
func (*SBaseRedfishClient) ReadSystemLogs ¶
func (*SBaseRedfishClient) Reset ¶
func (r *SBaseRedfishClient) Reset(ctx context.Context, action string) error
func (*SBaseRedfishClient) SetIndicatorLED ¶
func (r *SBaseRedfishClient) SetIndicatorLED(ctx context.Context, on bool) error
func (*SBaseRedfishClient) SetIndicatorLEDInternal ¶
func (r *SBaseRedfishClient) SetIndicatorLEDInternal(ctx context.Context, subsys string, val string) error
possible IndicatorLED values are: "Lit" or "Blinking" or "Off"
func (*SBaseRedfishClient) SetNTPConf ¶
func (r *SBaseRedfishClient) SetNTPConf(ctx context.Context, conf SNTPConf) error
func (*SBaseRedfishClient) SetNextBootDev ¶
func (r *SBaseRedfishClient) SetNextBootDev(ctx context.Context, dev string) error
func (*SBaseRedfishClient) SetNextBootVirtualCdrom ¶
func (r *SBaseRedfishClient) SetNextBootVirtualCdrom(ctx context.Context) error
func (*SBaseRedfishClient) UmountVirtualCdrom ¶
func (r *SBaseRedfishClient) UmountVirtualCdrom(ctx context.Context, path string) error
type SCdromInfo ¶
type SEventList ¶
type SEventList []SEvent
func (SEventList) Len ¶
func (el SEventList) Len() int
func (SEventList) Less ¶
func (el SEventList) Less(i, j int) bool
func (SEventList) Swap ¶
func (el SEventList) Swap(i, j int)
type SPower ¶
type SPower struct { PowerCapacityWatts int `json:"PowerCapacityWatts"` PowerConsumedWatts int `json:"PowerConsumedWatts"` PowerMetrics struct { AverageConsumedWatts int `json:"AverageConsumedWatts"` IntervalInMin int `json:"IntervalInMin"` MaxConsumedWatts int `json:"MaxConsumedWatts"` MinConsumedWatts int `json:"MinConsumedWatts"` } `json:"PowerMetrics"` }
type SSystemInfo ¶
type SSystemInfo struct { Manufacturer string `json:"Manufacturer"` Model string `json:"Model"` SKU string `json:"SKU"` SerialNumber string `json:"SerialNumber"` UUID string `json:"UUID"` EthernetNICs []string `json:"EthernetNICs"` MemoryGB int `json:"MemoryGB"` NodeCount int `json:"NodeCount"` CpuDesc string `json:"CpuDesc"` PowerState string `json:"PowerState"` NextBootDev string `json:"NextBootDev"` NextBootDevSupported []string `json:"NextBootDevSupported"` ResetTypeSupported []string `json:"ResetTypeSupported"` }
type STemperature ¶
type STemperature struct { Name string `json:"Name"` PhysicalContext string `json:"PhysicalContext"` ReadingCelsius int `json:"ReadingCelsius"` }
func (STemperature) ToMetric ¶
func (t STemperature) ToMetric() influxdb.SKeyValue
Click to show internal directories.
Click to hide internal directories.