mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
crawler: add check to get IP address from manager's ethernet interface
This commit is contained in:
parent
deffdc48db
commit
c9ae96ab76
1 changed files with 6 additions and 2 deletions
|
|
@ -263,13 +263,17 @@ func walkManagers(rf_managers []*redfish.Manager, baseURI string) ([]Manager, er
|
||||||
}
|
}
|
||||||
var ethernet_interfaces []EthernetInterface
|
var ethernet_interfaces []EthernetInterface
|
||||||
for _, rf_ethernetinterface := range rf_ethernetinterfaces {
|
for _, rf_ethernetinterface := range rf_ethernetinterfaces {
|
||||||
ethernet_interfaces = append(ethernet_interfaces, EthernetInterface{
|
ethernetinterface := EthernetInterface{
|
||||||
URI: baseURI + rf_ethernetinterface.ODataID,
|
URI: baseURI + rf_ethernetinterface.ODataID,
|
||||||
MAC: rf_ethernetinterface.MACAddress,
|
MAC: rf_ethernetinterface.MACAddress,
|
||||||
Name: rf_ethernetinterface.Name,
|
Name: rf_ethernetinterface.Name,
|
||||||
Description: rf_ethernetinterface.Description,
|
Description: rf_ethernetinterface.Description,
|
||||||
Enabled: rf_ethernetinterface.InterfaceEnabled,
|
Enabled: rf_ethernetinterface.InterfaceEnabled,
|
||||||
})
|
}
|
||||||
|
if len(rf_ethernetinterface.IPv4Addresses) > 0 {
|
||||||
|
ethernetinterface.IP = rf_ethernetinterface.IPv4Addresses[0].Address
|
||||||
|
}
|
||||||
|
ethernet_interfaces = append(ethernet_interfaces, ethernetinterface)
|
||||||
}
|
}
|
||||||
managers = append(managers, Manager{
|
managers = append(managers, Manager{
|
||||||
URI: baseURI + "/redfish/v1/Managers/" + rf_manager.ID,
|
URI: baseURI + "/redfish/v1/Managers/" + rf_manager.ID,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue