blob: 519d98d7c0d916ce043469c68cb817dee3184c89 [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}"/>
Carmelo Cascone0bcbe262019-02-28 23:14:28 -080021 <step name="Trellis-Net-P4-Setup.Push-Bmv2" exec="onos-push-bmv2-py ${OCN}"/>
Andrea Campanella4f9085e2018-05-29 12:04:16 +020022
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"/>
Carmelo Casconeb450e442019-07-08 11:59:40 -070046 <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 Campanella4f9085e2018-05-29 12:04:16 +020052 </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 Casconeb07f2b52019-07-12 14:01:39 -070080 <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 Campanella4f9085e2018-05-29 12:04:16 +020086 </group>
87
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080088 <group name="Trellis-Net-P4-Setup.Verify-Apps" requires="Trellis-Net-P4-Setup.Activate-Apps">
89 <parallel var="${OC#}">
Carmelo Casconeb07f2b52019-07-12 14:01:39 -070090 <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 Cascone4c3364b2018-12-13 15:56:34 -080091 requires="Trellis-Net-P4-Setup.Activate-Apps"/>
92 </parallel>
93 </group>
Andrea Campanella4f9085e2018-05-29 12:04:16 +020094
Carmelo Cascone4c3364b2018-12-13 15:56:34 -080095 <group name="Trellis-Net-P4-Setup.Verify-Pipeconfs" requires="Trellis-Net-P4-Setup.Verify-Apps">
96 <parallel var="${OC#}">
Ray Milkeyc05bd432019-01-14 09:50:16 -080097 <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 -080098 requires="Trellis-Net-P4-Setup.Verify-Apps"/>
99 </parallel>
100 </group>
Andrea Campanella4f9085e2018-05-29 12:04:16 +0200101
102 <!-- Bring up mininet -->
103 <step name="Trellis-Net-P4-Setup.Start-Mininet"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -0800104 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 +0200105 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 Cascone4c3364b2018-12-13 15:56:34 -0800109 <!-- 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 Campanella4f9085e2018-05-29 12:04:16 +0200114 <!-- clean up local routing repo if necessary -->
Ray Milkey51cf3072018-12-11 08:46:52 -0800115 <step delay="10" name="Trellis-Net-P4-Setup.Clean-Routing"
Carmelo Cascone4c3364b2018-12-13 15:56:34 -0800116 requires="Trellis-Net-P4-Setup.Config-Topo"
Andrea Campanella4f9085e2018-05-29 12:04:16 +0200117 exec="onos-clean-routing ${routing_root}"/>
118 </group>
119</scenario>