-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
105 lines (83 loc) · 5.04 KB
/
Makefile
File metadata and controls
105 lines (83 loc) · 5.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 2020 Daniele Moro <daniele.moro@polimi.it>
# Davide Sanvito <davide.sanvito@neclab.eu>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
curr_dir := $(shell pwd)
start:
TOPO_FOLDER=${curr_dir}/topo TOPO_FILE=${curr_dir}/topo/topo.py docker-compose -f ../utils/docker-compose.yml --env-file ../utils/.env up -d
stop:
docker-compose -f ../utils/docker-compose.yml down -t0
onos-log:
docker-compose -f ../utils/docker-compose.yml logs -f onos
onos-cli:
ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -p 8101 onos@localhost
mn-log:
docker-compose -f ../utils/docker-compose.yml logs -f mininet
mn-cli:
$(info ******* Ctrl+A Ctrl+D to detach *******)
docker-compose -f ../utils/docker-compose.yml exec mininet screen -Urx -S cli
gui-log:
docker-compose -f ../utils/docker-compose.yml logs -f gui
push-netcfg:
../../utils/push-netcfg.sh localhost 8181 ./topo/netcfg.json
push-app:
cd ../../ && make push-app
leaf1-shell:
$(info *** CLI Leaf1 )
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
leaf1-clear-regs:
$(info *** Clear registers for leaf1)
@echo " reg_state"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_state" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
@echo " reg_R0"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_R0" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
@echo " reg_R1"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_R1" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
@echo " reg_R2"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_R2" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
@echo " reg_R3"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_R3" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
@echo " reg_G"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_reset reg_G" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port) > /dev/null'
leaf1-read-regs:
$(info *** Read registers for S1)
@echo " reg_state"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_state" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
@echo " reg_R0"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_R0" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
@echo " reg_R1"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_R1" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
@echo " reg_R2"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_R2" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
@echo " reg_R3"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_R3" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
@echo " reg_G"
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c 'echo "register_read reg_G" | simple_switch_CLI --thrift-port $$(cat /tmp/bmv2-leaf1-thrift-port)'
reset-flowblaze-onos:
curl -X GET -u onos:rocks 'http://localhost:8181/onos/flowblaze/resetFlowblaze'
reset: reset-flowblaze-onos leaf1-clear-regs
h1-cli:
docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h1
h1-test:
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c '${curr_dir}/topo/h1-iperf-test_udp.sh'
h2-cli:
docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h2
h2-test:
@docker-compose -f ../utils/docker-compose.yml exec mininet /bin/sh -c '${curr_dir}/topo/h2-iperf-test_udp.sh'
h10-cli:
docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h10
pingall:
@docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h10 'ping 10.10.10.254 -c1'
@docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h1 'ping 10.0.0.254 -c1'
@docker-compose -f ../utils/docker-compose.yml exec mininet /mininet/util/m h2 'ping 10.0.1.254 -c1'
setup: push-netcfg push-app