From 183fd0ad339de132fb8c285af2cc577e3f3a16c2 Mon Sep 17 00:00:00 2001 From: Ming Zhang Date: Tue, 3 May 2022 15:50:01 -0400 Subject: [PATCH 1/2] change the field name to NumCores, so that it can be correctly decode in dnc side --- cns/NetworkContainerContract.go | 2 +- cns/service/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cns/NetworkContainerContract.go b/cns/NetworkContainerContract.go index d2de05bfa4..7cbdfe1f24 100644 --- a/cns/NetworkContainerContract.go +++ b/cns/NetworkContainerContract.go @@ -573,6 +573,6 @@ type NodeInfoResponse struct { // NodeRegisterRequest - Struct to hold the node register request. type NodeRegisterRequest struct { - NumCPU int + NumCores int NmAgentSupportedApis []string } diff --git a/cns/service/main.go b/cns/service/main.go index a70d27f845..7c5c900415 100644 --- a/cns/service/main.go +++ b/cns/service/main.go @@ -306,7 +306,7 @@ func registerNode(httpc *http.Client, httpRestService cns.HTTPService, dncEP, in nodeRegisterRequest cns.NodeRegisterRequest ) - nodeRegisterRequest.NumCPU = numCPU + nodeRegisterRequest.NumCores = numCPU supportedApis, retErr := nmagent.GetNmAgentSupportedApis(httpc, "") if retErr != nil { From 6569fea6396509b4dd0e9f3586cf18d1fd1fbc15 Mon Sep 17 00:00:00 2001 From: Ming Zhang Date: Tue, 3 May 2022 15:50:01 -0400 Subject: [PATCH 2/2] fix lint issue --- cns/NetworkContainerContract.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cns/NetworkContainerContract.go b/cns/NetworkContainerContract.go index 7cbdfe1f24..ae57a204f8 100644 --- a/cns/NetworkContainerContract.go +++ b/cns/NetworkContainerContract.go @@ -573,6 +573,6 @@ type NodeInfoResponse struct { // NodeRegisterRequest - Struct to hold the node register request. type NodeRegisterRequest struct { - NumCores int + NumCores int NmAgentSupportedApis []string }