diff --git a/redfish/port.go b/redfish/port.go index c232ee31..a9e146e5 100644 --- a/redfish/port.go +++ b/redfish/port.go @@ -142,16 +142,16 @@ type PortLinkStatus string const ( // LinkUpPortLinkStatus This link on this interface is up. - LinkUpPortLinkStatus LinkStatus = "LinkUp" + LinkUpPortLinkStatus PortLinkStatus = "LinkUp" // StartingPortLinkStatus This link on this interface is starting. A physical link has been established, but the port // is not able to transfer data. - StartingPortLinkStatus LinkStatus = "Starting" + StartingPortLinkStatus PortLinkStatus = "Starting" // TrainingPortLinkStatus This physical link on this interface is training. - TrainingPortLinkStatus LinkStatus = "Training" + TrainingPortLinkStatus PortLinkStatus = "Training" // LinkDownPortLinkStatus The link on this interface is down. - LinkDownPortLinkStatus LinkStatus = "LinkDown" + LinkDownPortLinkStatus PortLinkStatus = "LinkDown" // NoLinkPortLinkStatus No physical link detected on this interface. - NoLinkPortLinkStatus LinkStatus = "NoLink" + NoLinkPortLinkStatus PortLinkStatus = "NoLink" ) type MediumType string diff --git a/redfish/port_test.go b/redfish/port_test.go index b8d977aa..8cb81c53 100644 --- a/redfish/port_test.go +++ b/redfish/port_test.go @@ -20,6 +20,7 @@ var portBody = `{ "State": "Enabled", "Health": "OK" }, + "LinkStatus": "LinkUp", "PortId": "1", "PortProtocol": "SAS", "PortType": "BidirectionalPort", @@ -50,4 +51,5 @@ func TestPort(t *testing.T) { assertEquals(t, "BidirectionalPort", fmt.Sprint(result.PortType)) assertEquals(t, "SAS", fmt.Sprint(result.PortProtocol)) assertEquals(t, "48", fmt.Sprint(result.CurrentSpeedGbps)) + assertEquals(t, "LinkUp", fmt.Sprint(result.LinkStatus)) }