mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
crawler: change check to exclude ethernet interfaces without IPs
This commit is contained in:
parent
c9ae96ab76
commit
ac78e21ee8
1 changed files with 3 additions and 3 deletions
|
|
@ -263,6 +263,9 @@ func walkManagers(rf_managers []*redfish.Manager, baseURI string) ([]Manager, er
|
|||
}
|
||||
var ethernet_interfaces []EthernetInterface
|
||||
for _, rf_ethernetinterface := range rf_ethernetinterfaces {
|
||||
if len(rf_ethernetinterface.IPv4Addresses) <= 0 {
|
||||
continue
|
||||
}
|
||||
ethernetinterface := EthernetInterface{
|
||||
URI: baseURI + rf_ethernetinterface.ODataID,
|
||||
MAC: rf_ethernetinterface.MACAddress,
|
||||
|
|
@ -270,9 +273,6 @@ func walkManagers(rf_managers []*redfish.Manager, baseURI string) ([]Manager, er
|
|||
Description: rf_ethernetinterface.Description,
|
||||
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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue