From 9d6a137de0ec00b3b4920ee2e6df19fc10818a4a Mon Sep 17 00:00:00 2001 From: neaggarwMS <31906480+neaggarwMS@users.noreply.github.com> Date: Tue, 21 Jul 2020 17:35:29 -0700 Subject: [PATCH] Fix build --- Makefile | 3 +++ cns/cnsclient/httpapi/client.go | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a2610e254..51dac692c 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,9 @@ CNSFILES = \ $(wildcard cns/routes/*.go) \ $(wildcard cns/service/*.go) \ $(wildcard cns/networkcontainers/*.go) \ + $(wildcard cns/requestcontroller/*.go) \ + $(wildcard cns/requestcontroller/kubecontroller/*.go) \ + $(wildcard cns/requestcontroller/example/*.go) \ $(COREFILES) \ $(CNMFILES) diff --git a/cns/cnsclient/httpapi/client.go b/cns/cnsclient/httpapi/client.go index 59d5e0a68..396a1f758 100644 --- a/cns/cnsclient/httpapi/client.go +++ b/cns/cnsclient/httpapi/client.go @@ -1,6 +1,8 @@ package httpapi import ( + "fmt" + "github.com/Azure/azure-container-networking/cns" "github.com/Azure/azure-container-networking/cns/restserver" ) @@ -12,10 +14,10 @@ type Client struct { // CreateOrUpdateNC updates cns state func (client *Client) CreateOrUpdateNC(ncRequest *cns.CreateNetworkContainerRequest) error { - returnCode := client.RestService.CreateOrUpdateNetworkContainerInternal(ncRequest) + returnCode := client.RestService.CreateOrUpdateNetworkContainerInternal(*ncRequest) if returnCode != 0 { - return false + return fmt.Errorf("Failed to Create NC request: %+v, errorCode: %d", *ncRequest, returnCode) } return nil