diff --git a/nucleus/principalNetworkDomain.go b/nucleus/principalNetworkDomain.go index f105f8980ee52e6a5eb8d4fc5228004b02f4ba68..f77f544dca7f7fe9813cbc53e88ecdb105a88179 100644 --- a/nucleus/principalNetworkDomain.go +++ b/nucleus/principalNetworkDomain.go @@ -1,6 +1,18 @@ package nucleus +import "code.fbi.h-da.de/cocsn/gosdn/nucleus/interfaces" + type pndImplementation struct { + name string + sbiContainer []interfaces.SouthboundInterface +} + +//NewPNDImplementation creates a Principle Network Domain +func NewPNDImplementation(name string, sbi ...interfaces.SouthboundInterface) interfaces.PrincipalNetworkDomain { + return &pndImplementation{ + name: name, + sbiContainer: sbi, + } } // Interface satisfaction diff --git a/sbi/restconf/southboundInterface.go b/sbi/restconf/southboundInterface.go index 18b40efbdf555c5c3110f55333205482029766ea..1eae1e67bebe9b29aa969b4cf6fb7ae2b42de1a6 100644 --- a/sbi/restconf/southboundInterface.go +++ b/sbi/restconf/southboundInterface.go @@ -1,6 +1,18 @@ package restconf +import "code.fbi.h-da.de/cocsn/gosdn/nucleus/interfaces" + type southboundInterface struct { + name string + clientContainer []interfaces.Client +} + +//NewSouthboundInterface creates a Southbound Interface +func NewSouthboundInterface(name string, clients ...interfaces.Client) interfaces.SouthboundInterface { + return &southboundInterface{ + name: name, + clientContainer: clients, + } } // Interface satisfaction @@ -16,7 +28,7 @@ func (sbi *southboundInterface) CollectHeartbeats() error { return collectHeartbeats() } -func (sbi *southboundInterface) ListClients() error { +func (sbi *southboundInterface) ListClients() map[int]interfaces.Client { return listClients() } @@ -34,6 +46,6 @@ func collectHeartbeats() error { return nil } -func listClients() error { +func listClients() map[int]interfaces.Client { return nil }