Newer
Older
Andre Sterba
committed
"code.fbi.h-da.de/danet/gosdn/controller/app"
"code.fbi.h-da.de/danet/gosdn/controller/interfaces/networkdomain"
rbacInterfaces "code.fbi.h-da.de/danet/gosdn/controller/interfaces/rbac"
"code.fbi.h-da.de/danet/gosdn/controller/rbac"
"code.fbi.h-da.de/danet/gosdn/controller/topology"
"code.fbi.h-da.de/danet/gosdn/controller/topology/nodes"
"code.fbi.h-da.de/danet/gosdn/controller/topology/ports"
Andre Sterba
committed
routingtables "code.fbi.h-da.de/danet/gosdn/controller/topology/routing-tables"
"code.fbi.h-da.de/danet/gosdn/controller/metrics"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
// NorthboundInterface is the representation of the
// gRPC services used provided.
type NorthboundInterface struct {
Pnd *PndServer
Core *CoreServer
Csbi *CsbiServer
Sbi *SbiServer
Auth *AuthServer
User *UserServer
Role *RoleServer
Topology *TopologyServer
App *AppServer
NetworkElement *NetworkElementServer
Routes *RoutingTableServiceServer
ConfigurationManagement *ConfigurationManagementServer
// NewNBI receives a PndStore and returns a new gRPC *NorthboundInterface.
func NewNBI(
pnds networkdomain.PndStore,
users rbacInterfaces.UserService,
roles rbacInterfaces.RoleService,
jwt rbac.JWTManager,
topologyService topology.Service,
nodeService nodes.Service,
portService ports.Service,
Andre Sterba
committed
routeService routingtables.Service,
apps app.ManagementService,
networkDomain networkdomain.NetworkDomain,
) *NorthboundInterface {
Pnd: NewPndServer(pnds),
Core: NewCoreServer(pnds),
Csbi: NewCsbiServer(pnds),
Sbi: NewSbiServer(pnds),
Auth: NewAuthServer(&jwt, users),
User: NewUserServer(&jwt, users),
Role: NewRoleServer(&jwt, roles),
Topology: NewTopologyServer(topologyService, nodeService, portService),
App: NewAppServer(apps),
NetworkElement: NewNetworkElementServer(networkDomain),
Routes: NewRoutingTableServiceServer(routeService, nodeService, portService),
ConfigurationManagement: NewConfigurationManagementServer(pnds, topologyService, nodeService, portService),