![]() |
Open Kilda Java Documentation
|
Functions | |
def | cleanup () |
def | create_topology () |
def | test_ping (src_switch, src_port, src_vlan, dst_switch, dst_port, dst_vlan) |
def | print_ping_result (response, should_ping) |
def | call_pingagle (pingable, should_ping) |
def | test_scenario (name, pingable, psetup, pclear) |
def | test_single_switch_scenario () |
def | test_two_switch_scenario () |
def | test_three_switch_scenario () |
def | main () |
Variables | |
logger = logging.getLogger(__name__) | |
dictionary | topo_json |
string | s2 = "00000002" |
string | s3 = "00000003" |
string | s4 = "00000004" |
string | s5 = "00000005" |
string | s6 = "00000006" |
mininet_rest_test.py: Validate mininet_rest works within the mininet framework, focused on PING This will launch an example network, with switches and hosts and rules, confirming that ping will work across hosts that are connected properly. Dependencies: This class depends on a controller - it is best to launch both mininet and floodlight. $ docker-compose up -d mininet floodlight If possible, bring up the entire kilda controller. Usage (example uses VLAN ID=1000): From the command line - run as a MODULE so that mininet_rest can be imported) cd /; python -m app.examples.mininet_rest_test
def mininet_rest_test.call_pingagle | ( | pingable, | |
should_ping | |||
) |
Definition at line 131 of file mininet_rest_test.py.
def mininet_rest_test.cleanup | ( | ) |
Definition at line 95 of file mininet_rest_test.py.
def mininet_rest_test.create_topology | ( | ) |
Definition at line 100 of file mininet_rest_test.py.
def mininet_rest_test.main | ( | ) |
Definition at line 229 of file mininet_rest_test.py.
def mininet_rest_test.print_ping_result | ( | response, | |
should_ping | |||
) |
Definition at line 116 of file mininet_rest_test.py.
def mininet_rest_test.test_ping | ( | src_switch, | |
src_port, | |||
src_vlan, | |||
dst_switch, | |||
dst_port, | |||
dst_vlan | |||
) |
setup our rules for host / switch / switch and see if we can ping
Definition at line 105 of file mininet_rest_test.py.
def mininet_rest_test.test_scenario | ( | name, | |
pingable, | |||
psetup, | |||
pclear | |||
) |
Definition at line 141 of file mininet_rest_test.py.
def mininet_rest_test.test_single_switch_scenario | ( | ) |
This test is similar to the Kilda single switch test(s), but without kilda issuing the rules. The intent is to confirm that the test harness works (ie pingable works as intended), but also serve as an example of what the rules may look like for the kilda deployment. Examples: # flows without transit vlans and intermediate switches | flow_id | source_switch | source_port | source_vlan | destination_switch | destination_port | destination_vlan | bandwidth | | c1none | de:ad:be:ef:00:00:00:03 | 1 | 0 | de:ad:be:ef:00:00:00:03 | 2 | 0 | 10000 |
Definition at line 171 of file mininet_rest_test.py.
def mininet_rest_test.test_three_switch_scenario | ( | ) |
Examples: # flows with transit vlans and intermediate switches | flow_id | source_switch | source_port | source_vlan | destination_switch | destination_port | destination_vlan | bandwidth | | c3none | de:ad:be:ef:00:00:00:02 | 1 | 0 | de:ad:be:ef:00:00:00:04 | 2 | 0 | 10000 |
Definition at line 208 of file mininet_rest_test.py.
def mininet_rest_test.test_two_switch_scenario | ( | ) |
Examples: # flows with transit vlans and without intermediate switches | flow_id | source_switch | source_port | source_vlan | destination_switch | destination_port | destination_vlan | bandwidth | | c2none | de:ad:be:ef:00:00:00:03 | 1 | 0 | de:ad:be:ef:00:00:00:04 | 2 | 0 | 10000 |
Definition at line 189 of file mininet_rest_test.py.
mininet_rest_test.logger = logging.getLogger(__name__) |
Definition at line 26 of file mininet_rest_test.py.
string mininet_rest_test.s2 = "00000002" |
Definition at line 164 of file mininet_rest_test.py.
string mininet_rest_test.s3 = "00000003" |
Definition at line 165 of file mininet_rest_test.py.
string mininet_rest_test.s4 = "00000004" |
Definition at line 166 of file mininet_rest_test.py.
string mininet_rest_test.s5 = "00000005" |
Definition at line 167 of file mininet_rest_test.py.
string mininet_rest_test.s6 = "00000006" |
Definition at line 168 of file mininet_rest_test.py.
dictionary mininet_rest_test.topo_json |
Definition at line 28 of file mininet_rest_test.py.