mininet icon indicating copy to clipboard operation
mininet copied to clipboard

RESTful API for Mininet GUI

Open tjworks opened this issue 11 years ago • 7 comments

Background:

I'm planning to write a Mininet GUI app that initially will be able to diagram the running Mininet network in browser(using D3/Cytoscape or some other visualization JS framework). The diagraming tool will be getting the network data from Mininet via this new RESTful API. Eventually the RESTful API will be able to also accept network changes so user can use the browser based GUI to create/modify the topology. In another word, any changes in the Mininet(using CLI or Python API) will be immediately shown on the GUI and any topology changes user made to the GUI will also be reflected in the running Mininet. Long term I also want to use this tool as a foundation to tackle the feature idea "Automated creation of virtual network based on real network".

About this issue:

This specific issue is a feature enhancement request to create a generic network management API that can be consumed over the HTTP, i.e., a RESTful API, or a WebSocket API. Sample REST API commands:

GET /api/network get the entire network topology POST /api/network post en entire topology

GET /api/network/node get list of all switches & hosts GET /api/network/link get list of all links

POST /api/network/node?xx=xx Add a new node with provided attributes ...

tjworks avatar Sep 06 '13 01:09 tjworks

Hi Tjworks, I'm currently working on "Automated creation of virtual network based on real network". I just wanted to understand how your RESTful API for Mininet will help you in tackling the feature idea? In real network you will have controllers and not Mininet. so Mininet RESTful API won't help you there.

Please let me know your approach. we can discuss it in mininet-discuss mailing list.

basavesh avatar Sep 06 '13 04:09 basavesh

Hello Basavesh, My approach is to define an abstracted network manipulate API. The API would be used by the GUI to receive data from and push topology change command to the network(whether virtual or real). There will be one client for each specific network, such as Mininet, Openflow based SDN network, etc. But I'm only focusing on the first stage, the visualization part right now. Do you have a project page/issue id describing your current work?

On Fri, Sep 6, 2013 at 12:59 AM, Basavesh Shivakumar < [email protected]> wrote:

Hi Tjworks, I'm currently working on "Automated creation of virtual network based on real network". I just wanted to understand how your RESTful API for Mininet will help you in tackling the feature idea? In real network you will have controllers and not Mininet. so Mininet RESTful API won't help you there.

Please let me know your approach. we can discuss it in mininet-discuss mailing list.

— Reply to this email directly or view it on GitHubhttps://github.com/mininet/mininet/issues/205#issuecomment-23918925 .

tjworks avatar Sep 06 '13 12:09 tjworks

It will be updated soon here https://github.com/mininet/mininet/wiki/Automatic-mininet-network-creation-based-on-a-real-network and you can have a look at my source code https://github.com/basavesh/gsoc13 Let's discuss in mininet-discuss mailing list and cc to [email protected]. I will mail the walkthrough

basavesh avatar Sep 06 '13 12:09 basavesh

great, looks like I may be able to take advantage of your work in the future.

On Fri, Sep 6, 2013 at 8:32 AM, Basavesh Shivakumar < [email protected]> wrote:

It will be updated soon here https://github.com/mininet/mininet/wiki/Automatic-mininet-network-creation-based-on-a-real-network and you can have a look at my source code https://github.com/basavesh/gsoc13 Let's discuss in mininet-discuss mailing list and cc to [email protected]. I will mail the walkthrough

— Reply to this email directly or view it on GitHubhttps://github.com/mininet/mininet/issues/205#issuecomment-23936579 .

tjworks avatar Sep 06 '13 17:09 tjworks

I found this issue when I was searching for a mininet Rest API. Since I didn't find anything, I decided to implement a simple Rest API for Mininet that at least cover my project requierements.

In case someone is interested: mininetRest

cgiraldo avatar Jun 11 '15 15:06 cgiraldo

We could add this as an example.

lantz avatar Jun 11 '15 20:06 lantz

I am working on a project with a title to design and simulate a digital twin of a network using mininet tool. I want to have two sperate networks where one is called a physical network and other virtual twin network. I want to achieve this, Incase l change the physical topology for example deleting a link, the virtual twin network should adapt immediately to the changes in the physical topology. I found this discussion useful to collect ideas that can help me to implement my project. However l can't find details, so please can l have them on this [email protected]

kiguligodfrey avatar May 18 '22 18:05 kiguligodfrey