blob: db066906912fe36b0a84965892fdece79d2dfdd8 [file] [log] [blame]
<!--
~ Copyright 2016-present Open Networking Foundation
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<scenario name="meta-apps"
description="Openflow provider activate/deactivate test">
<group name="Meta-App">
<step name="InitialDeactivateOpenflowMetaApp"
exec="onos ${OCI} onos:app deactivate org.onosproject.openflow org.onosproject.hostprovider org.onosproject.lldpprovider org.onosproject.openflow-base"/>
<step name="InitialActivateOpenflowMetaApp" requires="InitialDeactivateOpenflowMetaApp"
exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
<!-- Check initial state of openflow apps -->
<group name="MetaAppInitialVerification" requires="InitialActivateOpenflowMetaApp">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInitial-${#}" ends="MetaAppTest.CheckLldpProviderInitial-${#-1}">
<step name="MetaAppTest.FindOpenflowInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInitial" />
<step name="MetaAppTest.CheckOpenflowInitial-${#}" requires="MetaAppTest.FindOpenflowInitial-${#}"
exec="test '${openflowAppInitialState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInitial" />
<step name="MetaAppTest.CheckOpenflowBaseInitial-${#}" requires="MetaAppTest.FindOpenflowBaseInitial-${#}"
exec="test '${openflowBaseInitialState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInitial" />
<step name="MetaAppTest.CheckHostProviderInitial-${#}" requires="MetaAppTest.FindHostProviderInitial-${#}"
exec="test '${hostProviderInitialState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderInitial-${#}"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInitial" />
<step name="MetaAppTest.CheckLldpProviderInitial-${#}" requires="MetaAppTest.FindLldpProviderInitial-${#}"
exec="test '${lldpProviderInitialState}' == 'active'"/>
</parallel>
</group>
<!-- Deactivate openflow meta app -->
<step name="MetaAppTest.DeactivateOpenflowMetaApp" requires="MetaAppInitialVerification"
exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/>
<!-- Check that openflow apps are no longer active -->
<group name="MetaAppInactive" requires="MetaAppTest.DeactivateOpenflowMetaApp,MetaAppInitialVerification">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowInactive-${#}" ends="MetaAppTest.CheckLldpProviderInactive-${#-1}">
<step name="MetaAppTest.FindOpenflowInactive-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppInactive" />
<step name="MetaAppTest.CheckOpenflowInactive-${#}" requires="^"
exec="test '${openflowAppInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindOpenflowBaseInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseInactive" />
<step name="MetaAppTest.CheckOpenflowBaseInactive-${#}" requires="^"
exec="test '${openflowBaseInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindHostProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderInactive" />
<step name="MetaAppTest.CheckHostProviderInactive-${#}" requires="^"
exec="test '${hostProviderInactiveState}' == 'inactive'"/>
<step name="MetaAppTest.FindLldpProviderInactive-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderInactive" />
<step name="MetaAppTest.CheckLldpProviderInactive-${#}" requires="^"
exec="test '${lldpProviderInactiveState}' == 'inactive'"/>
</parallel>
</group>
<!-- Reactivate openflow meta app -->
<step name="MetaAppTest.ReactivateOpenflowMetaApp" requires="MetaAppInactive"
exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
<!-- Check that openflow apps are now active again -->
<group name="MetaAppReactivated" requires="MetaAppTest.ReactivateOpenflowMetaApp,MetaAppInactive,MetaAppInitialVerification">
<parallel var="${OC#}" starts="MetaAppTest.FindOpenflowReactivated-${#}" ends="MetaAppTest.CheckLldpProviderRectivated-${#-1}">
<step name="MetaAppTest.FindOpenflowReactivated-${#}"
exec="onos-find-app ${OC#} org.onosproject.openflow openflowAppReactivated" />
<step name="MetaAppTest.CheckOpenflowReactivated-${#}" requires="^"
exec="test '${openflowAppReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindOpenflowBaseReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.openflow-base openflowBaseReactivated" />
<step name="MetaAppTest.CheckOpenflowBaseReactivated-${#}" requires="^"
exec="test '${openflowBaseReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindHostProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.hostprovider hostProviderReactivated" />
<step name="MetaAppTest.CheckHostProviderReactivated-${#}" requires="^"
exec="test '${hostProviderReactivatedState}' == 'active'"/>
<step name="MetaAppTest.FindLldpProviderReactivated-${#}" requires="^"
exec="onos-find-app ${OC#} org.onosproject.lldpprovider lldpProviderReactivated" />
<step name="MetaAppTest.CheckLldpProviderReactivated-${#}" requires="^"
exec="test '${lldpProviderReactivatedState}' == 'active'"/>
</parallel>
</group>
</group>
</scenario>