blob: 474079e07b6aa892fbf1d6f12bde539948b39e67 [file] [log] [blame]
Ray Milkeya0f983b2016-06-23 19:39:55 -07001<!--
2 ~ Copyright 2016-present Open Networking Laboratory
3 ~
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
7 ~
8 ~ http://www.apache.org/licenses/LICENSE-2.0
9 ~
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
15 -->
16<scenario name="netcfg"
17 description="Network configuration REST API test">
18
19 <group name="Netcfg">
20
21 <!-- Activate the DHCP app -->
22 <step name="Netcfg.Activate-Dhcp"
23 exec="onos ${OC1} app activate org.onosproject.dhcp"/>
24
25 <!-- Upload the first set of config changes -->
26 <step name="Netcfg.Post-1" requires="^"
27 exec="post-netcfg.py ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg1.json"/>
28
29 <group name="Query1" requires="Netcfg.Post-1">
30 <parallel var="${OC#}" starts="Netcfg.Query-1-${#}">
31 <!-- Check that the values made it into the config for the DHCP server -->
Thomas Vachuskaa7217512016-07-13 16:52:43 -070032 <step name="Netcfg.QueryDhcp-1-${#}" delay="2"
33 exec="check-dhcp-netcfg.py ${OC#} ttl=1 lease=2 renew=3 rebind=4 delay=5 timeout=6"/>
Ray Milkeya0f983b2016-06-23 19:39:55 -070034 </parallel>
35 </group>
36
37 <!-- Upload the second set of config changes -->
38 <step name="Netcfg.Post-2" requires="Query1"
39 exec="post-netcfg.py ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg2.json"/>
40
41 <!-- Check that the values made it into the config for the DHCP server -->
42 <group name="Query2" requires="Netcfg.Post-2">
43 <parallel var="${OC#}" starts="Netcfg.Query-2-${#}">
44 <!-- Check that the values made it into the config for the DHCP server -->
Thomas Vachuskaa7217512016-07-13 16:52:43 -070045 <step name="Netcfg.QueryDhcp-2-${#}" delay="2"
46 exec="check-dhcp-netcfg.py ${OC#} ttl=21 lease=22 renew=23 rebind=24 delay=25 timeout=26"/>
Ray Milkeya0f983b2016-06-23 19:39:55 -070047 </parallel>
48 </group>
49
50
51 <!-- Delete the DHCP server config -->
52 <step name="Netcfg.Delete" requires="Query2"
53 exec="delete-netcfg.py ${OC1} apps/org.onosproject.dhcp/dhcp"/>
54
55 <!-- Check that the config for the DHCP server is no longer there -->
56 <group name="Query3" requires="Netcfg.Delete">
57 <parallel var="${OC#}" starts="Netcfg.Query-3-${#}">
58 <!-- Check that the values were deleted for the config for the DHCP server -->
59 <step name="Netcfg.QueryDhcp-31-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} ttl=21"/>
60 <step name="Netcfg.QueryDhcp-32-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} lease=22"/>
61 <step name="Netcfg.QueryDhcp-33-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} renew=23"/>
62 <step name="Netcfg.QueryDhcp-34-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} rebind=24"/>
63 <step name="Netcfg.QueryDhcp-35-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} delay=25"/>
64 <step name="Netcfg.QueryDhcp-36-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} timeout=26"/>
65 </parallel>
66 </group>
67
68 <!-- Deactivate the DHCP app -->
69 <step name="Netcfg.Deactivate-Dhcp" requires="Query3"
70 exec="onos ${OC1} app deactivate org.onosproject.dhcp"/>
71
72 </group>
73</scenario>