| <!-- |
| ~ Copyright 2015-present Open Networking Foundation |
| ~ |
| ~ 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 |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <scenario name="net-setup-trellis-p4" description="Trellis P4 based network setup steps"> |
| |
| <group name="Trellis-Net-P4-Setup"> |
| <step name="Trellis-Net-P4-Setup.Push-Routing" exec="onos-push-routing ${OCN}"/> |
| <step name="Trellis-Net-P4-Setup.Push-Bmv2" exec="onos-push-bmv2-py ${OCN}"/> |
| |
| <!-- Stop/cleanup mininet --> |
| <step name="Trellis-Net-P4-Setup.Stop-Mininet-If-Needed" env="~" exec="onos-mininet stop"/> |
| <step name="Trellis-Net-P4-Setup.Clean-Mininet-If-Needed" env="~" exec="onos-mininet cleanup" requires="^"/> |
| <!-- Set up the trellis env on the net machine --> |
| <step name="Trellis-Net-P4-Setup.Set-Up-Trellis" exec="set-up-trellis ${OCN}" requires="^"/> |
| |
| <step name="Trellis-Net-P4-Setup.Wipe-Out-Data-Before" exec="onos-wipe-out" requires="^"/> |
| |
| <!-- Make sure that there is no data in the system --> |
| <step name="Trellis-Net-P4-Setup.Initial-Summary-Check" requires="~Trellis-Net-P4-Setup.Wipe-Out-Data-Before" |
| exec="onos-check-summary ${OC1} [0-9]* 0 0 0"/> |
| |
| <!-- Deactivate unneeded apps --> |
| <group name="Trellis-Net-P4-Setup.Deactivate-Apps" requires="Trellis-Net-P4-Setup.Initial-Summary-Check"> |
| <step name="App-Deactivate-PathPainter" |
| exec="onos ${OCI} app deactivate org.onosproject.pathpainter" |
| requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| <step name="App-Deactivate-Mobility" |
| exec="onos ${OCI} app deactivate org.onosproject.mobility" |
| requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| <step name="App-Deactivate-RouteService" |
| exec="onos ${OCI} app deactivate org.onosproject.route-service" |
| requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| </group> |
| |
| <!-- Active required apps --> |
| <group name="Trellis-Net-P4-Setup.Activate-Apps" requires="Trellis-Net-P4-Setup.Deactivate-Apps"> |
| <step name="App-Activate-Drivers-Bmv2" |
| exec="onos ${OCI} app activate org.onosproject.drivers.bmv2" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-Pipelines-Fabric" |
| exec="onos ${OCI} app activate org.onosproject.pipelines.fabric" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-SegmentRouting" |
| exec="onos ${OCI} app activate org.onosproject.segmentrouting" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-Fpm" |
| exec="onos ${OCI} app activate org.onosproject.fpm" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-DhcpRelay" |
| exec="onos ${OCI} app activate org.onosproject.dhcprelay" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-NetCfgHostProvider" |
| exec="onos ${OCI} app activate org.onosproject.netcfghostprovider" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-RouterAdvertisement" |
| exec="onos ${OCI} app activate org.onosproject.routeradvertisement" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| <step name="App-Activate-Mcast" |
| exec="onos ${OCI} app activate org.onosproject.mcast" |
| requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| </group> |
| |
| <group name="Trellis-Net-P4-Setup.Verify-Apps" requires="Trellis-Net-P4-Setup.Activate-Apps"> |
| <parallel var="${OC#}"> |
| <step name="Trellis-Net-P4-Setup.Check-Apps-${#}" exec="onos-check-apps ${OC#} drivers.bmv2,pipelines.fabric,generaldeviceprovider includes" |
| requires="Trellis-Net-P4-Setup.Activate-Apps"/> |
| </parallel> |
| </group> |
| |
| <group name="Trellis-Net-P4-Setup.Verify-Pipeconfs" requires="Trellis-Net-P4-Setup.Verify-Apps"> |
| <parallel var="${OC#}"> |
| <step name="Trellis-Net-P4-Setup.Check-Pipeconfs-${#}" exec="onos-check-pipeconfs ${OC#} org.onosproject.pipelines.fabric includes" |
| requires="Trellis-Net-P4-Setup.Verify-Apps"/> |
| </parallel> |
| </group> |
| |
| <!-- Bring up mininet --> |
| <step name="Trellis-Net-P4-Setup.Start-Mininet" |
| requires="Trellis-Net-P4-Setup.Verify-Apps,Trellis-Net-P4-Setup.Verify-Pipeconfs,Trellis-Net-P4-Setup.Set-Up-Trellis" |
| exec="mininet-p4-trellis ${ONOS_INSTANCES}"/> |
| <step name="Trellis-Net-P4-Setup.Wait-For-Mininet" requires="Trellis-Net-P4-Setup.Start-Mininet" |
| exec="onos-mininet wait 10"/> |
| |
| <!-- Push the trellis netcfg --> |
| <step name="Trellis-Net-P4-Setup.Config-Topo" |
| requires="Trellis-Net-P4-Setup.Wait-For-Mininet,Trellis-Net-P4-Setup.Push-Routing" |
| exec="onos-netcfg ${OC1} ${routing}/trellis/trellisp4.json"/> |
| |
| <!-- clean up local routing repo if necessary --> |
| <step delay="10" name="Trellis-Net-P4-Setup.Clean-Routing" |
| requires="Trellis-Net-P4-Setup.Config-Topo" |
| exec="onos-clean-routing ${routing_root}"/> |
| </group> |
| </scenario> |