diff --git a/controller/interfaces/networkdomain/pnd.go b/controller/interfaces/networkdomain/pnd.go deleted file mode 100644 index dccf0ab565d0b52a33df57b5465745e29e97347a..0000000000000000000000000000000000000000 --- a/controller/interfaces/networkdomain/pnd.go +++ /dev/null @@ -1,20 +0,0 @@ -package networkdomain - -import ( - "github.com/google/uuid" -) - -// NetworkDomain provides an interface for network domain implementations -// like principal network domain or logical network domain. -type NetworkDomain interface { - GetName() string - GetDescription() string - ID() uuid.UUID -} - -// LoadedPnd represents a PND that was loaded. -type LoadedPnd struct { - ID string `json:"id" bson:"_id,omitempty"` - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` -} diff --git a/controller/interfaces/networkdomain/pndService.go b/controller/interfaces/networkdomain/pndService.go deleted file mode 100644 index 4945f247d89b7817ae4cbc44c339d06b34101d95..0000000000000000000000000000000000000000 --- a/controller/interfaces/networkdomain/pndService.go +++ /dev/null @@ -1,13 +0,0 @@ -package networkdomain - -// // Service describes an interface for PND service implementation. -// type Service interface { -// Add(NetworkDomain) error -// Delete(NetworkDomain) error -// Get(model.Query) (NetworkDomain, error) -// GetAll() ([]NetworkDomain, error) -// // Note: Implement these in case we want to use cSBI again. -// // PendingChannels(id uuid.UUID, parseErrors ...error) (chan model.Details, error) -// // AddPendingChannel(id uuid.UUID, ch chan model.Details) -// // RemovePendingChannel(id uuid.UUID) -// } diff --git a/controller/interfaces/networkdomain/pndStore.go b/controller/interfaces/networkdomain/pndStore.go deleted file mode 100644 index 548ea284af3a8d4035ef22bce781f8c6f2e6259a..0000000000000000000000000000000000000000 --- a/controller/interfaces/networkdomain/pndStore.go +++ /dev/null @@ -1,18 +0,0 @@ -package networkdomain - -// // PndStore describes an interface for pnd store implementations. -// type PndStore interface { -// Add(NetworkDomain) error -// Delete(NetworkDomain) error -// Get(model.Query) (LoadedPnd, error) -// GetAll() ([]LoadedPnd, error) -// PendingChannels(id uuid.UUID, parseErrors ...error) (chan Details, error) -// AddPendingChannel(id uuid.UUID, ch chan Details) -// RemovePendingChannel(id uuid.UUID) -// } - -// type Details struct { -// ID string -// Address string -// TransportOption *tpb.TransportOption -// } diff --git a/controller/nucleus/domain/model/principalNetworkDomain.go b/controller/nucleus/domain/model/principalNetworkDomain.go index e5e3f53167720c85089654ccbc3c05eaa220496a..c151d01b78035d96e33c448ffd947433f30af268 100644 --- a/controller/nucleus/domain/model/principalNetworkDomain.go +++ b/controller/nucleus/domain/model/principalNetworkDomain.go @@ -3,8 +3,6 @@ package model import ( "go.mongodb.org/mongo-driver/bson" - "code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain" - "github.com/google/uuid" log "github.com/sirupsen/logrus" ) @@ -25,7 +23,7 @@ type LoadedPnd struct { } // NewPNDEntity creates a PND object as it is stored in the storage. -func NewPND(pndID uuid.UUID, name string, description string) networkdomain.NetworkDomain { +func NewPND(pndID uuid.UUID, name string, description string) NetworkDomain { pnd := &pndImplementation{ Id: pndID, Name: name, diff --git a/controller/nucleus/domain/ports/networkDomain.go b/controller/nucleus/domain/ports/networkDomain.go new file mode 100644 index 0000000000000000000000000000000000000000..0a1e10b13511ee47ad713ae38a097cab3dc760e2 --- /dev/null +++ b/controller/nucleus/domain/ports/networkDomain.go @@ -0,0 +1,11 @@ +package ports + +import "github.com/google/uuid" + +// NetworkDomain provides an interface for network domain implementations +// like principal network domain or logical network domain. +type NetworkDomain interface { + GetName() string + GetDescription() string + ID() uuid.UUID +}