Add support for using onos-form-cluster in stc setup
Change-Id: Ic35e2bbc08a5f4df6dc0a866343ccb5e6a8e891e
diff --git a/tools/test/bin/onos-config b/tools/test/bin/onos-config
index 84b9764..b6b5a49 100755
--- a/tools/test/bin/onos-config
+++ b/tools/test/bin/onos-config
@@ -62,9 +62,11 @@
"
# Generate a default cluster.json from the ON* environment variables
-CDEF_FILE=/tmp/${remote}.cluster.json
-onos-gen-partitions $CDEF_FILE
-scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/cluster.json
+if [[ -z "${ONOS_STC_FORM_START}" ]]; then
+ CDEF_FILE=/tmp/${remote}.cluster.json
+ onos-gen-partitions $CDEF_FILE
+ scp -q $CDEF_FILE $remote:$ONOS_INSTALL_DIR/config/cluster.json
+fi
# Copy tools/package/config/ to remote
scp -qr ${ONOS_ROOT}/tools/package/config/ $remote:$ONOS_INSTALL_DIR/
diff --git a/tools/test/scenarios/setup.xml b/tools/test/scenarios/setup.xml
index e87996d..ae55e77 100644
--- a/tools/test/scenarios/setup.xml
+++ b/tools/test/scenarios/setup.xml
@@ -58,7 +58,10 @@
<step name="Wait-for-Start-${#}" exec="onos-wait-for-start ${OC#}"
requires="~Secure-SSH-${#}"/>
- <step name="Check-Nodes-${#}" exec="onos-check-nodes ${OC#}" delay="3"
+ <step name="Check-Nodes-${#}"
+ exec="onos-check-nodes ${OC#}"
+ unless="${ONOS_STC_FORM_START}"
+ delay="3"
requires="~Wait-for-Start-${#}"/>
<step name="Check-Components-${#}" delay="5"
exec="onos-check-components ${OC#}"
@@ -73,5 +76,23 @@
</parallel>
</group>
+ <group name="Form" if="${ONOS_STC_FORM_START}" requires="Verify">
+ <step name="Form-Cluster" exec="onos-form-cluster cell"/>
+ <parallel var="${OC#}">
+ <step name="Form-Cluster-Wait-for-Start-${#}" exec="onos-wait-for-start ${OC#}"
+ requires="Form-Cluster"/>
+
+ <step name="Form-Cluster-Check-Nodes-${#}" exec="onos-check-nodes ${OC#}" delay="3"
+ requires="~Form-Cluster-Wait-for-Start-${#}"/>
+ <step name="Form-Cluster-Check-Components-${#}" delay="5"
+ exec="onos-check-components ${OC#}"
+ requires="~Form-Cluster-Wait-for-Start-${#}"/>
+
+ <step name="Form-Cluster-Check-Logs-${#}" exec="onos-check-logs ${OC#}"
+ requires="~Form-Cluster-Check-Components-${#}"/>
+ <step name="Form-Cluster-Check-Apps-${#}" exec="onos-check-apps ${OC#} ${ONOS_APPS} includes"
+ requires="~Form-Cluster-Check-Components-${#}"/>
+ </parallel>
+ </group>
</group>
</scenario>