Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 1 | <!-- |
| 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 | |
Ray Milkey | e685d7d | 2016-08-04 17:00:14 -0700 | [diff] [blame] | 25 | <!-- Check that the activation was successful --> |
| 26 | <group name="Netcfg.Check-Dhcp-App-Activated" requires="Netcfg.Activate-Dhcp"> |
| 27 | <parallel var="${OC#}"> |
Ray Milkey | ba82c0d | 2016-08-30 12:45:27 -0700 | [diff] [blame] | 28 | <step name="Netcfg.Check-Dhcp-App-Activated-${#}" |
Ray Milkey | e685d7d | 2016-08-04 17:00:14 -0700 | [diff] [blame] | 29 | exec="onos-check-apps ${OC#} drivers,openflow,proxyarp,dhcp includes"/> |
Ray Milkey | ba82c0d | 2016-08-30 12:45:27 -0700 | [diff] [blame] | 30 | <step name="Netcfg.Check-Dhcp-Component-Active-${#}" |
| 31 | exec="onos-check-component ${OC#} org.onosproject.dhcp.impl.DhcpManager ACTIVE"/> |
Ray Milkey | e685d7d | 2016-08-04 17:00:14 -0700 | [diff] [blame] | 32 | </parallel> |
| 33 | </group> |
| 34 | |
Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 35 | <!-- Upload the first set of config changes --> |
Ray Milkey | e685d7d | 2016-08-04 17:00:14 -0700 | [diff] [blame] | 36 | <step name="Netcfg.Post-1" requires="Netcfg.Check-Dhcp-App-Activated" |
Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 37 | exec="post-netcfg.py ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg1.json"/> |
| 38 | |
| 39 | <group name="Query1" requires="Netcfg.Post-1"> |
| 40 | <parallel var="${OC#}" starts="Netcfg.Query-1-${#}"> |
| 41 | <!-- Check that the values made it into the config for the DHCP server --> |
Ray Milkey | ba82c0d | 2016-08-30 12:45:27 -0700 | [diff] [blame] | 42 | <step name="Netcfg.QueryDhcp-1-${#}" |
Thomas Vachuska | a721751 | 2016-07-13 16:52:43 -0700 | [diff] [blame] | 43 | exec="check-dhcp-netcfg.py ${OC#} ttl=1 lease=2 renew=3 rebind=4 delay=5 timeout=6"/> |
Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 44 | </parallel> |
| 45 | </group> |
| 46 | |
| 47 | <!-- Upload the second set of config changes --> |
| 48 | <step name="Netcfg.Post-2" requires="Query1" |
| 49 | exec="post-netcfg.py ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg2.json"/> |
| 50 | |
| 51 | <!-- Check that the values made it into the config for the DHCP server --> |
| 52 | <group name="Query2" requires="Netcfg.Post-2"> |
| 53 | <parallel var="${OC#}" starts="Netcfg.Query-2-${#}"> |
| 54 | <!-- Check that the values made it into the config for the DHCP server --> |
Thomas Vachuska | 534f476 | 2016-08-30 16:25:13 -0700 | [diff] [blame] | 55 | <step name="Netcfg.QueryDhcp-2-${#}" delay="2" |
Thomas Vachuska | a721751 | 2016-07-13 16:52:43 -0700 | [diff] [blame] | 56 | exec="check-dhcp-netcfg.py ${OC#} ttl=21 lease=22 renew=23 rebind=24 delay=25 timeout=26"/> |
Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 57 | </parallel> |
| 58 | </group> |
| 59 | |
| 60 | |
| 61 | <!-- Delete the DHCP server config --> |
| 62 | <step name="Netcfg.Delete" requires="Query2" |
| 63 | exec="delete-netcfg.py ${OC1} apps/org.onosproject.dhcp/dhcp"/> |
| 64 | |
| 65 | <!-- Check that the config for the DHCP server is no longer there --> |
| 66 | <group name="Query3" requires="Netcfg.Delete"> |
| 67 | <parallel var="${OC#}" starts="Netcfg.Query-3-${#}"> |
| 68 | <!-- Check that the values were deleted for the config for the DHCP server --> |
Ray Milkey | b4ac46e | 2016-09-01 11:20:33 -0700 | [diff] [blame] | 69 | <step name="Netcfg.QueryDhcp-31-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} ttl=21" delay="2"/> |
| 70 | <step name="Netcfg.QueryDhcp-32-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} lease=22" delay="2"/> |
| 71 | <step name="Netcfg.QueryDhcp-33-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} renew=23" delay="2"/> |
| 72 | <step name="Netcfg.QueryDhcp-34-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} rebind=24" delay="2"/> |
| 73 | <step name="Netcfg.QueryDhcp-35-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} delay=25" delay="2"/> |
| 74 | <step name="Netcfg.QueryDhcp-36-${#}" env="!" exec="check-dhcp-netcfg.py ${OC#} timeout=26" delay="2"/> |
Ray Milkey | a0f983b | 2016-06-23 19:39:55 -0700 | [diff] [blame] | 75 | </parallel> |
| 76 | </group> |
| 77 | |
| 78 | <!-- Deactivate the DHCP app --> |
| 79 | <step name="Netcfg.Deactivate-Dhcp" requires="Query3" |
| 80 | exec="onos ${OC1} app deactivate org.onosproject.dhcp"/> |
| 81 | |
| 82 | </group> |
| 83 | </scenario> |