From b13bf42469205daced53b523752d04b32d7cf469 Mon Sep 17 00:00:00 2001 From: Mengling Ding Date: Thu, 10 Oct 2024 14:22:42 -0500 Subject: [PATCH] fix: fix the return mismatch onr appliance rename in cfm-service --- pkg/api/api_default_service.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/api/api_default_service.go b/pkg/api/api_default_service.go index 0019460..422cd38 100644 --- a/pkg/api/api_default_service.go +++ b/pkg/api/api_default_service.go @@ -167,7 +167,19 @@ func (cfm *CfmApiService) AppliancesUpdateById(ctx context.Context, applianceId return formatErrorResp(ctx, err.(*common.RequestError)) } - return openapi.Response(http.StatusOK, newAppliance), nil + a := openapi.Appliance{ + Id: newAppliance.Id, + IpAddress: "", // Unused + Port: 0, // Unused + Status: "", // Unused + Blades: openapi.MemberItem{ + Uri: manager.GetCfmUriBlades(newAppliance.Id), + }, + TotalMemoryAvailableMiB: 0, + TotalMemoryAllocatedMiB: 0, + } + + return openapi.Response(http.StatusOK, a), nil } // AppliancesResync -