blob: db066906912fe36b0a84965892fdece79d2dfdd8 [file] [log] [blame]
Ray Milkey97dfd1e2016-06-20 17:04:19 -07001<!--
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 ~ Copyright 2016-present Open Networking Foundation
Ray Milkey97dfd1e2016-06-20 17:04:19 -07003 ~
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<scenario name="meta-apps"
17 description="Openflow provider activate/deactivate test">
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070018 <group name="Meta-App">
Thomas Vachuska35da9072018-04-09 15:37:04 -070019 <step name="InitialDeactivateOpenflowMetaApp"
20 exec="onos ${OCI} onos:app deactivate org.onosproject.openflow org.onosproject.hostprovider org.onosproject.lldpprovider org.onosproject.openflow-base"/>
21 <step name="InitialActivateOpenflowMetaApp" requires="InitialDeactivateOpenflowMetaApp"
22 exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
23
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070024 <!-- Check initial state of openflow apps -->
Thomas Vachuska4f628182018-04-10 09:39:18 -070025 <group name="MetaAppInitialVerification" requires="InitialActivateOpenflowMetaApp">
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070026 <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}">
27 <step name="MetaAppTest.FindOpenflowInitial-${#}"
28 exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" />
29 <step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}"
30 exec="test '${openflowAppInitialState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070031
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070032 <step name="MetaAppTest.FindOpenflowBaseInitial-${#}"
33 exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" />
34 <step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}"
35 exec="test '${openflowBaseInitialState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070036
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070037 <step name="MetaAppTest.FindHostProviderInitial-${#}"
38 exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" />
39 <step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}"
40 exec="test '${hostProviderInitialState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070041
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070042 <step name="MetaAppTest.FindLldpProviderInitial-${#}"
43 exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" />
44 <step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}"
45 exec="test '${lldpProviderInitialState}' == 'active'"/>
46 </parallel>
47 </group>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070048
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070049 <!-- Deactivate openflow meta app -->
50 <step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification"
51 exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070052
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070053 <!-- Check that openflow apps are no longer active -->
54 <group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification">
55 <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}">
56 <step name="MetaAppTest.FindOpenflowInactive-${#}"
57 exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" />
58 <step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^"
59 exec="test '${openflowAppInactiveState}' == 'inactive'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070060
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070061 <step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^"
62 exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" />
63 <step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^"
64 exec="test '${openflowBaseInactiveState}' == 'inactive'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070065
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070066 <step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^"
67 exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" />
68 <step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^"
69 exec="test '${hostProviderInactiveState}' == 'inactive'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070070
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070071 <step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^"
72 exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" />
73 <step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^"
74 exec="test '${lldpProviderInactiveState}' == 'inactive'"/>
75 </parallel>
76 </group>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070077
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070078 <!-- Reactivate openflow meta app -->
79 <step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive"
80 exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070081
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070082 <!-- Check that openflow apps are now active again -->
83 <group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification">
84 <parallel var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}">
85 <step name="MetaAppTest.FindOpenflowReactivated-${#}"
86 exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" />
87 <step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^"
88 exec="test '${openflowAppReactivatedState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070089
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070090 <step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^"
91 exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" />
92 <step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^"
93 exec="test '${openflowBaseReactivatedState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070094
Thomas Vachuska32faf2b2016-07-05 16:19:01 -070095 <step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^"
96 exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" />
97 <step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^"
98 exec="test '${hostProviderReactivatedState}' == 'active'"/>
Ray Milkey97dfd1e2016-06-20 17:04:19 -070099
Thomas Vachuska32faf2b2016-07-05 16:19:01 -0700100 <step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^"
101 exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" />
102 <step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^"
103 exec="test '${lldpProviderReactivatedState}' == 'active'"/>
104 </parallel>
105 </group>
Ray Milkey97dfd1e2016-06-20 17:04:19 -0700106
Ray Milkey97dfd1e2016-06-20 17:04:19 -0700107 </group>
108
109</scenario>