Documentation
¶
Index ¶
- func ParamsInit(host, device_model string) (urlprefix, tokenurl string, isBasicAuth bool, ...)
- func RedFishCollect(host, username, password, device_model string) (ok bool, err error)
- type JsonRedFish
- type NetworkData
- type Redfish
- func (redf *Redfish) DeleteSession() (err error)
- func (redf *Redfish) GetBMCIp() (ok bool, err error)
- func (redf *Redfish) GetBaseInfo() (err error)
- func (redf *Redfish) GetChassisEmbedded() (r *req.Resp)
- func (redf *Redfish) GetCpuInfo() (ok bool, err error)
- func (redf *Redfish) GetCpuSummary() (processor_summary interface{})
- func (redf *Redfish) GetInfo(URL_suffix string) (r *req.Resp)
- func (redf *Redfish) GetManagersEmbedded() (r *req.Resp)
- func (redf *Redfish) GetMemoryInfo() (ok bool, err error)
- func (redf *Redfish) GetMemorySummary() (totalSystemMemory interface{})
- func (redf *Redfish) GetNetWork() (ok bool, err error)
- func (redf *Redfish) GetNetWorkInfo() (ok bool, err error)
- func (redf *Redfish) GetNetworkInterfaces() (ok bool, err error)
- func (redf *Redfish) GetPCIe() (ok bool, err error)
- func (redf *Redfish) GetPhysicalDisk() (ok bool, err error)
- func (redf *Redfish) GetPowerControl() (ok bool, err error)
- func (redf *Redfish) GetPowerSupply() (ok bool, err error)
- func (redf *Redfish) GetRedfishVersion() (err error)
- func (redf *Redfish) GetSerial() (err error)
- func (redf *Redfish) GetSysEmbedded() (r *req.Resp)
- func (redf *Redfish) GetV1() (r *req.Resp)
- func (redf *Redfish) HeadGet(device_model string) (header map[string]string)
- func (redf *Redfish) RedFishToJson() (ok bool, err error)
- func (redf *Redfish) RedfishCollect(host, username, password, device_model string) (ok bool, err error)
- type ResultRedFish
- func (res *ResultRedFish) GetBMC() (info []map[string]interface{})
- func (res *ResultRedFish) GetBMCVersion() (bmcVersion string)
- func (res *ResultRedFish) GetBasicServer() (result *basicServer)
- func (res *ResultRedFish) GetBiosVersion() (biosVersion string)
- func (res *ResultRedFish) GetCpu() (info []map[string]interface{})
- func (res *ResultRedFish) GetDeviceType() (deviceType string)
- func (res *ResultRedFish) GetHostname() (hostName string)
- func (res *ResultRedFish) GetManufacturer() (manufacturer string)
- func (res *ResultRedFish) GetMem() (info []map[string]interface{})
- func (res *ResultRedFish) GetModel() (model string)
- func (res *ResultRedFish) GetNetwork() (info []map[string]interface{})
- func (res *ResultRedFish) GetPCi() (info []map[string]interface{})
- func (res *ResultRedFish) GetPartNumber() (partNumber string)
- func (res *ResultRedFish) GetPower() (info []map[string]interface{})
- func (res *ResultRedFish) GetSerialNumber() (serialNumber string)
- func (res *ResultRedFish) GetStorage() (info []map[string]interface{})
- func (res *ResultRedFish) GetWatts() (watts string)
- func (res *ResultRedFish) RedFishToMap(host, mode string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParamsInit ¶
func RedFishCollect ¶
采集设备所有数据并入库
Types ¶
type JsonRedFish ¶
type JsonRedFish struct {
Memory map[string]interface{}
}
type NetworkData ¶
type Redfish ¶
type Redfish struct {
Username string
Password string
URLPrefix string
Mode string
Token string
Tokenurl string
Json map[string]interface{}
Host string
Cpu int8
Mem int8
Pcie int8
Disk int8
BasicAuth string
Params map[string]map[string]string
Log *log.Logger
// contains filtered or unexported fields
}
func NewRedFish ¶
func NewRedFish() *Redfish
func (*Redfish) DeleteSession ¶
func (*Redfish) GetBaseInfo ¶
func (*Redfish) GetChassisEmbedded ¶
func (*Redfish) GetCpuSummary ¶
func (redf *Redfish) GetCpuSummary() (processor_summary interface{})
获取cpu简略信息
func (*Redfish) GetManagersEmbedded ¶
func (*Redfish) GetMemoryInfo ¶
func (*Redfish) GetMemorySummary ¶
func (redf *Redfish) GetMemorySummary() (totalSystemMemory interface{})
func (*Redfish) GetNetWork ¶
func (*Redfish) GetNetWorkInfo ¶
func (*Redfish) GetNetworkInterfaces ¶
获取网卡信息
func (*Redfish) GetPhysicalDisk ¶
获取硬盘详细信息
func (*Redfish) GetPowerControl ¶
func (*Redfish) GetRedfishVersion ¶
func (*Redfish) GetSysEmbedded ¶
type ResultRedFish ¶
func NewResultRedFish ¶
func NewResultRedFish() *ResultRedFish
func (*ResultRedFish) GetBMC ¶
func (res *ResultRedFish) GetBMC() (info []map[string]interface{})
获取BMC
func (*ResultRedFish) GetBMCVersion ¶
func (res *ResultRedFish) GetBMCVersion() (bmcVersion string)
获取BMCVersion
func (*ResultRedFish) GetBasicServer ¶
func (res *ResultRedFish) GetBasicServer() (result *basicServer)
获取基础信息
func (*ResultRedFish) GetBiosVersion ¶
func (res *ResultRedFish) GetBiosVersion() (biosVersion string)
获取BiosVersion
func (*ResultRedFish) GetCpu ¶
func (res *ResultRedFish) GetCpu() (info []map[string]interface{})
获取Cpu
func (*ResultRedFish) GetDeviceType ¶
func (res *ResultRedFish) GetDeviceType() (deviceType string)
获取设备类型
func (*ResultRedFish) GetManufacturer ¶
func (res *ResultRedFish) GetManufacturer() (manufacturer string)
获取厂商
func (*ResultRedFish) GetMem ¶
func (res *ResultRedFish) GetMem() (info []map[string]interface{})
获取Mem
func (*ResultRedFish) GetNetwork ¶
func (res *ResultRedFish) GetNetwork() (info []map[string]interface{})
获取网卡信息
func (*ResultRedFish) GetPCi ¶
func (res *ResultRedFish) GetPCi() (info []map[string]interface{})
获取电源
func (*ResultRedFish) GetPartNumber ¶
func (res *ResultRedFish) GetPartNumber() (partNumber string)
获取SerialNumber
func (*ResultRedFish) GetPower ¶
func (res *ResultRedFish) GetPower() (info []map[string]interface{})
获取电源
func (*ResultRedFish) GetSerialNumber ¶
func (res *ResultRedFish) GetSerialNumber() (serialNumber string)
获取SerialNumber
func (*ResultRedFish) GetStorage ¶
func (res *ResultRedFish) GetStorage() (info []map[string]interface{})
获取硬盘数据
func (*ResultRedFish) RedFishToMap ¶
func (res *ResultRedFish) RedFishToMap(host, mode string)
----------------------------解析数据------------------------------ 去redis数据并专为json
Click to show internal directories.
Click to hide internal directories.