blob: e13705bddac2860ff4113f048c68dc1ff357c05a [file] [log] [blame]
~ Copyright 2016-present Open Networking Laboratory
~ 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
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ See the License for the specific language governing permissions and
~ limitations under the License.
<scenario name="netcfg"
description="Network configuration REST API test">
<group name="Netcfg">
<!-- Activate the DHCP app -->
<step name="Netcfg.Activate-Dhcp"
exec="onos ${OC1} app activate org.onosproject.dhcp"/>
<!-- Check that the activation was successful -->
<group name="Netcfg.Check-Dhcp-App-Activated" requires="Netcfg.Activate-Dhcp">
<parallel var="${OC#}">
<step name="Netcfg.Check-Dhcp-App-Activated-${#}"
exec="onos-check-apps ${OC#} drivers,openflow,proxyarp,dhcp includes"/>
<step name="Netcfg.Check-Dhcp-Component-Active-${#}"
exec="onos-check-component ${OC#} org.onosproject.dhcp.impl.DhcpManager ACTIVE"/>
<!-- Upload the first set of config changes -->
<step name="Netcfg.Post-1" requires="Netcfg.Check-Dhcp-App-Activated"
exec=" ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg1.json"/>
<group name="Query1" requires="Netcfg.Post-1">
<parallel var="${OC#}" starts="Netcfg.Query-1-${#}">
<!-- Check that the values made it into the config for the DHCP server -->
<step name="Netcfg.QueryDhcp-1-${#}"
exec=" ${OC#} ttl=1 lease=2 renew=3 rebind=4 delay=5 timeout=6"/>
<!-- Upload the second set of config changes -->
<step name="Netcfg.Post-2" requires="Query1"
exec=" ${OC1} ${ONOS_SCENARIOS}/netcfg-test/dhcp-cfg2.json"/>
<!-- Check that the values made it into the config for the DHCP server -->
<group name="Query2" requires="Netcfg.Post-2">
<parallel var="${OC#}" starts="Netcfg.Query-2-${#}">
<!-- Check that the values made it into the config for the DHCP server -->
<step name="Netcfg.QueryDhcp-2-${#}"
exec=" ${OC#} ttl=21 lease=22 renew=23 rebind=24 delay=25 timeout=26"/>
<!-- Delete the DHCP server config -->
<step name="Netcfg.Delete" requires="Query2"
exec=" ${OC1} apps/org.onosproject.dhcp/dhcp"/>
<!-- Check that the config for the DHCP server is no longer there -->
<group name="Query3" requires="Netcfg.Delete">
<parallel var="${OC#}" starts="Netcfg.Query-3-${#}">
<!-- Check that the values were deleted for the config for the DHCP server -->
<step name="Netcfg.QueryDhcp-31-${#}" env="!" exec=" ${OC#} ttl=21"/>
<step name="Netcfg.QueryDhcp-32-${#}" env="!" exec=" ${OC#} lease=22"/>
<step name="Netcfg.QueryDhcp-33-${#}" env="!" exec=" ${OC#} renew=23"/>
<step name="Netcfg.QueryDhcp-34-${#}" env="!" exec=" ${OC#} rebind=24"/>
<step name="Netcfg.QueryDhcp-35-${#}" env="!" exec=" ${OC#} delay=25"/>
<step name="Netcfg.QueryDhcp-36-${#}" env="!" exec=" ${OC#} timeout=26"/>
<!-- Deactivate the DHCP app -->
<step name="Netcfg.Deactivate-Dhcp" requires="Query3"
exec="onos ${OC1} app deactivate org.onosproject.dhcp"/>