intracom-telecom-sdn / multinet

Large-scale SDN emulator based on Mininet
Eclipse Public License 1.0
15 stars 3 forks source link

Add "get total flows" endpoint #30

Closed konstantinos-papadopoulos closed 8 years ago

konstantinos-papadopoulos commented 8 years ago

For testing new functionality

  1. launch ie three workers with IPs 192.168.100.21,192.168.100.22,192.168.100.23
  2. bin/deploy --json-config config/config.json
  3. bin/handlers/init_topos --json-config config/config.json
  4. bin/handlers/start_topos --json-config config/config.json

add some flows to the switches of each worker ie if 10 switches per worker and number of workers =3

Worker 1

sudo ovs-ofctl -O OpenFlow13 add-flow 1 'priority=2,icmp,actions=CONTROLLER:65535'
sudo ovs-ofctl -O OpenFlow13 add-flow 1 'priority=2,ip,actions=CONTROLLER:65535'
sudo ovs-ofctl -O OpenFlow13 add-flow 1 'priority=2,arp,actions=CONTROLLER:65535'

Worker 3

sudo ovs-ofctl -O OpenFlow13 add-flow 21 'priority=2,icmp,actions=CONTROLLER:65535'
sudo ovs-ofctl -O OpenFlow13 add-flow 22 'priority=2,ip,actions=CONTROLLER:65535'
sudo ovs-ofctl -O OpenFlow13 add-flow 23 'priority=2,arp,actions=CONTROLLER:65535'
  1. bin/handlers/get_flows --json-config config/config.json

Results should be

["{\"dpid-0\": 3}", "{\"dpid-1\": 0}", "{\"dpid-2\": 3}"]
konstantinos-papadopoulos commented 8 years ago

Under file ''multinet/multinet_src/multi/worker.py' l.107

> dpid_key = 'number-of-flows-on-worker-{0}'.format(MININET_TOPO._dpid_offset)

Results should be

["{\"number-of-flows-on-worker-0\": 3}", "{\"number-of-flows-on-worker-1\": 0}", "{\"number-of-flows-on-worker-2\": 3}"]

Should now be ok