Skip to content
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
2 changes: 1 addition & 1 deletion cns/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func addTestStateToRestServer(t *testing.T, secondaryIps []string) {
secondaryIPConfigs[ipId.String()] = secIpConfig
}

req := cns.CreateNetworkContainerRequest{
req := &cns.CreateNetworkContainerRequest{
NetworkContainerType: dockerContainerType,
NetworkContainerid: "testNcId1",
IPConfiguration: ipConfig,
Expand Down
64 changes: 0 additions & 64 deletions cns/client/httpapi/client.go

This file was deleted.

4 changes: 2 additions & 2 deletions cns/multitenantcontroller/mockclients/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ MOCKGEN = $(TOOLS_BIN_DIR)/mockgen
.PHONY: generate

generate: $(MOCKGEN) ## Generate mock clients
$(MOCKGEN) -source=$(REPO_ROOT)/cns/cnsclient/apiclient.go -package=mockclients APIClient > cnsclient_generated.go
$(MOCKGEN) -source=$(REPO_ROOT)/cns/multitenantcontroller/multitenantoperator/multitenantcrdreconciler.go -package=mockclients cnsRESTservice > cnsrestservice_generated.go
$(MOCKGEN) -source=$(REPO_ROOT)/vendor/sigs.k8s.io/controller-runtime/pkg/client/interfaces.go -package=mockclients Client > kubeclient_generated.go
@sed -i s,$(REPO_ROOT)/,,g cnsclient_generated.go kubeclient_generated.go
@sed -i s,$(REPO_ROOT)/,,g cnsrestservice_generated.go kubeclient_generated.go

$(MOCKGEN):
@make -C $(REPO_ROOT) $(MOCKGEN)
108 changes: 0 additions & 108 deletions cns/multitenantcontroller/mockclients/cnsclient_generated.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions cns/multitenantcontroller/multitenantoperator/cnsclient.go

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"sync"

"github.com/Azure/azure-container-networking/cns/client/httpapi"
"github.com/Azure/azure-container-networking/cns/logger"
"github.com/Azure/azure-container-networking/cns/multitenantcontroller"
"github.com/Azure/azure-container-networking/cns/restserver"
Expand All @@ -31,8 +30,7 @@ var _ (multitenantcontroller.RequestController) = (*requestController)(nil)
type requestController struct {
mgr manager.Manager // Manager starts the reconcile loop which watches for crd status changes
KubeClient client.Client // KubeClient is a cached client which interacts with API server
CNSClient cnsclient
nodeName string // name of node running this program
nodeName string // name of node running this program
Reconciler *multiTenantCrdReconciler
Started bool
lock sync.Mutex
Expand Down Expand Up @@ -72,16 +70,11 @@ func New(restService *restserver.HTTPRestService, kubeconfig *rest.Config) (*req
return nil, err
}

// Create httpClient
httpClient := &httpapi.Client{
RestService: restService,
}

// Create multiTenantCrdReconciler
reconciler := &multiTenantCrdReconciler{
KubeClient: mgr.GetClient(),
NodeName: nodeName,
CNSClient: httpClient,
KubeClient: mgr.GetClient(),
NodeName: nodeName,
CNSRestService: restService,
}
if err := reconciler.SetupWithManager(mgr); err != nil {
logger.Errorf("Error setting up new multiTenantCrdReconciler: %v", err)
Expand All @@ -92,7 +85,6 @@ func New(restService *restserver.HTTPRestService, kubeconfig *rest.Config) (*req
return &requestController{
mgr: mgr,
KubeClient: mgr.GetClient(),
CNSClient: httpClient,
nodeName: nodeName,
Reconciler: reconciler,
}, nil
Expand Down
Loading