@@ -2,20 +2,29 @@ test_network_dhcp_routes() {
2
2
ensure_import_testimage
3
3
ensure_has_localhost_remote " ${INCUS_ADDR} "
4
4
5
- # bridge network
6
- incus network create inct$$
5
+ # ovn network
6
+ incus network create inct$$ -t ovn network=none
7
+
7
8
incus network set inct$$ ipv4.address 10.13.37.1/24
8
9
incus network set inct$$ ipv4.dhcp.routes 1.2.0.0/16,10.13.37.5,2.3.0.0/16,10.13.37.7
9
10
10
11
incus launch testimage nettest -n inct$$
11
12
12
- echo " >>>> ROUTE TABLE bridge <<<<"
13
+ echo " >>>> ROUTE TABLE ovn <<<<"
13
14
incus exec nettest -- ip route list
14
15
15
16
incus exec nettest -- ip route list | grep -q " 1.2.0.0/16 via 10.13.37.5"
16
17
incus exec nettest -- ip route list | grep -q " 2.3.0.0/16 via 10.13.37.7"
17
18
18
19
incus delete nettest -f
20
+ incus network delete inct$$
21
+
22
+
23
+ # bridge network
24
+ incus network create inct$$
25
+ incus network set inct$$ ipv4.address 10.13.37.1/24
26
+ incus network set inct$$ ipv4.dhcp.routes 1.2.0.0/16,10.13.37.5,2.3.0.0/16,10.13.37.7
27
+
19
28
20
29
if [ -n " ${INCUS_OFFLINE:- } " ]; then
21
30
echo " ==> SKIP: Skipping OCI tests as running offline"
@@ -35,23 +44,19 @@ test_network_dhcp_routes() {
35
44
incus remote remove docker
36
45
fi
37
46
38
- incus network delete inct$$
39
-
40
-
41
- # ovn network
42
- incus network create inct$$ -t ovn network=none
43
-
44
- incus network set inct$$ ipv4.address 10.13.37.1/24
45
- incus network set inct$$ ipv4.dhcp.routes 1.2.0.0/16,10.13.37.5,2.3.0.0/16,10.13.37.7
46
-
47
47
incus launch testimage nettest -n inct$$
48
48
49
- echo " >>>> ROUTE TABLE ovn <<<<"
49
+ echo " >>>> ROUTE TABLE bridge <<<<"
50
50
incus exec nettest -- ip route list
51
51
52
+ echo " >>>> INSTANCE CONFIG <<<<"
53
+ incus config show nettest
54
+
52
55
incus exec nettest -- ip route list | grep -q " 1.2.0.0/16 via 10.13.37.5"
53
56
incus exec nettest -- ip route list | grep -q " 2.3.0.0/16 via 10.13.37.7"
54
57
55
58
incus delete nettest -f
59
+
56
60
incus network delete inct$$
61
+
57
62
}
0 commit comments