Skip to content
Snippets Groups Projects
Commit d8824d8b authored by Martin Stiemerling's avatar Martin Stiemerling
Browse files

first call to some tapi functions.

parent 4a313899
No related branches found
No related tags found
2 merge requests!30Gosdn cli features flow,!18Develop
......@@ -43,6 +43,7 @@ var commandList = map[string] commandOptions {
"hello": {"hello", "test connection to goSDN controller", goSDNSayHello},
"shutdown": {"shutdown", "request goSDN controller to shutdown", goSDNShutdown},
"testdb" : {"testdb", "test all database connections", goSDNTestDB},
"tapigetnodes" : {"testdb", "test all database connections", goSDNTestDB},
}
/*
......
......@@ -9,6 +9,7 @@ package nucleus
import (
pb "code.fbi.h-da.de/cocsn/gosdn/cliInterface"
"code.fbi.h-da.de/cocsn/gosdn/restconf/client/ciena"
"context"
"google.golang.org/grpc"
"log"
......@@ -52,17 +53,18 @@ func getCLIGoing(core *Core) {
// SBI specific calls, by now TAPI only
func (s *server) TAPIGetEdge(ctx context.Context, in *pb.TAPIRequest) (*pb.TAPIReply, error) {
log.Printf("Received: %v", in.GetName())
s2 := s.core.clients["ciena-mcp"]
s2.GetConfig()
s.core.clients["ciena-mcp"].(*ciena.MCPClient).GetNodes()
return &pb.TAPIReply{Message: "Done"}, nil
}
func (s *server) TAPIGetEdgeNode(ctx context.Context, in *pb.TAPIRequest) (*pb.TAPIReply, error) {
log.Printf("Received: %v", in.GetName())
s.core.clients["ciena-mcp"].(*ciena.MCPClient).GetNodeEdgePoints()
return &pb.TAPIReply{Message: "Done"}, nil
}
func (s *server) TAPIGetLink(ctx context.Context, in *pb.TAPIRequest) (*pb.TAPIReply, error) {
log.Printf("Received: %v", in.GetName())
s.core.clients["ciena-mcp"].(*ciena.MCPClient).GetConnections()
return &pb.TAPIReply{Message: "Done"}, nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment