Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feature/re-sync-after…
Browse files Browse the repository at this point in the history
…-endpoint-power-cycle
  • Loading branch information
scott-howe-1 committed Oct 23, 2024
2 parents 987e85c + 6fe2e50 commit 0e0cbf7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ jobs:

- name: Generate support files
run: make generate

- name: Format Golang
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Build Golang
- name: Build cfm-service & cfm-cli (Golang)
run: make build-go

- name: Build cxl-host (Golang)
working-directory: ./cmd/cxl-host
run: make local
48 changes: 24 additions & 24 deletions cmd/cxl-host/service/cxl_host_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ func (s *CxlHostApiService) RedfishV1AccountServiceGet(ctx context.Context) (red
},
ServiceEnabled: &enabled,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
}

Expand Down Expand Up @@ -272,8 +272,8 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdGet(ctx context.Context, ch
// },
SerialNumber: &uuid,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
UUID: uuid,
Version: &version,
Expand Down Expand Up @@ -346,8 +346,8 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdMemoryMemoryIdGet(ctx conte
Enabled: true,
Name: memoryId,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
}

Expand Down Expand Up @@ -395,8 +395,8 @@ func (s *CxlHostApiService) RedfishV1FabricsFabricIdGet(ctx context.Context, fab
Name: fabricId + " Fabric",
Oem: nil,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
Switches: redfishapi.OdataV4IdRef{
OdataId: "/redfish/v1/Fabrics/" + fabricId + "/Switches",
Expand Down Expand Up @@ -458,8 +458,8 @@ func (s *CxlHostApiService) RedfishV1FabricsFabricIdSwitchesSwitchIdGet(ctx cont
RedundancyodataCount: 1,
SerialNumber: &serial,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
SupportedProtocols: []redfishapi.ProtocolProtocol{redfishapi.PROTOCOLPROTOCOL_CXL},
SwitchType: redfishapi.PROTOCOLPROTOCOL_CXL,
Expand Down Expand Up @@ -532,8 +532,8 @@ func (s *CxlHostApiService) RedfishV1FabricsFabricIdSwitchesSwitchIdPortsPortIdG
PortType: redfishapi.PORTV1110PORTTYPE_BIDIRECTIONAL_PORT,
SignalDetected: &detected,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
}

Expand Down Expand Up @@ -627,8 +627,8 @@ func (s *CxlHostApiService) RedfishV1SessionServiceGet(ctx context.Context) (red
SessionTimeout: int64(SessionTimeout),
Sessions: redfishapi.OdataV4IdRef{OdataId: "/redfish/v1/SessionService/Sessions"},
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
}

Expand Down Expand Up @@ -911,7 +911,7 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdPCIeDevicesPCIeDeviceIdCXLL

dev := GetCXLDevInfo(BDtoBDF(pCIeDeviceId))
gcxlid := FormatGCXLID(dev)
fmt := redfishapi.ResourceV1200DurableNameFormat("GCXLID")
fmt := redfishapi.ResourceV1191DurableNameFormat("GCXLID")
resource := redfishapi.CxlLogicalDeviceV111CxlLogicalDevice{
OdataContext: "/redfish/v1/$metadata#CXLLogicalDevice.CXLLogicalDevice",
OdataId: "/redfish/v1/Chassis/" + chassisId + "/PCIeDevices/" + pCIeDeviceId + "/CXLLogicalDevices/" + cXLLogicalDeviceId,
Expand All @@ -936,12 +936,12 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdPCIeDevicesPCIeDeviceIdCXLL
Name: "Locally attached CXL Logical Device " + string(dev.GetCxlType()),
SemanticsSupported: []redfishapi.CxlLogicalDeviceV111CxlSemantic{},
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
Identifiers: []redfishapi.ResourceIdentifier{{
DurableName: &gcxlid,
DurableNameFormat: &fmt,
DurableNameFormat: fmt,
}},
}
devCap := dev.GetCxlCap()
Expand Down Expand Up @@ -1032,8 +1032,8 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdPCIeDevicesPCIeDeviceIdGet(
OdataId: "/redfish/v1/Chassis/" + chassisId + "/PCIeDevices/" + pCIeDeviceId + "/PCIeFunctions",
},
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
}

Expand Down Expand Up @@ -1118,8 +1118,8 @@ func (s *CxlHostApiService) RedfishV1ChassisChassisIdPCIeDevicesPCIeDeviceIdPCIe
Name: "PCIe Function",
RevisionId: &revisionId,
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
VendorId: &vendorId,
}
Expand Down Expand Up @@ -1464,8 +1464,8 @@ func (s *CxlHostApiService) RedfishV1SystemsComputerSystemIdMemoryMemoryIdGet(ct
Name: "CXL Device memory",
MemoryMedia: []redfishapi.MemoryV1190MemoryMedia{redfishapi.MEMORYV1190MEMORYMEDIA_PROPRIETARY},
Status: redfishapi.ResourceStatus{
Health: &resourcehealthOk,
State: &resourcestateEnabled,
Health: resourcehealthOk,
State: resourcestateEnabled,
},
Links: redfishapi.MemoryV1190Links{
MemoryMediaSources: []redfishapi.OdataV4IdRef{
Expand Down

0 comments on commit 0e0cbf7

Please sign in to comment.