Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom dynamic topology #64

Open
jdarkf opened this issue Mar 20, 2019 · 0 comments
Open

Custom dynamic topology #64

jdarkf opened this issue Mar 20, 2019 · 0 comments

Comments

@jdarkf
Copy link

jdarkf commented Mar 20, 2019

Hi,
I would like to use a dynamic topology with p4app, meaning that it depends on some inputs given by the user: number of hosts and switches, and the links to set. Thanks to a python script, the inputs are gathered, and nodes and links are created accordingly with the methods addSwitch(), addHost() and addLink() of the class AppTopo. The used manifest file is similar to the one in the example "p4app/examples/customtopo.p4app", however no link is defined in it since links are not known yet.

When running, all nodes and links defined as inputs seem to be created: the Mininet command "nodes" returns all nodes, and the command "net" returns all links.
However, if "auto-control-plane" variable is set to True, or when trying to implement a controller module (with the class AppController), a KeyError is returned indicating that it doesn't find the node as a key in the dictionary "self.topo._host_links" when the node is a host. I guess it would give the same error for switches and the dictionary "self.topo._sw_links".

proof1

I guess I don't have to create an instance of the class Mininet as the "multiswitch" target is directly fed with the "topo_module" and the "controller_module" (identically to the "customtopo" example).

It seems to me as if the only way to populate the two mentioned dictionaries is by indicating the links in the manifest file, but the problem is that they're not known by the programmer.

Is there any method allowing to populate these dictionaries?
Any help is welcome. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant