blob: fae54f86da58941f9232a43bbc21e13efcb91608 [file] [log] [blame]
Andrea Campanella4f9085e2018-05-29 12:04:16 +02001<!--
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 Campanella4f9085e2018-05-29 12:04:16 +020020 <step name="Trellis-Net-P4-Setup.Push-Routing" exec="onos-push-routing ${OCN}"/>
21 <step name="Trellis-Net-P4-Setup.Push-Bmv2" exec="onos-push-bmv2 ${OCN}"/>
22
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080023 <!-- Stop/cleanup mininet -->
Andrea Campanella4f9085e2018-05-29 12:04:16 +020024 <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 Cascone4c3364b2018-12-13 15:56:34 -080026 <!-- 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 Campanella4f9085e2018-05-29 12:04:16 +020029 <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 Cascone4c3364b2018-12-13 15:56:34 -080076 <group name="Trellis-Net-P4-Setup.Verify-Apps" requires="Trellis-Net-P4-Setup.Activate-Apps">
77 <parallel var="${OC#}">
Ray Milkeyc05bd432019-01-14 09:50:16 -080078 <step name="Trellis-Net-P4-Setup.Check-Apps-${#}" exec="onos-check-apps ${OC#} drivers.bmv2,pipelines.fabric,generaldeviceprovider includes"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080079 requires="Trellis-Net-P4-Setup.Activate-Apps"/>
80 </parallel>
81 </group>
Andrea Campanella4f9085e2018-05-29 12:04:16 +020082
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080083 <group name="Trellis-Net-P4-Setup.Verify-Pipeconfs" requires="Trellis-Net-P4-Setup.Verify-Apps">
84 <parallel var="${OC#}">
Ray Milkeyc05bd432019-01-14 09:50:16 -080085 <step name="Trellis-Net-P4-Setup.Check-Pipeconfs-${#}" exec="onos-check-pipeconfs ${OC#} org.onosproject.pipelines.fabric includes"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080086 requires="Trellis-Net-P4-Setup.Verify-Apps"/>
87 </parallel>
88 </group>
Andrea Campanella4f9085e2018-05-29 12:04:16 +020089
90 <!-- Bring up mininet -->
91 <step name="Trellis-Net-P4-Setup.Start-Mininet"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080092 requires="Trellis-Net-P4-Setup.Verify-Apps,Trellis-Net-P4-Setup.Verify-Pipeconfs,Trellis-Net-P4-Setup.Set-Up-Trellis"
Andrea Campanella4f9085e2018-05-29 12:04:16 +020093 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 Cascone4c3364b2018-12-13 15:56:34 -080097 <!-- 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 Campanella4f9085e2018-05-29 12:04:16 +0200102 <!-- clean up local routing repo if necessary -->
Ray Milkey51cf3072018-12-11 08:46:52 -0800103 <step delay="10" name="Trellis-Net-P4-Setup.Clean-Routing"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -0800104 requires="Trellis-Net-P4-Setup.Config-Topo"
Andrea Campanella4f9085e2018-05-29 12:04:16 +0200105 exec="onos-clean-routing ${routing_root}"/>
106 </group>
107</scenario>