Skip to content

Setup a HTTP-REST-API

The currently used gRPC northbound interface of the goSDN controller is proving somewhat difficult to use. Especially concerning a web application, a REST API could probably simplify the handling of the controller.

A first approach would be to extend/replace the already existing HTTP server [1] with a web framework, e.g., Gin [2], and thus provide a basic API. For the initial phase, routes (CRUD-based) for Principal Network Domains and Orchestrated Networking Devices are an excellent choice.

For guidance on creating a new PND, the gRPC server implementations could be a good place to start (such as [3]).

[1] https://code.fbi.h-da.de/danet/gosdn/-/blob/f9bc8eba7c14bdb5af66370393e8106d95bb9e48/http.go

[2] https://github.com/gin-gonic/gin

[3] https://code.fbi.h-da.de/danet/gosdn/-/blob/f9bc8eba7c14bdb5af66370393e8106d95bb9e48/northbound/server/core.go#L64

Edited by Ghost User