diff --git a/pkg/crawler/main.go b/pkg/crawler/main.go index ac5b0ea..3b29bad 100644 --- a/pkg/crawler/main.go +++ b/pkg/crawler/main.go @@ -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{