Skip to content
Snippets Groups Projects
Commit 20095d7f authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'pr-p4-ref' into 'develop'

fix: hardcoded paths in p4 L1 fwd test

See merge request !291
parents 9179d075 9f343bb5
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!291fix: hardcoded paths in p4 L1 fwd test
...@@ -73,12 +73,12 @@ class TutorialTopo(Topo): ...@@ -73,12 +73,12 @@ class TutorialTopo(Topo):
def main(): def main():
net = Mininet(topo=TutorialTopo(), controller=None) net = Mininet(topo=TutorialTopo(), controller=None)
net.start() net.start()
client = net.hosts[0] client = net.hosts[0]
client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22')
server = net.hosts[1] server = net.hosts[1]
server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11')
CLI(net) CLI(net)
net.stop() net.stop()
print '#' * 80 print '#' * 80
......
...@@ -70,13 +70,13 @@ class TutorialTopo(Topo): ...@@ -70,13 +70,13 @@ class TutorialTopo(Topo):
ip='10.0.0.1/24', gw='10.0.0.100') ip='10.0.0.1/24', gw='10.0.0.100')
server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22",
ip='10.0.0.2/24', gw='10.0.0.100') ip='10.0.0.2/24', gw='10.0.0.100')
# Switch links # Switch links
self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1
self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1 self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1
self.addLink(switch2, switch4) # Switch2:port 2, Switch4:port 1 self.addLink(switch2, switch4) # Switch2:port 2, Switch4:port 1
self.addLink(switch3, switch4) # Switch3:port 2, Switch4:port 2 self.addLink(switch3, switch4) # Switch3:port 2, Switch4:port 2
# Host links # Host links
self.addLink(client, switch1) # Switch 1: port 3 self.addLink(client, switch1) # Switch 1: port 3
self.addLink(server, switch4) # Switch 4: port 3 self.addLink(server, switch4) # Switch 4: port 3
...@@ -84,12 +84,12 @@ class TutorialTopo(Topo): ...@@ -84,12 +84,12 @@ class TutorialTopo(Topo):
def main(): def main():
net = Mininet(topo=TutorialTopo(), controller=None) net = Mininet(topo=TutorialTopo(), controller=None)
net.start() net.start()
client = net.hosts[0] client = net.hosts[0]
client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22')
server = net.hosts[1] server = net.hosts[1]
server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11')
CLI(net) CLI(net)
net.stop() net.stop()
print '#' * 80 print '#' * 80
......
...@@ -74,7 +74,7 @@ class TutorialTopo(Topo): ...@@ -74,7 +74,7 @@ class TutorialTopo(Topo):
ip='10.0.0.1/24', gw='10.0.0.100') ip='10.0.0.1/24', gw='10.0.0.100')
server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22",
ip='10.0.0.2/24', gw='10.0.0.100') ip='10.0.0.2/24', gw='10.0.0.100')
# Switch links # Switch links
self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1
self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1 self.addLink(switch1, switch3) # Switch1:port 2, Switch3:port 1
...@@ -84,7 +84,7 @@ class TutorialTopo(Topo): ...@@ -84,7 +84,7 @@ class TutorialTopo(Topo):
self.addLink(switch4, switch6) # Switch4:port 2, Switch6:port 1 self.addLink(switch4, switch6) # Switch4:port 2, Switch6:port 1
self.addLink(switch5, switch6) # Switch5:port 2, Switch6:port 2 self.addLink(switch5, switch6) # Switch5:port 2, Switch6:port 2
# Host links # Host links
self.addLink(client, switch1) # Switch1: port 3 self.addLink(client, switch1) # Switch1: port 3
self.addLink(server, switch6) # Switch6: port 3 self.addLink(server, switch6) # Switch6: port 3
...@@ -92,12 +92,12 @@ class TutorialTopo(Topo): ...@@ -92,12 +92,12 @@ class TutorialTopo(Topo):
def main(): def main():
net = Mininet(topo=TutorialTopo(), controller=None) net = Mininet(topo=TutorialTopo(), controller=None)
net.start() net.start()
client = net.hosts[0] client = net.hosts[0]
client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22')
server = net.hosts[1] server = net.hosts[1]
server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11')
CLI(net) CLI(net)
net.stop() net.stop()
print '#' * 80 print '#' * 80
......
...@@ -79,7 +79,7 @@ class TutorialTopo(Topo): ...@@ -79,7 +79,7 @@ class TutorialTopo(Topo):
ip='10.0.0.1/24', gw='10.0.0.100') ip='10.0.0.1/24', gw='10.0.0.100')
server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22", server = self.addHost('server', cls=IPv4Host, mac="aa:bb:cc:dd:ee:22",
ip='10.0.0.2/24', gw='10.0.0.100') ip='10.0.0.2/24', gw='10.0.0.100')
# Switch links # Switch links
self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1 self.addLink(switch1, switch2) # Switch1:port 1, Switch2:port 1
self.addLink(switch1, switch4) # Switch1:port 2, Switch4:port 1 self.addLink(switch1, switch4) # Switch1:port 2, Switch4:port 1
...@@ -92,7 +92,7 @@ class TutorialTopo(Topo): ...@@ -92,7 +92,7 @@ class TutorialTopo(Topo):
self.addLink(switch3, switch8) # Switch3:port 2, Switch8:port 1 self.addLink(switch3, switch8) # Switch3:port 2, Switch8:port 1
self.addLink(switch5, switch8) # Switch5:port 2, Switch8:port 2 self.addLink(switch5, switch8) # Switch5:port 2, Switch8:port 2
self.addLink(switch7, switch8) # Switch7:port 2, Switch8:port 3 self.addLink(switch7, switch8) # Switch7:port 2, Switch8:port 3
# Host links # Host links
self.addLink(client, switch1) # Switch1: port 4 self.addLink(client, switch1) # Switch1: port 4
self.addLink(server, switch8) # Switch8: port 4 self.addLink(server, switch8) # Switch8: port 4
...@@ -100,13 +100,13 @@ class TutorialTopo(Topo): ...@@ -100,13 +100,13 @@ class TutorialTopo(Topo):
def main(): def main():
net = Mininet(topo=TutorialTopo(), controller=None) net = Mininet(topo=TutorialTopo(), controller=None)
net.start() net.start()
#get hosts #get hosts
client = net.hosts[0] client = net.hosts[0]
client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22') client.setARP('10.0.0.2', 'aa:bb:cc:dd:ee:22')
server = net.hosts[1] server = net.hosts[1]
server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11') server.setARP('10.0.0.1', 'aa:bb:cc:dd:ee:11')
CLI(net) CLI(net)
net.stop() net.stop()
print '#' * 80 print '#' * 80
......
...@@ -18,5 +18,4 @@ ...@@ -18,5 +18,4 @@
# - tfs_runtime_env_vars.sh # - tfs_runtime_env_vars.sh
source tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh
python -m pytest --verbose src/tests/p4/tests/test_functional_bootstrap.py python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_bootstrap.py
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# limitations under the License. # limitations under the License.
source tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh
python -m pytest --verbose src/tests/p4/tests/test_functional_create_service.py python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_create_service.py
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# limitations under the License. # limitations under the License.
source tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh
python -m pytest --verbose src/tests/p4/tests/test_functional_delete_service.py python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_delete_service.py
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# limitations under the License. # limitations under the License.
source tfs_runtime_env_vars.sh source tfs_runtime_env_vars.sh
python -m pytest --verbose src/tests/p4/tests/test_functional_cleanup.py python -m pytest --verbose src/tests/p4-fwd-l1/tests/test_functional_cleanup.py
...@@ -18,5 +18,5 @@ export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}') ...@@ -18,5 +18,5 @@ export POD_NAME=$(kubectl get pods -n=tfs | grep device | awk '{print $1}')
kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir /root/p4 kubectl exec ${POD_NAME} -n=tfs -c=server -- mkdir /root/p4
kubectl cp src/tests/p4/p4/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server kubectl cp src/tests/p4-fwd-l1/p4/p4info.txt tfs/${POD_NAME}:/root/p4 -c=server
kubectl cp src/tests/p4/p4/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server kubectl cp src/tests/p4-fwd-l1/p4/bmv2.json tfs/${POD_NAME}:/root/p4 -c=server
...@@ -506,7 +506,7 @@ LINKS = [ ...@@ -506,7 +506,7 @@ LINKS = [
LINK_SW8_SW3, LINK_SW8_SW3,
LINK_SW8_SW5, LINK_SW8_SW5,
LINK_SW8_SW7, LINK_SW8_SW7,
] ]
SERVICES = [ SERVICES = [
(SERVICE_SW1_SW8, SERVICE_SW1_SW8_ENDPOINT_IDS), (SERVICE_SW1_SW8, SERVICE_SW1_SW8_ENDPOINT_IDS),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment