archetypes.xml 4.5 KB
<!--
  ~ Copyright 2015-present Open Networking Laboratory
  ~
  ~ 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="archetypes" description="ONOS archetypes test">
    <group name="Archetypes" cwd="${WORKSPACE}/tmp/test-app">
        <step name="Clean-Up" cwd="${WORKSPACE}/tmp" env="~"
              exec="rm -r test-app"/>

        <step name="Create-App" cwd="${WORKSPACE}/tmp" requires="^"
              exec="onos-create-app app org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-App" requires="Create-App" exec="mvn clean install"/>
        <step name="Install-App" requires="^"
              exec="onos-app ${OCI} install! target/test-app-1.2.3.oar"/>
        <step name="Verify-App" requires="^" delay="5"
              exec="onos ${OCI} scr:details org.test.app.AppComponent"
              FIXME="onos-check-components ${OCI} org.test.app.AppComponent"/>

        <step name="Create-App-CLI-Overlay" requires="Install-App"
              exec="onos-create-app cli org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-App-With-CLI" requires="^"
              exec="mvn clean install"/>
        <step name="Reinstall-App-With-CLI" requires="^,~Verify-App"
              exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
        <step name="Verify-CLI" requires="^" delay="2"
              exec="onos ${OCI} sample"/>

        <step name="Create-App-UI-Overlay" requires="Reinstall-App-With-CLI"
              exec="onos-create-app ui org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-App-With-UI" requires="^"
              exec="mvn clean install"/>
        <step name="Reinstall-App-With-UI" requires="^,~Verify-CLI"
              exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
        <step name="Verify-UI" requires="^" delay="2"
              exec="onos-check-views ${OCI} id=sample"/>

        <step name="Create-App-UI-Table-Overlay" requires="Reinstall-App-With-UI"
              exec="onos-create-app uitab org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-App-With-UI-Table" requires="^"
              exec="mvn clean install"/>
        <step name="Reinstall-App-With-UI-Table" requires="^,~Verify-UI"
              exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
        <step name="Verify-UI-Table" requires="^" delay="2"
              exec="onos-check-views ${OCI} id=sample"/>

        <step name="Create-App-UI-Topo-Overlay" requires="Reinstall-App-With-UI-Table"
              exec="onos-create-app uitopo org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-App-With-UI-Topo" requires="^"
              exec="mvn clean install"/>
        <step name="Reinstall-App-With-UI-Topo" requires="^,~Verify-UI-Table"
              exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
        <step name="Verify-UI-Topo" requires="^" delay="2"
              exec="onos-check-views ${OCI} id=sample"/>

        <step name="Create-REST-Overlay" requires="^"
              exec="onos-create-app rest org.test.app test-app 1.2.3 org.test.app -DinteractiveMode=false"/>
        <step name="Build-REST-App" requires="^"
              exec="mvn clean install"/>
        <step name="Install-REST-App" requires="^,~Verify-UI-Topo"
              exec="onos-app ${OCI} reinstall! target/test-app-1.2.3.oar"/>
        <step name="Verify-REST-CLI" requires="^" delay="2"
              exec="onos ${OCI} sample"/>
        <step name="Verify-REST-App" requires="^" delay="2"
              exec="curl --fail -isS --user ${ONOS_WEB_USER}:${ONOS_WEB_PASS} http://${OCI}:8181/onos/test-app/sample"/>

        <step name="Uninstall-App" requires="^"
              exec="onos-app ${OCI} uninstall org.foo.app"/>

        <parallel var="${OC#}">
            <step name="Archetypes-Check-Logs-${#}" requires="Uninstall-App"
                  exec="onos-check-logs ${OC#}"/>
        </parallel>
    </group>
</scenario>