Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dmtf model for Port to match latest schema #1259

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib-dmtf/model/Chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ type SysLog struct {
LowestSeverity string `json:"LowestSeverity,omitempty"`
}

//Entries redfish structure
// Entries redfish structure
type Entries struct {
Oid string `json:"@odata.id"`
}
Expand Down Expand Up @@ -164,8 +164,11 @@ type Status struct {

// SaveInMemory will create the Chassis in inmemory DB, with key as UUID
// Takes:
//
// none as function parameter, but takes c of type *Chassis as a pointer receiver implicitly.
//
// Returns:
//
// err of type error
//
// On Sucess - returns nil value
Expand Down
2 changes: 1 addition & 1 deletion lib-dmtf/model/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Redundancy struct {
RedundancySetCount int `json:"[email protected],omitempty"`
}

//Identifier redfish structure
// Identifier redfish structure
type Identifier struct {
DurableName string `json:"DurableName,omitempty"`
DurableNameFormat string `json:"DurableNameFormat,omitempty"`
Expand Down
59 changes: 50 additions & 9 deletions lib-dmtf/model/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,43 @@ type Port struct {
FunctionMinBandwidth []*FunctionBandwidth `json:"FunctionMinBandwidth,omitempty"`
Location interface{} `json:"Location,omitempty"`
SFP SFP `json:"SFP,omitempty"`
CXL *CXL `json:"CXL,omitempty"`
InfiniBand *InfiniBand `json:"InfiniBand,omitempty"`
RemotePortId string `json:"RemotePortId,omitempty"`
}

//InfiniBand redfish structure
type InfiniBand struct {
AssociatedNodeGUIDs []string `json:"AssociatedNodeGUIDs,omitempty"`
AssociatedPortGUIDs []string `json:"AssociatedPortGUIDs,omitempty"`
AssociatedSystemGUIDs []string `json:"AssociatedSystemGUIDs,omitempty"`
}

// CXL redfish structure
type CXL struct {
Congestion *Congestion `json:"Congestion,omitempty"`
ConnectedDeviceMode string `json:"ConnectedDeviceMode,omitempty"`
ConnectedDeviceType string `json:"ConnectedDeviceType,omitempty"`
CurrentPortConfigurationState string `json:"CurrentPortConfigurationState,omitempty"`
MaxLogicalDeviceCount string `json:"MaxLogicalDeviceCount,omitempty"`
QoSTelemetryCapabilities *QoSTelemetryCapabilities `json:"QoSTelemetryCapabilities,omitempty"`
TemporaryThroughputReductionEnabled bool `json:"TemporaryThroughputReductionEnabled,omitempty"`
}

// Congestion redfish structure
type Congestion struct {
BackpressureSampleInterval int `json:"BackpressureSampleInterval,omitempty"`
CompletionCollectionInterval int `json:"CompletionCollectionInterval,omitempty"`
CongestionTelemetryEnabled bool `json:"CongestionTelemetryEnabled,omitempty"`
EgressModeratePercentage int `json:"EgressModeratePercentage,omitempty"`
EgressSeverePercentage int `json:"EgressSeverePercentage,omitempty"`
MaxSustainedRequestCmpBias int `json:"MaxSustainedRequestCmpBias,omitempty"`
}

// QoSTelemetryCapabilities redfish structure
type QoSTelemetryCapabilities struct {
EgressPortBackpressureSupported bool `json:"EgressPortBackpressureSupported,omitempty"`
TemporaryThroughputReductionSupported bool `json:"TemporaryThroughputReductionSupported,omitempty"`
}

// SFP redfish structure
Expand Down Expand Up @@ -91,14 +128,17 @@ type PortEthernet struct {

// LLDP redfish structure
type LLDP struct {
ChassisID string `json:"ChassisId,omitempty"`
ChassisIDSubtype string `json:"ChassisIdSubtype,omitempty"`
ManagementAddressIPv4 string `json:"ManagementAddressIPv4,omitempty"`
ManagementAddressIPv6 string `json:"ManagementAddressIPv6,omitempty"`
ManagementAddressMAC string `json:"ManagementAddressMAC,omitempty"`
ManagementVlanID int `json:"ManagementVlanId,omitempty"`
PortID string `json:"PortId,omitempty"`
PortIDSubtype string `json:"PortIdSubtype,omitempty"`
ChassisID string `json:"ChassisId,omitempty"`
ChassisIDSubtype string `json:"ChassisIdSubtype,omitempty"`
ManagementAddressIPv4 string `json:"ManagementAddressIPv4,omitempty"`
ManagementAddressIPv6 string `json:"ManagementAddressIPv6,omitempty"`
ManagementAddressMAC string `json:"ManagementAddressMAC,omitempty"`
ManagementVlanID int `json:"ManagementVlanId,omitempty"`
PortID string `json:"PortId,omitempty"`
PortIDSubtype string `json:"PortIdSubtype,omitempty"`
SystemCapabilities []string `json:"SystemCapabilities,omitempty"`
SystemDescription string `json:"SystemDescription,omitempty"`
SystemName string `json:"SystemName,omitempty"`
}

//FibreChannel redfish model
Expand All @@ -113,7 +153,7 @@ type FibreChannel struct {
type LinkConfiguration struct {
AutoSpeedNegotiationCapable bool `json:"AutoSpeedNegotiationCapable,omitempty"`
AutoSpeedNegotiationEnabled bool `json:"AutoSpeedNegotiationEnabled,omitempty"`
CapableLinkSpeedGbps []CapableLinkSpeedGbps `json:"CapableLinkSpeedGbps,omitempty"`
CapableLinkSpeedGbps []int `json:"CapableLinkSpeedGbps,omitempty"`
ConfiguredNetworkLinks []CapableLinkSpeedGbps `json:"ConfiguredNetworkLinks,omitempty"`
}

Expand All @@ -136,4 +176,5 @@ type PortLinks struct {
ConnectedPortsCount int `json:"[email protected],omitempty"`
ConnectedSwitchPortsCount int `json:"[email protected],omitempty"`
ConnectedSwitchesCount int `json:"[email protected],omitempty"`
EthernetInterfaces []Link `json:"EthernetInterfaces,omitempty"`
}
2 changes: 1 addition & 1 deletion lib-dmtf/model/power.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package model

//Power is the redfish Power model according to the 2020.3 release
// Power is the redfish Power model according to the 2020.3 release
type Power struct {
ODataContext string `json:"@odata.context,omitempty"`
ODataEtag string `json:"@odata.etag,omitempty"`
Expand Down
Loading