This commit is contained in:
neaggarwMS 2020-07-21 17:35:29 -07:00
Родитель a988ebdb86
Коммит 9d6a137de0
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -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