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"/> |
Carmelo Cascone | b450e44 | 2019-07-08 11:59:40 -0700 | [diff] [blame] | 46 | <step name="App-Deactivate-OpenFlow" |
| 47 | exec="onos ${OCI} app deactivate org.onosproject.openflow" |
| 48 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
| 49 | <step name="App-Deactivate-Gui" |
| 50 | exec="onos ${OCI} app deactivate org.onosproject.gui2" |
| 51 | requires="Trellis-Net-P4-Setup.Initial-Summary-Check"/> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 52 | </group> |
| 53 | |
| 54 | <!-- Active required apps --> |
| 55 | <group name="Trellis-Net-P4-Setup.Activate-Apps" requires="Trellis-Net-P4-Setup.Deactivate-Apps"> |
| 56 | <step name="App-Activate-Drivers-Bmv2" |
| 57 | exec="onos ${OCI} app activate org.onosproject.drivers.bmv2" |
| 58 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 59 | <step name="App-Activate-Pipelines-Fabric" |
| 60 | exec="onos ${OCI} app activate org.onosproject.pipelines.fabric" |
| 61 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 62 | <step name="App-Activate-SegmentRouting" |
| 63 | exec="onos ${OCI} app activate org.onosproject.segmentrouting" |
| 64 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 65 | <step name="App-Activate-Fpm" |
| 66 | exec="onos ${OCI} app activate org.onosproject.fpm" |
| 67 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 68 | <step name="App-Activate-DhcpRelay" |
| 69 | exec="onos ${OCI} app activate org.onosproject.dhcprelay" |
| 70 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 71 | <step name="App-Activate-NetCfgHostProvider" |
| 72 | exec="onos ${OCI} app activate org.onosproject.netcfghostprovider" |
| 73 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 74 | <step name="App-Activate-RouterAdvertisement" |
| 75 | exec="onos ${OCI} app activate org.onosproject.routeradvertisement" |
| 76 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 77 | <step name="App-Activate-Mcast" |
| 78 | exec="onos ${OCI} app activate org.onosproject.mcast" |
| 79 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
Carmelo Cascone | b07f2b5 | 2019-07-12 14:01:39 -0700 | [diff] [blame] | 80 | <step name="App-Activate-LldpProvider" |
| 81 | exec="onos ${OCI} app activate org.onosproject.lldpprovider" |
| 82 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
| 83 | <step name="App-Activate-HostProvider" |
| 84 | exec="onos ${OCI} app activate org.onosproject.hostprovider" |
| 85 | requires="Trellis-Net-P4-Setup.Deactivate-Apps"/> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 86 | </group> |
| 87 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 88 | <group name="Trellis-Net-P4-Setup.Verify-Apps" requires="Trellis-Net-P4-Setup.Activate-Apps"> |
| 89 | <parallel var="${OC#}"> |
Carmelo Cascone | b07f2b5 | 2019-07-12 14:01:39 -0700 | [diff] [blame] | 90 | <step name="Trellis-Net-P4-Setup.Check-Apps-${#}" exec="onos-check-apps ${OC#} drivers.bmv2,generaldeviceprovider,pipelines.fabric,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement,mcast,lldpprovider,hostprovider includes" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 91 | requires="Trellis-Net-P4-Setup.Activate-Apps"/> |
| 92 | </parallel> |
| 93 | </group> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 94 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 95 | <group name="Trellis-Net-P4-Setup.Verify-Pipeconfs" requires="Trellis-Net-P4-Setup.Verify-Apps"> |
| 96 | <parallel var="${OC#}"> |
Ray Milkey | c05bd43 | 2019-01-14 09:50:16 -0800 | [diff] [blame] | 97 | <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] | 98 | requires="Trellis-Net-P4-Setup.Verify-Apps"/> |
| 99 | </parallel> |
| 100 | </group> |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 101 | |
| 102 | <!-- Bring up mininet --> |
| 103 | <step name="Trellis-Net-P4-Setup.Start-Mininet" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 104 | 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] | 105 | exec="mininet-p4-trellis ${ONOS_INSTANCES}"/> |
| 106 | <step name="Trellis-Net-P4-Setup.Wait-For-Mininet" requires="Trellis-Net-P4-Setup.Start-Mininet" |
| 107 | exec="onos-mininet wait 10"/> |
| 108 | |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 109 | <!-- Push the trellis netcfg --> |
| 110 | <step name="Trellis-Net-P4-Setup.Config-Topo" |
| 111 | requires="Trellis-Net-P4-Setup.Wait-For-Mininet,Trellis-Net-P4-Setup.Push-Routing" |
| 112 | exec="onos-netcfg ${OC1} ${routing}/trellis/trellisp4.json"/> |
| 113 | |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 114 | <!-- clean up local routing repo if necessary --> |
Ray Milkey | 51cf307 | 2018-12-11 08:46:52 -0800 | [diff] [blame] | 115 | <step delay="10" name="Trellis-Net-P4-Setup.Clean-Routing" |
Carmelo Cascone | 4c3364b | 2018-12-13 15:56:34 -0800 | [diff] [blame] | 116 | requires="Trellis-Net-P4-Setup.Config-Topo" |
Andrea Campanella | 4f9085e | 2018-05-29 12:04:16 +0200 | [diff] [blame] | 117 | exec="onos-clean-routing ${routing_root}"/> |
| 118 | </group> |
| 119 | </scenario> |