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

Recent cxl-host bug fixes #40

Merged
merged 12 commits into from
Oct 15, 2024
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
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ generate-redfish:
docker run -u $(GENERATE_USER) --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v7.0.0 generate -i /local/$(OPENAPI_REDFISH_YAML) -g go-server -o /local/pkg/redfishapi --package-name redfishapi --additional-properties=sourceFolder=,outputAsLibrary=true,router=mux,serverPort=8080,enumClassPrefix=true -t /local/api/templates/go-server --skip-validate-spec
@echo "Format files after generation to conform to project standard"
docker run --rm -v ${PWD}:/local golang:$(GO_VERSION) $(GOFMT_OPTS)
@echo "Apply local patch for xml response fix"
git apply api/patch/Apply-xml-workaround-to-fix-metadata-response.patch
@echo "Apply local patch for missing import"
git apply api/patch/fix-missing-import.patch
@echo "Apply local patch for redfish auto generated codes"
git apply api/patch/*.redfish.patch

generate-axios:
@echo "Generating $(OPENAPI_YAML) axios server using openapi-generator-cli"
Expand Down
29 changes: 29 additions & 0 deletions api/patch/force-endpoint-even-when-there-is-no-link.redfish.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From e3add1887e6d256b255d5fd48f5e1d2bbe4402c8 Mon Sep 17 00:00:00 2001
From: Hongjian Fan <hongjian.fan@seagate.com>
Date: Fri, 9 Aug 2024 08:16:44 -0500
Subject: [PATCH] patch: force endpoint even when there is no link

---
pkg/redfishapi/model_memory_chunks_v1_6_1_links.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/redfishapi/model_memory_chunks_v1_6_1_links.go b/pkg/redfishapi/model_memory_chunks_v1_6_1_links.go
index 6f6d6f2..176899b 100644
--- a/pkg/redfishapi/model_memory_chunks_v1_6_1_links.go
+++ b/pkg/redfishapi/model_memory_chunks_v1_6_1_links.go
@@ -18,10 +18,10 @@ type MemoryChunksV161Links struct {
CXLLogicalDevicesodataCount int64 `json:"CXLLogicalDevices@odata.count,omitempty"`

// An array of links to the endpoints that connect to this memory chunk.
- Endpoints []OdataV4IdRef `json:"Endpoints,omitempty"`
+ Endpoints []OdataV4IdRef `json:"Endpoints"` // manual change to force endpoint even when there is no link

// The number of items in a collection.
- EndpointsodataCount int64 `json:"Endpoints@odata.count,omitempty"`
+ EndpointsodataCount int64 `json:"Endpoints@odata.count"` // manual change to force endpoint even when there is no link

// An array of links to the memory regions for which this memory chunk provides capacity.
MemoryRegions []OdataV4IdRef `json:"MemoryRegions,omitempty"`
--
2.25.1

Loading
Loading