Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 1 | <!-- |
| 2 | ~ Copyright 2015-present Open Networking Foundation |
| 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 | |
| 17 | <scenario name="net-setup-trellis-p4" description="Trellis P4 based network setup steps"> |
| 18 | |
| 19 | <group name="Trellis-Net-P4-Setup"> |
| 20 | <step name="Trellis-Net-P4-Setup.Push-Topos" exec="onos-push-topos ${OCN}"/> |
| 21 | <step name="Trellis-Net-P4-Setup.Push-Routing" exec="onos-push-routing ${OCN}"/> |
| 22 | <step name="Trellis-Net-P4-Setup.Push-Bmv2" exec="onos-push-bmv2 ${OCN}"/> |
| 23 | |
| 24 | <step name="Trellis-Net-P4-Setup.Stop-Mininet-If-Needed" env="~" exec="onos-mininet stop"/> |
| 25 | <step name="Trellis-Net-P4-Setup.Clean-Mininet-If-Needed" env="~" exec="onos-mininet cleanup" requires="^"/> |
| 26 | <step name="Trellis-Net-P4-Setup.Wipe-Out-Data-Before" exec="onos-wipe-out" requires="^"/> |
| 27 | |
| 28 | <!-- Make sure that there is no data in the system --> |
| 29 | <step name="Trellis-Net-P4-Setup.Initial-Summary-Check" requires="~Trellis-Net-P4-Setup.Wipe-Out-Data-Before" |
| 30 | exec="onos-check-summary ${OC1} [0-9]* 0 0 0"/> |
| 31 | |
| 32 | <!-- Deactivate unneeded apps --> |
| 33 | <group name="Trellis-Net-P4-Setup.Deactivate-Apps" requires="Trellis-Net-P4-Setup.Initial-Summary-Check"> |
| 34 | <step name="App-Deactivate-PathPainter" |
| 35 | exec="onos ${OCI} app deactivate org.onosproject.pathpainter" |
| 36 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 37 | <step name="App-Deactivate-Mobility" |
| 38 | exec="onos ${OCI} app deactivate org.onosproject.mobility" |
| 39 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 40 | <step name="App-Deactivate-RouteService" |
| 41 | exec="onos ${OCI} app deactivate org.onosproject.route-service" |
| 42 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 43 | </group> |
| 44 | |
| 45 | <!-- Active required apps --> |
| 46 | <group name="Trellis-Net-P4-Setup.Activate-Apps" requires="Trellis-Net-P4-Setup.Deactivate-Apps"> |
| 47 | <step name="App-Activate-Drivers-Bmv2" |
| 48 | exec="onos ${OCI} app activate org.onosproject.drivers.bmv2" |
| 49 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 50 | <step name="App-Activate-Pipelines-Fabric" |
| 51 | exec="onos ${OCI} app activate org.onosproject.pipelines.fabric" |
| 52 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 53 | <step name="App-Activate-SegmentRouting" |
| 54 | exec="onos ${OCI} app activate org.onosproject.segmentrouting" |
| 55 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 56 | <step name="App-Activate-Fpm" |
| 57 | exec="onos ${OCI} app activate org.onosproject.fpm" |
| 58 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 59 | <step name="App-Activate-DhcpRelay" |
| 60 | exec="onos ${OCI} app activate org.onosproject.dhcprelay" |
| 61 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 62 | <step name="App-Activate-NetCfgHostProvider" |
| 63 | exec="onos ${OCI} app activate org.onosproject.netcfghostprovider" |
| 64 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 65 | <step name="App-Activate-RouterAdvertisement" |
| 66 | exec="onos ${OCI} app activate org.onosproject.routeradvertisement" |
| 67 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 68 | <step name="App-Activate-Mcast" |
| 69 | exec="onos ${OCI} app activate org.onosproject.mcast" |
| 70 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 71 | </group> |
| 72 | |
| 73 | <!-- set up the trellis environment --> |
| 74 | <step name="Trellis-Net-P4-Setup.Set-Up-Trellis" exec="set-up-trellis ${OCN}" requires="Trellis-Net-P4-Setup.Activate-Apps"/> |
| 75 | |
| 76 | <!-- configure the trellis topology in ONOS --> |
| 77 | <step name="Trellis-Net-P4-Setup.Config-Topo" |
| 78 | requires="Trellis-Net-P4-Setup.Set-Up-Trellis,Trellis-Net-P4-Setup.Push-Topos,Trellis-Net-P4-Setup.Push-Routing" |
| 79 | exec="onos-netcfg ${OC1} ${routing}/trellis/trellisp4.json"/> |
| 80 | |
| 81 | <!-- Bring up mininet --> |
| 82 | <step name="Trellis-Net-P4-Setup.Start-Mininet" |
| 83 | requires="Trellis-Net-P4-Setup.Config-Topo,Trellis-Net-P4-Setup.Push-Topos,Trellis-Net-P4-Setup.Stop-Mininet-If-Needed" |
| 84 | exec="mininet-p4-trellis ${ONOS_INSTANCES}"/> |
| 85 | <step name="Trellis-Net-P4-Setup.Wait-For-Mininet" requires="Trellis-Net-P4-Setup.Start-Mininet" |
| 86 | exec="onos-mininet wait 10"/> |
| 87 | |
| 88 | <!-- clean up local routing repo if necessary --> |
| 89 | <step name="Trellis-Net-P4-Setup.Clean-Routing" |
| 90 | requires="Trellis-Net-P4-Setup.Start-Mininet" |
| 91 | exec="onos-clean-routing ${routing_root}"/> |
| 92 | </group> |
| 93 | </scenario> |