From 9b3a32c8543cab5cce4fea7159e61f45ecd85cb3 Mon Sep 17 00:00:00 2001
From: Fabian Seidl <fabian.seidl@h-da.de>
Date: Wed, 29 Mar 2023 11:04:06 +0200
Subject: [PATCH] removed pnd from nbi object

---
 controller/api/initialise_test.go   | 1 -
 controller/controller.go            | 6 ------
 controller/northbound/server/nbi.go | 1 -
 3 files changed, 8 deletions(-)

diff --git a/controller/api/initialise_test.go b/controller/api/initialise_test.go
index 572a9baaf..867581cd8 100644
--- a/controller/api/initialise_test.go
+++ b/controller/api/initialise_test.go
@@ -235,7 +235,6 @@ func bootstrapUnitTest() {
 		rpb.NewPluginRegistryServiceClient(&grpc.ClientConn{}),
 		csbi.NewCsbiServiceClient(&grpc.ClientConn{}),
 		func(u uuid.UUID, c chan networkelement.Details) {},
-		&mockPnd,
 	)
 
 	cpb.RegisterCoreServiceServer(s, northbound.Core)
diff --git a/controller/controller.go b/controller/controller.go
index 78c14d1bc..ea90a12dc 100644
--- a/controller/controller.go
+++ b/controller/controller.go
@@ -199,11 +199,6 @@ func startGrpc() error {
 	jwtManager := rbacImpl.NewJWTManager(config.JWTSecret, config.JWTDuration)
 	setupGRPCServerWithCorrectSecurityLevel(jwtManager, c.userService, c.roleService)
 
-	basePnd, err := c.pndService.Get(store.Query{ID: config.BasePndUUID})
-	if err != nil {
-		panic(err)
-	}
-
 	c.nbi = nbi.NewNBI(
 		c.pndStore,
 		c.pndService,
@@ -221,7 +216,6 @@ func startGrpc() error {
 		c.pluginRegistryClient,
 		c.csbiClient,
 		callback,
-		basePnd,
 	)
 
 	pb.RegisterCoreServiceServer(c.grpcServer, c.nbi.Core)
diff --git a/controller/northbound/server/nbi.go b/controller/northbound/server/nbi.go
index 6a041bcf4..72bdc6301 100644
--- a/controller/northbound/server/nbi.go
+++ b/controller/northbound/server/nbi.go
@@ -58,7 +58,6 @@ func NewNBI(
 	pluginRegistryClient rpb.PluginRegistryServiceClient,
 	csbiClient cpb.CsbiServiceClient,
 	pndCallbackFn func(uuid.UUID, chan networkelement.Details),
-	networkDomain networkdomain.NetworkDomain,
 ) *NorthboundInterface {
 	return &NorthboundInterface{
 		Pnd:                     NewPndServer(pndService),
-- 
GitLab