diff --git a/controller/nucleus/pndFilesystemStore.go b/controller/nucleus/pndFilesystemStore.go index 5b965128def39ce565585fcd24557ff1fb9990d9..ea74c4e5e3f612eeea5b6d2cb5dff2486246b14e 100644 --- a/controller/nucleus/pndFilesystemStore.go +++ b/controller/nucleus/pndFilesystemStore.go @@ -5,7 +5,6 @@ import ( "os" "sync" - cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" "code.fbi.h-da.de/danet/gosdn/controller/customerrs" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" @@ -13,18 +12,15 @@ import ( "code.fbi.h-da.de/danet/gosdn/controller/store" "github.com/google/uuid" log "github.com/sirupsen/logrus" - "github.com/spf13/viper" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" ) // FilesystemPndStore provides a filesystem implementation for a pnd store. type FilesystemPndStore struct { pendingChannels map[uuid.UUID]chan networkelement.Details pluginService plugin.Service - csbiClient cpb.CsbiServiceClient - pathToPndFile string - fileMutex sync.Mutex + // csbiClient cpb.CsbiServiceClient + pathToPndFile string + fileMutex sync.Mutex } // NewFilesystemPndStore returns a filesystem implementation for a pnd store. @@ -197,26 +193,26 @@ func (t *FilesystemPndStore) RemovePendingChannel(id uuid.UUID) { delete(t.pendingChannels, id) } -func (t *FilesystemPndStore) callback(id uuid.UUID, ch chan networkelement.Details) { - if ch != nil { - t.AddPendingChannel(id, ch) - log.Infof("pending channel %v added", id) - } else { - t.RemovePendingChannel(id) - log.Infof("pending channel %v removed", id) - } -} - -func (t *FilesystemPndStore) getCsbiClient() (cpb.CsbiServiceClient, error) { - if t.csbiClient == nil { - orchestrator := viper.GetString("csbi-orchestrator") - conn, err := grpc.Dial(orchestrator, grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - return nil, err - } - - t.csbiClient = cpb.NewCsbiServiceClient(conn) - } - - return t.csbiClient, nil -} +// func (t *FilesystemPndStore) callback(id uuid.UUID, ch chan networkelement.Details) { +// if ch != nil { +// t.AddPendingChannel(id, ch) +// log.Infof("pending channel %v added", id) +// } else { +// t.RemovePendingChannel(id) +// log.Infof("pending channel %v removed", id) +// } +// } + +// func (t *FilesystemPndStore) getCsbiClient() (cpb.CsbiServiceClient, error) { +// if t.csbiClient == nil { +// orchestrator := viper.GetString("csbi-orchestrator") +// conn, err := grpc.Dial(orchestrator, grpc.WithTransportCredentials(insecure.NewCredentials())) +// if err != nil { +// return nil, err +// } + +// t.csbiClient = cpb.NewCsbiServiceClient(conn) +// } + +// return t.csbiClient, nil +// } diff --git a/controller/nucleus/principalNetworkDomain.go b/controller/nucleus/principalNetworkDomain.go index 4faecb1265108367a9d0c34d868866258d95eff2..f2ecf4fd7d68f4cea0137e8a7f1051834be8c285 100644 --- a/controller/nucleus/principalNetworkDomain.go +++ b/controller/nucleus/principalNetworkDomain.go @@ -3,10 +3,7 @@ package nucleus import ( "go.mongodb.org/mongo-driver/bson" - cpb "code.fbi.h-da.de/danet/gosdn/api/go/gosdn/csbi" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkelement" "github.com/google/uuid" log "github.com/sirupsen/logrus" @@ -49,8 +46,8 @@ type pndImplementation struct { //nolint Id uuid.UUID `json:"id,omitempty"` - csbiClient cpb.CsbiServiceClient - callback func(uuid.UUID, chan networkelement.Details) + // csbiClient cpb.CsbiServiceClient + // callback func(uuid.UUID, chan networkelement.Details) } func (pnd *pndImplementation) ID() uuid.UUID {