diff --git a/gosdn-cli/gosdn-cli.go b/gosdn-cli/gosdn-cli.go index fe81e0ecbb0de4651e6c4ea01122be20861061af..0716fc26b4e912a23e14342db6d58566be11908d 100644 --- a/gosdn-cli/gosdn-cli.go +++ b/gosdn-cli/gosdn-cli.go @@ -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}, } /* diff --git a/nucleus/cli-handling.go b/nucleus/cli-handling.go index d3422db41470abb39c33c772e73a14a842971e98..86392b8214c5d3c71ad2a9987ac02c776ba04dac 100644 --- a/nucleus/cli-handling.go +++ b/nucleus/cli-handling.go @@ -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 }