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"> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 20 | <step name="Trellis-Net-P4-Setup.Push-Routing" exec="onos-push-routing ${OCN}"/> |
Carmelo Cascone | 0bcbe26 | 2019-02-28 23:14:28 -0800 | [diff] [blame] | 21 | <step name="Trellis-Net-P4-Setup.Push-Bmv2" exec="onos-push-bmv2-py ${OCN}"/> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 22 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 23 | <!-- Stop/cleanup mininet --> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 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="^"/> |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 26 | <!-- Set up the trellis env on the net machine --> |
| 27 | <step name="Trellis-Net-P4-Setup.Set-Up-Trellis" exec="set-up-trellis ${OCN}" requires="^"/> |
| 28 | |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 29 | <step name="Trellis-Net-P4-Setup.Wipe-Out-Data-Before" exec="onos-wipe-out" requires="^"/> |
| 30 | |
| 31 | <!-- Make sure that there is no data in the system --> |
| 32 | <step name="Trellis-Net-P4-Setup.Initial-Summary-Check" requires="~Trellis-Net-P4-Setup.Wipe-Out-Data-Before" |
| 33 | exec="onos-check-summary ${OC1} [0-9]* 0 0 0"/> |
| 34 | |
| 35 | <!-- Deactivate unneeded apps --> |
| 36 | <group name="Trellis-Net-P4-Setup.Deactivate-Apps" requires="Trellis-Net-P4-Setup.Initial-Summary-Check"> |
| 37 | <step name="App-Deactivate-PathPainter" |
| 38 | exec="onos ${OCI} app deactivate org.onosproject.pathpainter" |
| 39 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 40 | <step name="App-Deactivate-Mobility" |
| 41 | exec="onos ${OCI} app deactivate org.onosproject.mobility" |
| 42 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 43 | <step name="App-Deactivate-RouteService" |
| 44 | exec="onos ${OCI} app deactivate org.onosproject.route-service" |
| 45 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 46 | </group> |
| 47 | |
| 48 | <!-- Active required apps --> |
| 49 | <group name="Trellis-Net-P4-Setup.Activate-Apps" requires="Trellis-Net-P4-Setup.Deactivate-Apps"> |
| 50 | <step name="App-Activate-Drivers-Bmv2" |
| 51 | exec="onos ${OCI} app activate org.onosproject.drivers.bmv2" |
| 52 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 53 | <step name="App-Activate-Pipelines-Fabric" |
| 54 | exec="onos ${OCI} app activate org.onosproject.pipelines.fabric" |
| 55 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 56 | <step name="App-Activate-SegmentRouting" |
| 57 | exec="onos ${OCI} app activate org.onosproject.segmentrouting" |
| 58 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 59 | <step name="App-Activate-Fpm" |
| 60 | exec="onos ${OCI} app activate org.onosproject.fpm" |
| 61 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 62 | <step name="App-Activate-DhcpRelay" |
| 63 | exec="onos ${OCI} app activate org.onosproject.dhcprelay" |
| 64 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 65 | <step name="App-Activate-NetCfgHostProvider" |
| 66 | exec="onos ${OCI} app activate org.onosproject.netcfghostprovider" |
| 67 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 68 | <step name="App-Activate-RouterAdvertisement" |
| 69 | exec="onos ${OCI} app activate org.onosproject.routeradvertisement" |
| 70 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 71 | <step name="App-Activate-Mcast" |
| 72 | exec="onos ${OCI} app activate org.onosproject.mcast" |
| 73 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 74 | </group> |
| 75 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 76 | <group name="Trellis-Net-P4-Setup.Verify-Apps" requires="Trellis-Net-P4-Setup.Activate-Apps"> |
| 77 | <parallel var="${OC#}"> |
Ray Milkey | c05bd43 | 2019-01-14 09:50:16 -0800 | [diff] [blame] | 78 | <step name="Trellis-Net-P4-Setup.Check-Apps-${#}" exec="onos-check-apps ${OC#} drivers.bmv2,pipelines.fabric,generaldeviceprovider includes" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 79 | requires="Trellis-Net-P4-Setup.Activate-Apps"/> |
| 80 | </parallel> |
| 81 | </group> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 82 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 83 | <group name="Trellis-Net-P4-Setup.Verify-Pipeconfs" requires="Trellis-Net-P4-Setup.Verify-Apps"> |
| 84 | <parallel var="${OC#}"> |
Ray Milkey | c05bd43 | 2019-01-14 09:50:16 -0800 | [diff] [blame] | 85 | <step name="Trellis-Net-P4-Setup.Check-Pipeconfs-${#}" exec="onos-check-pipeconfs ${OC#} org.onosproject.pipelines.fabric includes" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 86 | requires="Trellis-Net-P4-Setup.Verify-Apps"/> |
| 87 | </parallel> |
| 88 | </group> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 89 | |
| 90 | <!-- Bring up mininet --> |
| 91 | <step name="Trellis-Net-P4-Setup.Start-Mininet" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 92 | requires="Trellis-Net-P4-Setup.Verify-Apps,Trellis-Net-P4-Setup.Verify-Pipeconfs,Trellis-Net-P4-Setup.Set-Up-Trellis" |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 93 | exec="mininet-p4-trellis ${ONOS_INSTANCES}"/> |
| 94 | <step name="Trellis-Net-P4-Setup.Wait-For-Mininet" requires="Trellis-Net-P4-Setup.Start-Mininet" |
| 95 | exec="onos-mininet wait 10"/> |
| 96 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 97 | <!-- Push the trellis netcfg --> |
| 98 | <step name="Trellis-Net-P4-Setup.Config-Topo" |
| 99 | requires="Trellis-Net-P4-Setup.Wait-For-Mininet,Trellis-Net-P4-Setup.Push-Routing" |
| 100 | exec="onos-netcfg ${OC1} ${routing}/trellis/trellisp4.json"/> |
| 101 | |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 102 | <!-- clean up local routing repo if necessary --> |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 103 | <step delay="10" name="Trellis-Net-P4-Setup.Clean-Routing" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 104 | requires="Trellis-Net-P4-Setup.Config-Topo" |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 105 | exec="onos-clean-routing ${routing_root}"/> |
| 106 | </group> |
| 107 | </scenario> |