Skip to content

Commit 9e00b35

Browse files
authored
Format all json files (#617)
1 parent 882fbe0 commit 9e00b35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1344
-416
lines changed

exercises/basic/pod-topo/s2-runtime.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"table": "MyIngress.ipv4_lpm",
88
"default_action": true,
99
"action_name": "MyIngress.drop",
10-
"action_params": { }
10+
"action_params": {}
1111
},
1212
{
1313
"table": "MyIngress.ipv4_lpm",
1414
"match": {
15-
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
15+
"hdr.ipv4.dstAddr": [
16+
"10.0.1.1",
17+
32
18+
]
1619
},
1720
"action_name": "MyIngress.ipv4_forward",
1821
"action_params": {
@@ -23,7 +26,10 @@
2326
{
2427
"table": "MyIngress.ipv4_lpm",
2528
"match": {
26-
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
29+
"hdr.ipv4.dstAddr": [
30+
"10.0.2.2",
31+
32
32+
]
2733
},
2834
"action_name": "MyIngress.ipv4_forward",
2935
"action_params": {
@@ -34,7 +40,10 @@
3440
{
3541
"table": "MyIngress.ipv4_lpm",
3642
"match": {
37-
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
43+
"hdr.ipv4.dstAddr": [
44+
"10.0.3.3",
45+
32
46+
]
3847
},
3948
"action_name": "MyIngress.ipv4_forward",
4049
"action_params": {
@@ -45,7 +54,10 @@
4554
{
4655
"table": "MyIngress.ipv4_lpm",
4756
"match": {
48-
"hdr.ipv4.dstAddr": ["10.0.4.4", 32]
57+
"hdr.ipv4.dstAddr": [
58+
"10.0.4.4",
59+
32
60+
]
4961
},
5062
"action_name": "MyIngress.ipv4_forward",
5163
"action_params": {
@@ -54,4 +66,4 @@
5466
}
5567
}
5668
]
57-
}
69+
}

exercises/basic/pod-topo/s3-runtime.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"table": "MyIngress.ipv4_lpm",
88
"default_action": true,
99
"action_name": "MyIngress.drop",
10-
"action_params": { }
10+
"action_params": {}
1111
},
1212
{
1313
"table": "MyIngress.ipv4_lpm",
1414
"match": {
15-
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
15+
"hdr.ipv4.dstAddr": [
16+
"10.0.1.1",
17+
32
18+
]
1619
},
1720
"action_name": "MyIngress.ipv4_forward",
1821
"action_params": {
@@ -23,7 +26,10 @@
2326
{
2427
"table": "MyIngress.ipv4_lpm",
2528
"match": {
26-
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
29+
"hdr.ipv4.dstAddr": [
30+
"10.0.2.2",
31+
32
32+
]
2733
},
2834
"action_name": "MyIngress.ipv4_forward",
2935
"action_params": {
@@ -34,7 +40,10 @@
3440
{
3541
"table": "MyIngress.ipv4_lpm",
3642
"match": {
37-
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
43+
"hdr.ipv4.dstAddr": [
44+
"10.0.3.3",
45+
32
46+
]
3847
},
3948
"action_name": "MyIngress.ipv4_forward",
4049
"action_params": {
@@ -45,7 +54,10 @@
4554
{
4655
"table": "MyIngress.ipv4_lpm",
4756
"match": {
48-
"hdr.ipv4.dstAddr": ["10.0.4.4", 32]
57+
"hdr.ipv4.dstAddr": [
58+
"10.0.4.4",
59+
32
60+
]
4961
},
5062
"action_name": "MyIngress.ipv4_forward",
5163
"action_params": {
@@ -54,4 +66,4 @@
5466
}
5567
}
5668
]
57-
}
69+
}

exercises/basic/pod-topo/s4-runtime.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"table": "MyIngress.ipv4_lpm",
88
"default_action": true,
99
"action_name": "MyIngress.drop",
10-
"action_params": { }
10+
"action_params": {}
1111
},
1212
{
1313
"table": "MyIngress.ipv4_lpm",
1414
"match": {
15-
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
15+
"hdr.ipv4.dstAddr": [
16+
"10.0.1.1",
17+
32
18+
]
1619
},
1720
"action_name": "MyIngress.ipv4_forward",
1821
"action_params": {
@@ -23,7 +26,10 @@
2326
{
2427
"table": "MyIngress.ipv4_lpm",
2528
"match": {
26-
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
29+
"hdr.ipv4.dstAddr": [
30+
"10.0.2.2",
31+
32
32+
]
2733
},
2834
"action_name": "MyIngress.ipv4_forward",
2935
"action_params": {
@@ -34,7 +40,10 @@
3440
{
3541
"table": "MyIngress.ipv4_lpm",
3642
"match": {
37-
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
43+
"hdr.ipv4.dstAddr": [
44+
"10.0.3.3",
45+
32
46+
]
3847
},
3948
"action_name": "MyIngress.ipv4_forward",
4049
"action_params": {
@@ -45,7 +54,10 @@
4554
{
4655
"table": "MyIngress.ipv4_lpm",
4756
"match": {
48-
"hdr.ipv4.dstAddr": ["10.0.4.4", 32]
57+
"hdr.ipv4.dstAddr": [
58+
"10.0.4.4",
59+
32
60+
]
4961
},
5062
"action_name": "MyIngress.ipv4_forward",
5163
"action_params": {
@@ -54,4 +66,4 @@
5466
}
5567
}
5668
]
57-
}
69+
}
+77-19
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,84 @@
11
{
22
"hosts": {
3-
"h1": {"ip": "10.0.1.1/24", "mac": "08:00:00:00:01:11",
4-
"commands":["route add default gw 10.0.1.10 dev eth0",
5-
"arp -i eth0 -s 10.0.1.10 08:00:00:00:01:00"]},
6-
"h2": {"ip": "10.0.2.2/24", "mac": "08:00:00:00:02:22",
7-
"commands":["route add default gw 10.0.2.20 dev eth0",
8-
"arp -i eth0 -s 10.0.2.20 08:00:00:00:02:00"]},
9-
"h3": {"ip": "10.0.3.3/24", "mac": "08:00:00:00:03:33",
10-
"commands":["route add default gw 10.0.3.30 dev eth0",
11-
"arp -i eth0 -s 10.0.3.30 08:00:00:00:03:00"]},
12-
"h4": {"ip": "10.0.4.4/24", "mac": "08:00:00:00:04:44",
13-
"commands":["route add default gw 10.0.4.40 dev eth0",
14-
"arp -i eth0 -s 10.0.4.40 08:00:00:00:04:00"]}
3+
"h1": {
4+
"ip": "10.0.1.1/24",
5+
"mac": "08:00:00:00:01:11",
6+
"commands": [
7+
"route add default gw 10.0.1.10 dev eth0",
8+
"arp -i eth0 -s 10.0.1.10 08:00:00:00:01:00"
9+
]
10+
},
11+
"h2": {
12+
"ip": "10.0.2.2/24",
13+
"mac": "08:00:00:00:02:22",
14+
"commands": [
15+
"route add default gw 10.0.2.20 dev eth0",
16+
"arp -i eth0 -s 10.0.2.20 08:00:00:00:02:00"
17+
]
18+
},
19+
"h3": {
20+
"ip": "10.0.3.3/24",
21+
"mac": "08:00:00:00:03:33",
22+
"commands": [
23+
"route add default gw 10.0.3.30 dev eth0",
24+
"arp -i eth0 -s 10.0.3.30 08:00:00:00:03:00"
25+
]
26+
},
27+
"h4": {
28+
"ip": "10.0.4.4/24",
29+
"mac": "08:00:00:00:04:44",
30+
"commands": [
31+
"route add default gw 10.0.4.40 dev eth0",
32+
"arp -i eth0 -s 10.0.4.40 08:00:00:00:04:00"
33+
]
34+
}
1535
},
1636
"switches": {
17-
"s1": { "runtime_json" : "pod-topo/s1-runtime.json" },
18-
"s2": { "runtime_json" : "pod-topo/s2-runtime.json" },
19-
"s3": { "runtime_json" : "pod-topo/s3-runtime.json" },
20-
"s4": { "runtime_json" : "pod-topo/s4-runtime.json" }
37+
"s1": {
38+
"runtime_json": "pod-topo/s1-runtime.json"
39+
},
40+
"s2": {
41+
"runtime_json": "pod-topo/s2-runtime.json"
42+
},
43+
"s3": {
44+
"runtime_json": "pod-topo/s3-runtime.json"
45+
},
46+
"s4": {
47+
"runtime_json": "pod-topo/s4-runtime.json"
48+
}
2149
},
2250
"links": [
23-
["h1", "s1-p1"], ["h2", "s1-p2"], ["s1-p3", "s3-p1"], ["s1-p4", "s4-p2"],
24-
["h3", "s2-p1"], ["h4", "s2-p2"], ["s2-p3", "s4-p1"], ["s2-p4", "s3-p2"]
51+
[
52+
"h1",
53+
"s1-p1"
54+
],
55+
[
56+
"h2",
57+
"s1-p2"
58+
],
59+
[
60+
"s1-p3",
61+
"s3-p1"
62+
],
63+
[
64+
"s1-p4",
65+
"s4-p2"
66+
],
67+
[
68+
"h3",
69+
"s2-p1"
70+
],
71+
[
72+
"h4",
73+
"s2-p2"
74+
],
75+
[
76+
"s2-p3",
77+
"s4-p1"
78+
],
79+
[
80+
"s2-p4",
81+
"s3-p2"
82+
]
2583
]
26-
}
84+
}

exercises/basic/triangle-topo/s1-runtime.json

+14-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"table": "MyIngress.ipv4_lpm",
88
"default_action": true,
99
"action_name": "MyIngress.drop",
10-
"action_params": { }
10+
"action_params": {}
1111
},
1212
{
1313
"table": "MyIngress.ipv4_lpm",
1414
"match": {
15-
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
15+
"hdr.ipv4.dstAddr": [
16+
"10.0.1.1",
17+
32
18+
]
1619
},
1720
"action_name": "MyIngress.ipv4_forward",
1821
"action_params": {
@@ -23,7 +26,10 @@
2326
{
2427
"table": "MyIngress.ipv4_lpm",
2528
"match": {
26-
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
29+
"hdr.ipv4.dstAddr": [
30+
"10.0.2.2",
31+
32
32+
]
2733
},
2834
"action_name": "MyIngress.ipv4_forward",
2935
"action_params": {
@@ -34,7 +40,10 @@
3440
{
3541
"table": "MyIngress.ipv4_lpm",
3642
"match": {
37-
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
43+
"hdr.ipv4.dstAddr": [
44+
"10.0.3.3",
45+
32
46+
]
3847
},
3948
"action_name": "MyIngress.ipv4_forward",
4049
"action_params": {
@@ -43,4 +52,4 @@
4352
}
4453
}
4554
]
46-
}
55+
}

exercises/basic/triangle-topo/s2-runtime.json

+14-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
"table": "MyIngress.ipv4_lpm",
88
"default_action": true,
99
"action_name": "MyIngress.drop",
10-
"action_params": { }
10+
"action_params": {}
1111
},
1212
{
1313
"table": "MyIngress.ipv4_lpm",
1414
"match": {
15-
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
15+
"hdr.ipv4.dstAddr": [
16+
"10.0.1.1",
17+
32
18+
]
1619
},
1720
"action_name": "MyIngress.ipv4_forward",
1821
"action_params": {
@@ -23,7 +26,10 @@
2326
{
2427
"table": "MyIngress.ipv4_lpm",
2528
"match": {
26-
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
29+
"hdr.ipv4.dstAddr": [
30+
"10.0.2.2",
31+
32
32+
]
2733
},
2834
"action_name": "MyIngress.ipv4_forward",
2935
"action_params": {
@@ -34,7 +40,10 @@
3440
{
3541
"table": "MyIngress.ipv4_lpm",
3642
"match": {
37-
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
43+
"hdr.ipv4.dstAddr": [
44+
"10.0.3.3",
45+
32
46+
]
3847
},
3948
"action_name": "MyIngress.ipv4_forward",
4049
"action_params": {
@@ -43,4 +52,4 @@
4352
}
4453
}
4554
]
46-
}
55+
}

0 commit comments

Comments
 (0)