Merge "Fixed the CSIT Failures"
authorGary Wu <gary.i.wu@huawei.com>
Mon, 10 Dec 2018 19:30:40 +0000 (19:30 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 10 Dec 2018 19:30:40 +0000 (19:30 +0000)
108 files changed:
plans/aaf/aafapi/setup.sh
plans/aaf/aafapi/teardown.sh
plans/dcaegen2-collectors-hv-ves/testsuites/.env [new file with mode: 0644]
plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml
plans/dmaap-datarouter/dr-suite/setup.sh
plans/music/music-test-plan/setup.sh
plans/music/music-test-plan/teardown.sh
plans/optf-cmso/cmso/setup.sh [new file with mode: 0644]
plans/optf-cmso/cmso/teardown.sh [new file with mode: 0644]
plans/optf-cmso/cmso/testplan.txt [new file with mode: 0644]
plans/so/integration-testing/docker-compose.yml [new file with mode: 0644]
plans/so/integration-testing/setup.sh
plans/so/integration-testing/teardown.sh
plans/usecases/5G-bulkpm/setup.sh
scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh [new file with mode: 0644]
scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh [new file with mode: 0644]
scripts/optf-cmso/cmso/start_cmso_containers.sh [new file with mode: 0644]
scripts/optf-cmso/cmso/wait_for_port.sh [new file with mode: 0755]
scripts/optf-has/has/has-properties/conductor.conf.onap
scripts/optf-has/has/has-properties/has.json
scripts/optf-has/has/has_script.sh
scripts/optf-has/has/music_script.sh
scripts/optf-has/has/music_teardown_script.sh
scripts/optf-osdf/osdf/osdf_script.sh
tests/clamp/APIs/data/createClHolmes1.json
tests/clamp/UIs/03__Verify_UI_Models.robot
tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json
tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json
tests/dcaegen2/prh-testcases/resources/docker-compose.yml
tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.password [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.aai.key [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dmaap-bc.key [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key [deleted file]
tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.password [new file with mode: 0644]
tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py
tests/optf-cmso/cmso/attlibs/CurlLibrary.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/HTTPUtils.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/JSONUtils.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/OSUtils.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/RequestsClientCert.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/StringTemplater.py [new file with mode: 0644]
tests/optf-cmso/cmso/attlibs/UID.py [new file with mode: 0644]
tests/optf-cmso/cmso/resources/approval_requests.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData1.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData2.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData3.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/MultipleVnfImmediate.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediate.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/assets/templates/changemanagement/VidCallbackData.json.template [new file with mode: 0644]
tests/optf-cmso/cmso/resources/browser_setup.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/change_management_ete.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/create_schedule.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/files.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/json_templater.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/misc.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/scheduler_common.robot [new file with mode: 0644]
tests/optf-cmso/cmso/resources/vtm_common.robot [new file with mode: 0644]
tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot [new file with mode: 0644]
tests/optf-cmso/cmso/testsuites/__init__.robot [new file with mode: 0644]

index 33c524d..6c88ceb 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # ============LICENSE_END============================================
-# ===================================================================
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
 #
-# Place the scripts in run order:
-source ${SCRIPTS}/common_functions.sh
-
-# Clone AAF Authz repo
-mkdir -p $WORKSPACE/archives/opt
-cd $WORKSPACE/archives/opt
-
-
-HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
-export HOST_IP=${HOST_IP}
 
-CURRENT_DIR=$(pwd) export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
-
-NEXUS_USERNAME=anonymous
-NEXUS_PASSWD=anonymous
-NEXUS_DOCKER_REPO=nexus3.onap.org:10001
-AAF_DOCKER_VERSION=2.1.5
-
-docker login -u $NEXUS_USERNAME -p "$NEXUS_PASSWD" $NEXUS_DOCKER_REPO
-
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_service:$AAF_DOCKER_VERSION
-
-docker tag $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION nexus3.onap.org:10003/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
-docker tag $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION nexus3.onap.org:10003/onap/aaf/aaf_cass:2.1.6-SNAPSHOT
-docker tag $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION $NEXUS_DOCKER_REPO/onap/aaf/aaf_cass:2.1.6-SNAPSHOT
-
-git clone --depth 1 http://gerrit.onap.org/r/aaf/authz -b master
-git pull
-chmod -R 777 authz
-cd authz
+echo "AAF setup.sh"
+# Starting Directory
 CURRENT_DIR=$(pwd)
 
-pwd
-
-if [ ! -e auth/csit/d.props ]; then
-  cp auth/csit/d.props.init auth/csit/d.props
-fi
-
-if [ ! -e auth/docker/d.props ]; then
-  cp auth/docker/d.props.init auth/docker/d.props
+if [ "$(uname)" = "Darwin" ]; then
+  SED="sed -i .bak"
+else
+  SED="sed -i"
 fi
 
-NEXUS_USERNAME=anonymous
-NEXUS_PASSWD=anonymous
-NEXUS_DOCKER_REPO=nexus3.onap.org:10001
-sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/" auth/csit/d.props
-. auth/csit/d.props
-
-
-
-HOSTNAME=`hostname`
-FQDN=aaf.api.simpledemo.onap.org
-HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
-export HOST_IP=${HOST_IP}
-
-
-CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
-CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
-
-cd auth/auth-cass/docker
-if [ "`docker container ls | grep aaf_cass`" = "" ]; then
-  # Cassandra Install
-  echo Cassandra Install
-  bash ./dinstall.sh
-fi
+# Place the scripts in run order:
+source ${SCRIPTS}/common_functions.sh
 
-CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
-CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
-if [ ! -e $WORKSPACE/archives/opt/authz/auth/csit/cass.props ]; then
-  cp $WORKSPACE/archives/opt/authz/auth/csit/cass.props.init $WORKSPACE/archives/opt/authz/auth/csit/cass.props
+# Clone AAF Authz repo
+CODE_DIR="$WORKSPACE/archives/opt"
+mkdir -p $CODE_DIR
+cd $CODE_DIR
+
+# Get or refresh AAF Code set
+if [ -e authz ]; then
+  cd authz
+  git pull
+else
+  git clone --depth 1 http://gerrit.onap.org/r/aaf/authz -b master
+  chmod -R 777 authz
+  cd authz
 fi
 
-sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" $WORKSPACE/archives/opt/authz/auth/csit/cass.props
-
 
-# TODO Pull from Config Dir
-if [ "$LATITUDE" = "" ]; then
-  LATITUDE=37.781
-  LONGITUDE=-122.261
-  sed -i "s/LATITUDE=.*/LATITUDE=$LATITUDE/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
-  sed -i "s/LONGITUDE=.*/LONGITUDE=$LONGITUDE/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
+# Locate to Docker dir
+cd auth/docker
+if [ ! -e d.props ]; then
+  cp d.props.init d.props
 fi
+source d.props
+
+# Fill in anything missing
+$SED "s/^LATITUDE=.*/LATITUDE=${LATITUDE:=38.0}/" d.props
+$SED "s/^LONGITUDE=.*/LONGITUDE=${LONGITUDE:=-72.0}/" d.props
+# For Jenkins, gotta use 10001, not 10003
+DOCKER_REPOSITORY=nexus3.onap.org:10001
+$SED "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$DOCKER_REPOSITORY/"  d.props
+
+$SED "s/HOSTNAME=.*/HOSTNAME=aaf.api.simpledemo.onap.org/"  d.props
+DOCKER_NAME=$(docker info | grep Name | awk '{print $2}' )
+echo "Docker Name is $DOCKER_NAME"
+
+if [ "$DOCKER_NAME" = "minikube" ]; then
+  echo "Minikube IP"
+  HOST_IP=$(minikube ip)
+else 
+  echo "Trying to get IP from Docker $DOCKER_NAME with 'ip route' method"
+  # ip route get 8.8.8.8
+  HOST_IP=$(ip route get 8.8.8.8 | awk '{print $7}')
+  if [ -z "$HOST_IP" ]; then
+     echo "Critical HOST_IP could not be obtained by 2 different methods.  Exiting..."
+     exit
+  fi
+  echo 
+fi
+$SED "s/HOST_IP=.*/HOST_IP=$HOST_IP/" d.props
 
-sed -i "s/VERSION=.*/VERSION=$VERSION/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
-sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
-sed -i "s/HOST_IP=.*/HOST_IP=$HOST_IP/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
-sed -i "s/AAF_REGISTER_AS=.*/AAF_REGISTER_AS=$FQDN/g" $WORKSPACE/archives/opt/authz/auth/csit/d.props
-
-pwd
-
-cd ../../
-
-pwd
-
-cd csit
-tty
-# Need new Deployment system properties
-bash ./aaf.sh
+cat d.props
 
-# run it
+# Pull latest Dockers
+AAF_DOCKER_VERSION=${VERSION}
+NEXUS_USERNAME=anonymous
+NEXUS_PASSWD=anonymous
+echo "$NEXUS_PASSWD" | docker login -u $NEXUS_USERNAME --password-stdin $DOCKER_REPOSITORY
+
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
+docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_service:$AAF_DOCKER_VERSION
+
+# Cassandra Install/Start
+cd ../auth-cass/docker
+echo Cassandra Install
+bash ./dinstall.sh
+cd -
+
+source d.props
+cat d.props
+
+# AAF Run
 bash ./drun.sh
 
 docker images
 
 docker ps -a
 
-cat /etc/sudoers
-
-docker logs aaf_hello
-
-docker logs aaf_locate
-
-docker logs aaf_cm
-
-docker logs aaf_gui
-
-docker logs aaf_fs
-
-docker logs aaf_oauth
-
-docker logs aaf_service
-
-# Wait for initialization of Docker containers
-for i in {1..50}; do
-        if [ $(docker inspect --format '{{ .State.Running }}' aaf_hello) ] && \
-                [ $(docker inspect --format '{{ .State.Running }}' aaf_cm) ] && \
-                               [ $(docker inspect --format '{{ .State.Running }}' aaf_fs) ] && \
-                               [ $(docker inspect --format '{{ .State.Running }}' aaf_gui) ] && \
-                               [ $(docker inspect --format '{{ .State.Running }}' aaf_oauth) ] && \
-                               [ $(docker inspect --format '{{ .State.Running }}' aaf_locate) ] && \
-                [ $(docker inspect --format '{{ .State.Running }}' aaf_service) ]
-        then
-                echo "aaf Service Running"
-                break
-        else
-                echo sleep $i
-                sleep $i
-        fi
+for C in aaf_service aaf_locate aaf_oauth aaf_cm aaf_gui aaf_hello aaf_fs; do
+  docker logs $C
 done
 
-
+bash ./aaf.sh wait aaf_service
 
 AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aaf_service)
-CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' aaf_cass)
-
 echo AAF_IP=${AAF_IP}
-echo CASSANDRA_IP=${CASSANDRA_IP}
-
-# Wait for initialization of docker services
-for i in {1..12}; do
-   curl -k -u aaf_admin@people.osaaf.org:demo123456! https://${AAF_IP}:8100/authz/nss/org.osaaf.people && break
-    echo sleep $i
-    sleep $i
-done
 
 #Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"
\ No newline at end of file
+ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"
index 742a1b3..f80c3ad 100644 (file)
@@ -1,28 +1,30 @@
 #!/bin/bash
 #
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
-#
+# ============LICENSE_START=======================================================
+# ONAP AAF
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+#                             reserved.
+# ================================================================================
 # 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
+# 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.
-#
-# Modifications copyright (c) 2017 AT&T Intellectual Property
+# ============LICENSE_END============================================
 #
 
+echo "AAF Teardown"
+cd "$WORKSPACE/archives/opt/authz/auth/docker"
+bash dstop.sh
+bash dstop.sh cass
+echo "Y" | docker container prune
+docker volume remove aaf_config aaf_cass_data aaf_status
+cd -
 
-kill-instance.sh aaf_service
-kill-instance.sh aaf_locate
-kill-instance.sh aaf_hello
-kill-instance.sh aaf_cm
-kill-instance.sh aaf_gui
-kill-instance.sh aaf_fs
-kill-instance.sh aaf_oauth
-kill-instance.sh aaf_cass
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/.env b/plans/dcaegen2-collectors-hv-ves/testsuites/.env
new file mode 100644 (file)
index 0000000..a64ba26
--- /dev/null
@@ -0,0 +1,13 @@
+
+HV_VES_COLLECTOR_NAMESPACE=onap
+HV_VES_GROUP_ID=org.onap.dcaegen2.collectors.hv-ves
+HV_VES_IMAGE=hv-collector-main
+DCAE_APP_SIMULATOR_IMAGE=hv-collector-dcae-app-simulator
+
+# IF CHANGING BELOW VALUE, REMEMBER TO UPDATE ALSO XNF-SIMULATOR VERSION
+# IN XNF_SIMULATOR_LIBRARY PYTHON FILE.
+HV_VES_VERSION=1.1-SNAPSHOT
+
+HV_VES_CONFIG_URL=http://consul:8500/v1/kv/veshv-config?raw=true
+HV_VES_HEALTHCHECK_CMD=curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061
+HV_VES_MAIN_CLASS=org.onap.dcae.collectors.veshv.main.MainKt
\ No newline at end of file
index 2a92821..9ba2775 100644 (file)
@@ -9,92 +9,91 @@ services:
   zookeeper:
     image: wurstmeister/zookeeper
     ports:
-      - "2181:2181"
+    - "2181:2181"
     networks:
-      - ves-hv-default
+    - ves-hv-default
 
   kafka:
     image: wurstmeister/kafka
     ports:
-      - "9092:9092"
+    - "9092:9092"
     environment:
       KAFKA_ADVERTISED_HOST_NAME: "kafka"
       KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
       KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
       KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
     volumes:
-      - /var/run/docker.sock:/var/run/docker.sock
+    - /var/run/docker.sock:/var/run/docker.sock
     depends_on:
-      - zookeeper
+    - zookeeper
     networks:
-      - ves-hv-default
+    - ves-hv-default
 
   consul:
     image: progrium/consul
     ports:
-      - "8500:8500"
+    - "8500:8500"
     environment:
-      - CONSUL_BIND_INTERFACE=eth0
+    - CONSUL_BIND_INTERFACE=eth0
     networks:
       ves-hv-default:
         aliases:
-           - consul
+        - consul
     command: ["-server", "-bootstrap"]
 
   ves-hv-collector:
-    image: ${DOCKER_REGISTRY_PREFIX}onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:latest
+    image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
     ports:
-      - "6060:6060"
-      - "6061:6061/tcp"
-    entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"]
-    command: ["--listen-port", "6061",
-              "--config-url", "http://consul:8500/v1/kv/veshv-config",
+    - "6060:6060"
+    - "6061:6061/tcp"
+    entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", "-cp", "*:", "${HV_VES_MAIN_CLASS}"]
+    command: ["--listen-port", "6061","--config-url", "${HV_VES_CONFIG_URL}",
               "--key-store-password", "onaponap",
               "--trust-store-password", "onaponap"]
     healthcheck:
       interval: 10s
       timeout: 5s
       retries: 2
-      test: "curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061"
+      test: ${HV_VES_HEALTHCHECK_CMD}
     depends_on:
-      - kafka
+    - kafka
     volumes:
-      - ./ssl/:/etc/ves-hv/
+    - ./ssl/:/etc/ves-hv/
     networks:
-      - ves-hv-default
+    - ves-hv-default
 
   unencrypted-ves-hv-collector:
-    image: ${DOCKER_REGISTRY_PREFIX}onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:latest
+    image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
     ports:
-      - "7060:6060"
-      - "7061:6061/tcp"
-    entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", "-cp", "*:", "org.onap.dcae.collectors.veshv.main.MainKt"]
-    command: ["--listen-port", "6061","--config-url", "http://consul:8500/v1/kv/veshv-config", "--ssl-disable"]
+    - "7060:6060"
+    - "7061:6061/tcp"
+    entrypoint: ["java", "-Dio.netty.leakDetection.level=paranoid", "-cp", "*:", "${HV_VES_MAIN_CLASS}"]
+    command: ["--listen-port", "6061","--config-url", "${HV_VES_CONFIG_URL}", "--ssl-disable"]
     healthcheck:
       interval: 10s
       timeout: 5s
       retries: 2
-      test: "curl --request GET --fail --silent --show-error localhost:6060/health/ready && nc -vz localhost 6061"
+      test: ${HV_VES_HEALTHCHECK_CMD}
     depends_on:
-      - kafka
+    - kafka
     volumes:
-      - ./ssl/:/etc/ves-hv/
+    - ./ssl/:/etc/ves-hv/
     networks:
-      - ves-hv-default
+    - ves-hv-default
 
   dcae-app-simulator:
-    image: ${DOCKER_REGISTRY_PREFIX}onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator:latest
+    image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${DCAE_APP_SIMULATOR_IMAGE}:${HV_VES_VERSION}
     ports:
-      - "6063:6063/tcp"
-    command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "ves_hvRanMeas"]
+    - "6063:6063/tcp"
+    command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "non-existing-topic"]
     healthcheck:
       interval: 10s
       timeout: 5s
       retries: 2
       test: "curl --request GET --fail --silent --show-error localhost:6063/healthcheck"
     depends_on:
-      - kafka
+    - kafka
     networks:
       ves-hv-default:
         aliases:
-           - dcae-app-simulator
\ No newline at end of file
+        - dcae-app-simulator
\ No newline at end of file
index dedf15b..22d727a 100755 (executable)
@@ -30,6 +30,27 @@ for i in {1..10}; do
     fi
 done
 
+# Wait for healthy container datarouter-prov
+for i in {1..10}; do
+    if [ "$(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)" = 'healthy' ]
+    then
+        echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
+        echo "DR Service Running, datarouter-prov container is healthy"
+        break
+    else
+        echo datarouter-prov.State.Health.Status is $(docker inspect --format '{{ .State.Health.Status }}' datarouter-prov)
+        echo sleep $i
+        sleep $i
+        if [ $i = 10 ]
+        then
+            echo datarouter-prov container is not in healthy state - the test is not made, teardown...
+            cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
+            docker-compose down -v
+            exit 1
+        fi
+    fi
+done
+
 DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
 DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
 DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov)
index add34b1..1b4896e 100755 (executable)
@@ -68,17 +68,15 @@ docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001"
 -v $MUSIC_TRIGGER_DIR/$TRIGGER_JAR:/etc/cassandra/triggers/$TRIGGER_JAR \
 ${CASS_IMG};
 
+# See if cassandra is up.
+echo "########## Running Test to see if Cassandra is up ##########"
 CASSA_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-db`
 echo "CASSANDRA_IP=${CASSA_IP}"
 ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042
 
-# See if cassandra is up.
-echo "########## Running Test to see if Cassandra is up ##########"
-docker run --name music-casstest --network music-net \
-$BUSYBOX_IMG sh -c "until nc -z music-db 9042 && echo "success"; do echo 'No connection .. Sleeping for $TT seconds';sleep $TT; done;"
-
 # Sleep 60 seconds to ensure Cassandra is up and running. 
 sleep 60;
+
 # Check to see if Keyspaces are there. 
 docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;"
 
index e05ef9d..2e7d707 100755 (executable)
@@ -40,14 +40,12 @@ docker stop music-tomcat
 docker stop music-war
 docker stop music-zk
 docker stop music-job
-docker stop music-casstest
 docker stop music-db
 
 docker rm music-zk
 docker rm music-tomcat
 docker rm music-war
 docker rm music-job
-docker rm music-casstest
 docker rm music-db
 
 docker network rm music-net;
diff --git a/plans/optf-cmso/cmso/setup.sh b/plans/optf-cmso/cmso/setup.sh
new file mode 100644 (file)
index 0000000..c30d830
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+#
+# Place the scripts in run order:
+
+source ${WORKSPACE}/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh
+
+source ${WORKSPACE}/scripts/optf-cmso/cmso/start_cmso_containers.sh
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+#ROBOT_VARIABLES="-v TEST:${TEST}"
diff --git a/plans/optf-cmso/cmso/teardown.sh b/plans/optf-cmso/cmso/teardown.sh
new file mode 100644 (file)
index 0000000..23f5bf3
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+
+
+source ${WORKSPACE}/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh
+
diff --git a/plans/optf-cmso/cmso/testplan.txt b/plans/optf-cmso/cmso/testplan.txt
new file mode 100644 (file)
index 0000000..7645a85
--- /dev/null
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+optf-cmso/cmso/testsuites
diff --git a/plans/so/integration-testing/docker-compose.yml b/plans/so/integration-testing/docker-compose.yml
new file mode 100644 (file)
index 0000000..7273c4e
--- /dev/null
@@ -0,0 +1,296 @@
+version: '3'
+services:
+################################################################################
+  mariadb:
+    image: ${NEXUS_DOCKER_REPO_MSO}/mariadb:10.1.11
+    ports:
+      - "3306:3306"
+    volumes:
+      - ./test_lab/volumes/mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
+      - ./test_lab/volumes/mariadb/conf.d:/etc/mysql/conf.d
+    environment:
+      - MYSQL_ROOT_PASSWORD=password
+    hostname:
+      mariadb.so.testlab.onap.org
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+################################################################################
+  catalog-db-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/catalog-db-adapter:${TAG}
+    ports:
+      - "8082:8082"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/catalog-db-adapter/onapheat:/app/config
+    environment:
+      - APP=catalog-db-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      catalog-db-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - mariadb:3306
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  request-db-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/request-db-adapter:${TAG}
+    ports:
+      - "8083:8083"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/request-db-adapter/onapheat:/app/config
+    environment:
+      - APP=request-db-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      request-db-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - catalog-db-adapter:8082
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  sdnc-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdnc-adapter:${TAG}
+    ports:
+      - "8086:8086"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/sdnc-adapter/onapheat:/app/config
+    environment:
+      - APP=sdnc-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      sdnc-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  openstack-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/openstack-adapter:${TAG}
+    ports:
+      - "8087:8087"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/openstack-adapter/onapheat:/app/config
+    environment:
+      - APP=openstack-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      openstack-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  vfc-adapter:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/vfc-adapter:${TAG}
+    ports:
+      - "8084:8084"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/vfc-adapter/onapheat:/app/config
+    environment:
+      - APP=vfc-adapter
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      vfc-adapter.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  sdc-controller:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdc-controller:${TAG}
+    ports:
+      - "8085:8085"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/sdc-controller/onapheat:/app/config
+    environment:
+      - APP=sdc-controller
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      sdc-controller.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  bpmn-infra:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/bpmn-infra:${TAG}
+    ports:
+      - "8081:8081"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/bpmn-infra/onapheat:/app/config
+    environment:
+      - APP=bpmn-infra
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      bpmn-infra.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
+################################################################################
+  api-handler-infra:
+    image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/api-handler-infra:${TAG}
+    ports:
+      - "8080:8080"
+    volumes:
+      - ./test_lab/volumes/so/ca-certificates/onapheat:/app/ca-certificates
+      - ./test_lab/volumes/so/config/api-handler-infra/onapheat:/app/config
+    environment:
+      - APP=api-handler-infra
+      - JVM_ARGS=-Xms64m -Xmx512m
+      - DB_HOST=mariadb
+#     - KEYSTORE=msoClientKeyStore-onapheat.jks
+#     - KEYSTORE_PASSWORD=password
+#     - TRUSTSTORE=msoTrustStore.jks
+#     - TRUSTSTORE_PASSWORD=password
+    hostname:
+      api-handler-infra.so.testlab.onap.org
+    depends_on:
+      - mariadb
+      - catalog-db-adapter
+      - request-db-adapter
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "30m"
+        max-file: "5"
+    command:
+      - /app/wait-for.sh
+      - -q
+      - -t
+      - "300"
+      - request-db-adapter:8083
+      - --
+      - "/app/start-app.sh"
index 02c21f6..4a35d0b 100644 (file)
 # Place the scripts in run order:
 # Start all process required for executing test case
 
-#start mariadb
-docker run -d --name mariadb -h db.mso.testlab.openecomp.org -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 -v ${WORKSPACE}/scripts/mariadb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d  -v ${WORKSPACE}/scripts/mariadb/conf.d:/etc/mysql/conf.d nexus3.onap.org:10001/mariadb
+git clone http://gerrit.onap.org/r/so/docker-config.git test_lab
 
-#start so
-docker run -d --name so -h mso.mso.testlab.openecomp.org -e MYSQL_ROOT_PASSWORD=password --link=mariadb:db.mso.testlab.openecomp.org -p 8080:8080 -v ${WORKSPACE}/scripts/so/chef-config:/shared nexus3.onap.org:10001/openecomp/mso:1.1-STAGING-latest
+export NEXUS_DOCKER_REPO_MSO=nexus3.onap.org:10001
+export TAG=1.3.1
 
+# bring the so dockers
+docker-compose pull
+docker-compose up -d
 
-SO_IP=`get-instance-ip.sh so`
-# Wait for initialization
-for i in {1..10}; do
-    curl -sS ${SO_IP}:1080 && break
-    echo sleep $i
-    sleep $i
-done
+sleep 4m
 
 #REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' so`
 REPO_IP='127.0.0.1'
index 1696c74..449cb39 100644 (file)
@@ -14,6 +14,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-
-kill-instance.sh mariadb
-kill-instance.sh so
+docker-compose down
index 5139cba..64ffac1 100644 (file)
@@ -61,6 +61,7 @@ cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKS
 
 docker login -u docker -p docker nexus3.onap.org:10001
 docker-compose up -d
+echo "Disregard the message ERROR: for datarouter-node  Container 1234456 is unhealthy, this is expected behaiour at this stage"
 docker kill datarouter-prov
 docker kill datarouter-node
 docker kill vescollector
@@ -126,6 +127,8 @@ cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json /tmp/
 sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json
 sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json
 docker cp /tmp/datafile_endpoints.json dfc:/config/
+#Increase Logging
+docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /config/application.yaml"
 docker restart dfc
 docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
 
diff --git a/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh b/scripts/optf-cmso/cmso/clone_cmso_and_change_dockercompose.sh
new file mode 100644 (file)
index 0000000..03fca80
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+
+echo "This is ${WORKSPACE}/scripts/cmso/clone_cmso_and_change_dockercompose.sh"
+
+
+
+
+# Clone cmso repo to get extra folder that has all needed to run docker with docker-compose to start DB and cmso-service and cmso-dbinit
+mkdir -p $WORKSPACE/archives/cmso-clone
+cd $WORKSPACE/archives/cmso-clone
+git clone --depth 1 https://gerrit.onap.org/r/optf/cmso -b master
+cd cmso/cmso-service/extra/docker
+
+# Pull the cmso docker image from nexus instead of local image by default in the docker-compose.yml
+sed -i '/image: onap\/optf-cmso-service/c\    image: nexus3.onap.org:10001\/onap\/optf-cmso-service' docker-compose.yml
+
+sed -i '/image: onap\/optf-cmso-dbinit/c\    image: nexus3.onap.org:10001\/onap\/optf-cmso-dbinit' docker-compose.yml
+
+
diff --git a/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh b/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh
new file mode 100644 (file)
index 0000000..681099c
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+echo "This is ${WORKSPACE}/scripts/optf-cmso/cmso/kill_and_remove_cmso_containers.sh"
+
+kill-instance.sh cmso-service
+kill-instance.sh cmso-mariadb
+kill-instance.sh cmso-db-init
+
+#delete cmso-clone folder
+
+rm -rf ${WORKSPACE}archives/cmso-clone
+
+
diff --git a/scripts/optf-cmso/cmso/start_cmso_containers.sh b/scripts/optf-cmso/cmso/start_cmso_containers.sh
new file mode 100644 (file)
index 0000000..ded86d7
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+echo "This is ${WORKSPACE}/scripts/opft-cmso/cmso/start_cmso_containers.sh"
+
+DB_IMAGE_VERSION=1.0-SNAPSHOT-latest
+SERVICE_IMAGE_VERSION=1.0-SNAPSHOT-latest
+
+# start cmso mariadb and  db-init containers with docker compose and configuration from cmso/cmso-service/extra/docker/cmso-service/docker-compose.yml
+
+docker run -p 3306:3306 --name cmso-mariadb -v $(pwd)/mariadb/conf1:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=beer -d mariadb:10.1.11
+
+CMSO_DB_IP=`get-instance-ip.sh  cmso-mariadb`
+
+${WORKSPACE}/scripts/optf-osdf/osdf/wait_for_port.sh ${CMSO_DB_IP} 3306
+
+sed  -i -e "s%192.168.56.101:3306%${CMSO_DB_IP}:3306%g" ./etc/config/cmso.properties
+sed  -i -e "s%192.168.56.101:3306%${CMSO_DB_IP}:3306%g" ./etc/config/liquibase.properties
+
+
+docker run --name cmso-db-init -v $(pwd)/etc:/share/etc -v $(pwd)/logs:/share/logs \
+ -d nexus3.onap.org:10001/onap/optf-cmso-dbinit:${DB_IMAGE_VERSION}
+
+sleep 30
+
+docker run --name cmso-service -p 8080:8080 -v $(pwd)/etc:/share/etc -v $(pwd)/logs:/share/logs\
+ -v $(pwd)/debug-logs:/share/debug-logs -d nexus3.onap.org:10001/onap/optf-cmso-service:${SERVICE_IMAGE_VERSION}
+
+CMSO_SERVICE_IP=`get-instance-ip.sh  cmso-service`
+
+${WORKSPACE}/scripts/optf-osdf/osdf/wait_for_port.sh ${CMSO_SERVICE_IP} 8080
+
+
+ROBOT_VARIABLES="-v GLOBAL_SCHEDULER_HOST:${CMSO_SERVICE_IP}"
+
+echo ${ROBOT_VARIABLES}
\ No newline at end of file
diff --git a/scripts/optf-cmso/cmso/wait_for_port.sh b/scripts/optf-cmso/cmso/wait_for_port.sh
new file mode 100755 (executable)
index 0000000..360fc21
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# -------------------------------------------------------------------------
+#   Copyright (c) 2018 AT&T Intellectual Property
+#
+#   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.
+#
+# -------------------------------------------------------------------------
+#
+
+if [[ $# -ne 2 ]]; then
+       echo "Usage: wait-for-port hostname port" >&2
+       exit 1
+fi
+
+host=$1
+port=$2
+
+echo "Waiting for $host port $port open"
+until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do
+       sleep 1
+done
+
+echo "$host port $port is open"
+
+exit 0
index 768e81b..7e81824 100644 (file)
@@ -131,7 +131,7 @@ log_dir = /var/log
 #fatal_deprecations = false
 
 
-[aaf_authentication]
+[aaf_api]
 
 #
 # From conductor
@@ -146,6 +146,16 @@ log_dir = /var/log
 # aaf_url. (string value)
 aaf_url = http://localhost:8100/authz/perms/user/
 
+# aaf_cert_file. (string value)
+#aaf_cert_file = <None>
+
+# aaf_cert_key_file. (string value)
+#aaf_cert_key_file = <None>
+
+# aaf_ca_bundle_file. (string value)
+#aaf_ca_bundle_file =
+aaf_ca_bundle_file = /usr/local/bin/AAF_RootCA.cer
+
 # aaf_retries. (integer value)
 #aaf_retries = 3
 
@@ -153,7 +163,7 @@ aaf_url = http://localhost:8100/authz/perms/user/
 #aaf_timeout = 100
 
 # aaf_user_roles. (list value)
-#aaf_user_roles = {"type": "org.onap.oof","instance": "plans","action": "GET"},{"type": "org.onap.oof","instance": "plans","action": "POST"}
+#aaf_permissions = {"type": "org.onap.oof.access","instance": "*","action": "*"}
 
 
 [aaf_sms]
index ae990a9..4f48771 100644 (file)
                     "aafpass": "c0nduct0r",
                     "aafns": "conductor"
                 }
+            },
+            {
+                "name": "aaf_api",
+                "values": {
+                    "username": "aaf_admin@people.osaaf.org",
+                    "password": "demo123456!",
+                    "aaf_conductor_user": "oof@oof.onap.org"
+                }
             }
         ]
     }
index bee7dad..475f930 100755 (executable)
@@ -31,7 +31,7 @@ cd ${DIR}
 COND_CONF=/tmp/conductor/properties/conductor.conf
 LOG_CONF=/tmp/conductor/properties/log.conf
 IMAGE_NAME=nexus3.onap.org:10001/onap/optf-has
-IMAGE_VER=1.2.3-SNAPSHOT-latest
+IMAGE_VER=1.2.5-SNAPSHOT-latest
 BUNDLE=/tmp/conductor/properties/AAF_RootCA.cer
 
 mkdir -p /tmp/conductor/properties
index ba37d90..4257dad 100755 (executable)
@@ -66,17 +66,15 @@ docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001"
 -v $MUSIC_TRIGGER_DIR/$TRIGGER_JAR:/etc/cassandra/triggers/$TRIGGER_JAR \
 ${CASS_IMG};
 
+# See if cassandra is up.
+echo "########## Running Test to see if Cassandra is up ##########"
 CASSA_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-db`
 echo "CASSANDRA_IP=${CASSA_IP}"
 ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042
 
-# See if cassandra is up.
-echo "########## Running Test to see if Cassandra is up ##########"
-docker run --name music-casstest --network music-net \
-$BUSYBOX_IMG sh -c "until nc -z music-db 9042 && echo "success"; do echo 'No connection .. Sleeping for $TT seconds';sleep $TT; done;"
-
 # Sleep 60 seconds to ensure Cassandra is up and running.
 sleep 60;
+
 # Check to see if Keyspaces are there.
 docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;"
 
index e05ef9d..2e7d707 100755 (executable)
@@ -40,14 +40,12 @@ docker stop music-tomcat
 docker stop music-war
 docker stop music-zk
 docker stop music-job
-docker stop music-casstest
 docker stop music-db
 
 docker rm music-zk
 docker rm music-tomcat
 docker rm music-war
 docker rm music-job
-docker rm music-casstest
 docker rm music-db
 
 docker network rm music-net;
index 6eb2aa8..6d4efa1 100755 (executable)
@@ -34,7 +34,7 @@ cd ${DIR}
 # run docker containers
 OSDF_CONF=/tmp/osdf/properties/osdf_config.yaml
 IMAGE_NAME=nexus3.onap.org:10001/onap/optf-osdf
-IMAGE_VER=1.2.3-SNAPSHOT-latest
+IMAGE_VER=1.2.4-SNAPSHOT-latest
 
 mkdir -p /tmp/osdf/properties
 mkdir -p /tmp/sms/properties
index 5c89efd..696145b 100644 (file)
@@ -2,7 +2,7 @@
   "name":"ClHolmes1",
   "controlNamePrefix":"ClosedLoop-",
   "bpmnText":"",
-  "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"07e266fc-49ab-4cd7-8378-ca4676f1b9ec\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"Holmes_1gxp0mm\":[{\"name\":\"correlationalLogic\",\"value\":\"correlational logic1\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy name1\"}],\"Policy_136qatf\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"restart\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"QxHBjiW\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}",
+  "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"07e266fc-49ab-4cd7-8378-ca4676f1b9ec\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"Holmes_1gxp0mm\":[{\"name\":\"correlationalLogic\",\"value\":\"correlational logic1\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy name1\"}],\"Policy_136qatf\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"Restart\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"QxHBjiW\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}",
   "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmx\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmz\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4km11\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4km13\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4km15\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4km17\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1arss4p\" transform=\"matrix(1,0,0,1,217,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Holmes_1gxp0mm\" transform=\"matrix(1,0,0,1,463,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><circle cx=\"15\" cy=\"15\" r=\"10\" style=\"stroke-width: 1;\" stroke=\"#000000\" fill=\"#ffffff\"></circle><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"11\" y=\"20\">H</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"39\" y=\"43.5\">Holmes</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_136qatf\" transform=\"matrix(1,0,0,1,713,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_034z36u\" transform=\"matrix(1,0,0,1,937,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_034z36u_label\" transform=\"matrix(1,0,0,1,910,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1d9v6ya\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"143\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m  86,180L217,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url(&quot;#markerSjdype4kmx&quot;);\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 217,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1d9v6ya_label\" transform=\"matrix(1,0,0,1,106.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_01q83h9\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"331\" y=\"174\" width=\"138\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m  337,180L463,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url(&quot;#markerSjdype4kmx&quot;);\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"337,180 463,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_01q83h9_label\" transform=\"matrix(1,0,0,1,355,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1gw4hg3\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"577\" y=\"174\" width=\"142\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m  583,180L713,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url(&quot;#markerSjdype4kmx&quot;);\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"583,180 713,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1gw4hg3_label\" transform=\"matrix(1,0,0,1,603,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_07go3oi\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"827\" y=\"174\" width=\"116\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m  833,180L937,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url(&quot;#markerSjdype4kmx&quot;);\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"833,180 937,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_07go3oi_label\" transform=\"matrix(1,0,0,1,840,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>",
   "templateName":"templateHolmes1",
   "typeId":null,
index 66bc3b1..e5f6efd 100644 (file)
@@ -26,7 +26,7 @@ Verify HolmesModel1
     Should Contain Match    ${resp}   *DC3*
     Should Contain Match    ${resp}   *Policy1*
     Should Contain Match    ${resp}   *07e266fc-49ab-4cd7-8378-ca4676f1b9ec*
-    Should Contain Match    ${resp}   *migrate*
+    Should Contain Match    ${resp}   *Migrate*
     Should Contain Match    ${resp}   *240*
     Should Contain Match    ${resp}   *390*
     Should Contain Match    ${resp}   *Logic1*
@@ -40,7 +40,7 @@ Verify TCAModel1
     Should Contain Match    ${resp}   *DC1*
     Should Contain Match    ${resp}   *DC3*
     Should Contain Match    ${resp}   *Policy2*
-    Should Contain Match    ${resp}   *restart*
+    Should Contain Match    ${resp}   *Restart*
     Should Contain Match    ${resp}   *280*
     Should Contain Match    ${resp}   *400*
 
index f091de1..46b72b0 100644 (file)
@@ -5,8 +5,11 @@ from robot.api import logger
 from time import sleep
 
 XNF_SIMULATOR_NAME = "xNF Simulator"
-SIMULATOR_IMAGE_NAME = "onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator"
-SIMULATOR_IMAGE_FULL_NAME = os.getenv("DOCKER_REGISTRY_PREFIX") + SIMULATOR_IMAGE_NAME + ":latest"
+HV_VES_COLLECTOR_NAMESPACE="onap"
+HV_VES_GROUP_ID="org.onap.dcaegen2.collectors.hv-ves"
+SIMULATOR_IMAGE_NAME = HV_VES_COLLECTOR_NAMESPACE + "/" + HV_VES_GROUP_ID + ".hv-collector-xnf-simulator"
+HV_VES_VERSION="1.1-SNAPSHOT"
+SIMULATOR_IMAGE_FULL_NAME = os.getenv("DOCKER_REGISTRY_PREFIX") + SIMULATOR_IMAGE_NAME + ":" + HV_VES_VERSION
 WORKSPACE_ENV = os.getenv("WORKSPACE")
 certificates_dir_path = WORKSPACE_ENV + "/plans/dcaegen2-collectors-hv-ves/testsuites/ssl/"
 collector_certs_lookup_dir = "/etc/ves-hv/"
index 25e7272..947407e 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 5000
index 92b0dec..3c2c0b4 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "FIXED_PAYLOAD",
     "messagesAmount": 25000
index 92b0dec..3c2c0b4 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "FIXED_PAYLOAD",
     "messagesAmount": 25000
index 3b57160..66d3655 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 50000
index 612bfed..0b8556c 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
@@ -38,7 +38,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "INVALID_GPB_DATA",
     "messagesAmount": 100
@@ -60,7 +60,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
index 3b57160..66d3655 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 50000
index 6d63acc..766c8fb 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
@@ -38,7 +38,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "INVALID_WIRE_FRAME",
     "messagesAmount": 100
@@ -60,7 +60,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
index dc160e5..f35bd04 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "FIXED_PAYLOAD",
     "messagesAmount": 15000
index 49d9bd9..4773b46 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "FIXED_PAYLOAD",
     "messagesAmount": 5000
index 4296d48..0f60a01 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
@@ -38,7 +38,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "TOO_BIG_PAYLOAD",
     "messagesAmount": 100
@@ -60,7 +60,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
index 3b57160..66d3655 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 50000
index 43e9087..7301863 100644 (file)
@@ -16,7 +16,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
@@ -38,7 +38,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 100
@@ -60,7 +60,7 @@
       "reportingEntityName": "sample-reporting-entity-name",
       "sourceId": "sample-source-id",
       "sourceName": "sample-source-name",
-      "vesEventListenerVersion": "another-version"
+      "vesEventListenerVersion": "7.2.0"
     },
     "messageType": "VALID",
     "messagesAmount": 25000
index 6d64680..bc42a94 100644 (file)
@@ -3,9 +3,9 @@ services:
   prh:
     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
     command: >
-        --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap
+        --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc
         --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222
-        --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap
+        --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc
         --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222
         --aai.aaiClientConfiguration.aaiHostPortNumber=3333
         --aai.aaiClientConfiguration.aaiHost=aai
@@ -21,19 +21,27 @@ services:
       - "8433:8433"
     container_name: prh
     depends_on:
-     - dmaap
+     - dmaap-bc
      - aai
 
   ssl_prh:
       image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest
       command: >
-          --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap
-          --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222
-          --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap
-          --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222
-          --aai.aaiClientConfiguration.aaiHostPortNumber=3333
+          --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc
+          --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2223
+          --dmaap.dmaapConsumerConfiguration.dmaapProtocol=https
+          --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc
+          --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2223
+          --dmaap.dmaapProducerConfiguration.dmaapProtocol=https
+          --aai.aaiClientConfiguration.aaiHostPortNumber=3334
           --aai.aaiClientConfiguration.aaiHost=aai
-          --aai.aaiClientConfiguration.aaiProtocol=http
+          --aai.aaiClientConfiguration.aaiProtocol=https
+          --security.enableAaiCertAuth=true
+          --security.enableDmaapCertAuth=true
+          --security.keyStorePath=/tmp/certs/org.onap.dcae.jks
+          --security.keyStorePasswordPath=/tmp/certs/keystore.password
+          --security.trustStorePath=/tmp/certs/org.onap.dcae.trust.jks
+          --security.trustStorePasswordPath=/tmp/certs/truststore.password
       entrypoint:
         - java
         - -Dspring.profiles.active=dev
@@ -43,12 +51,14 @@ services:
       ports:
         - "8200:8100"
         - "8533:8433"
+      volumes:
+        - ./simulator/certs:/tmp/certs
       container_name: ssl_prh
       depends_on:
-       - dmaap
+       - dmaap-bc
        - aai
 
-  dmaap:
+  dmaap-bc:
     build:
       context: simulator
       dockerfile: DMaaP_simulator
index 416e7f4..bacd106 100644 (file)
@@ -43,7 +43,7 @@ class AAIHandler(BaseHTTPRequestHandler):
 def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
     handler_class.protocol_version = protocol
     httpServerLib.start_http_endpoint(3333, AAIHandler)
-    httpServerLib.start_https_endpoint(3334, AAIHandler)
+    httpServerLib.start_https_endpoint(3334, AAIHandler, keyfile="certs/org.onap.aai.key", certfile="certs/aai_aai.onap.org.cer", ca_certs="certs/ca_local_0.cer")
     httpServerLib.start_http_endpoint(3335, AAISetup)
     while 1:
         time.sleep(10)
index bb37ddd..392c460 100644 (file)
@@ -58,7 +58,7 @@ class DMaaPHandler(BaseHTTPRequestHandler):
 def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"):
     handler_class.protocol_version = protocol
     httpServerLib.start_http_endpoint(2222, DMaaPHandler)
-    httpServerLib.start_https_endpoint(2223, DMaaPHandler)
+    httpServerLib.start_https_endpoint(2223, DMaaPHandler, keyfile="certs/org.onap.dmaap-bc.key", certfile="certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer", ca_certs="certs/ca_local_0.cer")
     httpServerLib.start_http_endpoint(2224, DmaapSetup)
     while 1:
         time.sleep(10)
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/aai_aai.onap.org.cer
new file mode 100644 (file)
index 0000000..327f57b
--- /dev/null
@@ -0,0 +1,55 @@
+-----BEGIN CERTIFICATE-----
+MIIE5TCCA82gAwIBAgIJAI5fEseaW2LVMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNV
+BAYTAlVTMQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEZMBcGA1UEAwwQ
+aW50ZXJtZWRpYXRlQ0FfMjAeFw0xODEwMTgxMDM3MzJaFw0xOTA0MTgxMDM3MzJa
+MGYxDDAKBgNVBAMMA2FhaTEPMA0GCSqGSIb3DQEJARYAMRkwFwYDVQQLDBBhYWlA
+YWFpLm9uYXAub3JnMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwET05BUDELMAkG
+A1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCCnz1BBkcD
+y1M73ANgkbfwYANSJPdnU/meXpgHKYvXa8xbEI3Lsi5EnB7o9nthZFdU5dPZRFV5
+uJEOl0pjt3ogmPo0XZGYO++GfRNLq+c2YVmYjTLgFvEz6GzUtLueYjrl2JItGRug
+x0wNPXQmaAX3/8wD7nOTAZjlmuSWCeeJu5GBaX4aaiwVOONDGhmZZ7jISTE0xvvU
+936ECnUhSZtt/qRvnA1EJB/Hhs5Se4VPx6lTXYf8PXquI0IgDV49hlLhbPMKadQ8
+lo2yitiaSMJHsLZ1Wt6ob9oNFlBcceq3tfXPMVVylssuAI1pc3HsbmV7kMIwg0P1
+fyVoIALHlXgDAgMBAAGjggGzMIIBrzAJBgNVHRMEAjAAMA4GA1UdDwEB/wQEAwIF
+4DAgBgNVHSUBAf8EFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwVAYDVR0jBE0wS4AU
+BASNACQ4xpx414BXQWdJBoDmckehMKQuMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYD
+VQQKDARPTkFQMQswCQYDVQQGEwJVU4IBAjAdBgNVHQ4EFgQUMghLmZ4l0T+MY3uk
+AR6YBJP5gwMwgfoGA1UdEQSB8jCB74IDYWFpgoHnYWFpLmFwaS5zaW1wbGVkZW1v
+Lm9uYXAub3JnIGFhaS5lbGFzdGljc2VhcmNoLnNpbXBsZWRlbW8ub25hcC5vcmcg
+YWFpLmdyZW1saW5zZXJ2ZXIuc2ltcGxlZGVtby5vbmFwLm9yZyBhYWkuaGJhc2Uu
+c2ltcGxlZGVtby5vbmFwLm9yZyBhYWkub25hcCBhYWkuc2VhcmNoc2VydmljZS5z
+aW1wbGVkZW1vLm9uYXAub3JnIGFhaS5zaW1wbGVkZW1vLm9uYXAub3JnIGFhaS51
+aS5zaW1wbGVkZW1vLm9uYXAub3JnMA0GCSqGSIb3DQEBCwUAA4IBAQBJyXk6ZTfA
+f9mYi5ey/ZpchB9egJfwEXXOqSKeYYTjqUr3uXXk+usb8YXsFVoD9Id5do3Hnxv+
+J3ISGmyPTgQfV/9KDmtHPTyclR9mLji+j4GviZnIpAIsI/duPKlEfLcym9smAC7Q
++HYanUQ7s8sjJJ4ORdBLOy1HkfTu9pjNKZ1CcEnJZ8Y5juLOeEj+Xa+QzcywSK2E
+iuPXJwFFtcX9fO+ojiQV9g0L9JgABMqm4Q6si03gXofYEgvAUJSxsirydB8kcqPU
+jCgw8/XIsHj4VRNNWlwkvzskeX9ZlcFMmn6DTfyDD1Rrij1efotO2ie3OrKUEzpH
+N1G5vCuZqOla
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEVDCCAjygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
+RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwOTI0MTE0MjE2WhcN
+MjMwOTI0MTE0MjE2WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
+A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzIwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjPFeAho7BtWjB4Enww/KXD0tTuoda/Fkc
+o/yv2waNNsx+pOYGdJwNHYvNS7/RLBHc8kCN+TbKnYZ6AE97wD1Pzrc7AZ58qpjq
+Ob7aTp4u3IAMWR5YOkDyjiibA5X7z9N/wveG/Ei2SgN2pY7O2lK5ucm6igarfxll
+rZC1MA9zAXrfmd5bLJQQqACT6q15KQaCIwhqwoXp8w+s0rXcZ2/L303lFIUXoHUp
+kzMsIPhJ/ZoEvAEkXIPgT2uFgOwIyWmr8Rg5jYzZhV7vey3bQUBlue9aiMIXih3d
+b4AVD6J6eF/NmJygtUfHFrWeTAYLppA0d69BWUQZ+XQgCwjOMLaNAgMBAAGjZjBk
+MB0GA1UdDgQWBBQEBI0AJDjGnHjXgFdBZ0kGgOZyRzAfBgNVHSMEGDAWgBTtc8Wb
+I4DL8Bm6CVi8//GsTyq8NTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAt4VCLb2UHiZpDfSQbe62vlFzsGlODYKF
+k7BhW9Q5jfIXpPhhtBLFwJFEKAWFLVWubz+YIa7I5wtniS6zEPC/5t3JOiEXMJQY
+PfaPDSsovZ+eShu0QtrjjldFwL2MiqNsd2IWLSIRQUP63RZGBRTTxSsxB0VAfRyT
+cu/8znpmZsHna3DspGZQputm7qsxgUhAcPCdo9RQtG6Ox6L1wTXUJmTPHdKQtZjr
+qqSQ7kn8u3i5KQYYapmc3UO+CBbzoLPD5Rrlq+ROBbiNd9R/j5vVgRO7vsU9SHnm
+AaKFEjDPTSjDtMOxu1BsTNmftaE2jcYa9/ZW67H8URCuo92NE0cZRxBqHkPUjH3/
+/S43/TBAfjfarF5WW7iMAEZfEGhrQu26JWXBMcZshStuHUEPl2b+RC5LZcBMYKgi
+SqSOXzpiJeRNASpXKCQQZG8n03c/jBf1U20HaK/4Z2ikOql5B21suxhUbixG1EQN
+DOrFGOFUqG4Eyw+xjUR5rTfDnpKgQfJo0/aohZs9p5x+UwitkrQkJQ1ZmEzeVDjm
+7xsmOcAJS2T9DLle6fDWvyh76InymAPxzk1/2AWOp8uw8iwNfFxE+p+M7h0psZxp
+SnvlgASASdWlZLcMQtNiiKzMK75FW9SMctQfA/RfohNEwivpp6tNpgJozoKmhoPK
+zs5HS/mx8GI=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/ca_local_0.cer
new file mode 100644 (file)
index 0000000..ff37eaf
--- /dev/null
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFPjCCAyagAwIBAgIJAMhpcvbx/8/AMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV
+BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA4MDMx
+MzI2NTBaFw0zODA3MjkxMzI2NTBaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK
+DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBAO4j7nmAY9KX/ceFCITuWAMCHAmSoeHCTs+lgkYX7DpXPidsF5t0ijPaElUC
+rwwMnXz5h1o8FzXD64FMbqMVEseLUDZGelRZ7Rkz+hy0Y5i8QKsBTfeo7sP7ZEaC
+vpqom9imPLFUn4oDeYspCKjMF93Z69Cv8pxFYCFpZwY3eR9V4xOB613k8guBJtHR
+ccY9/NbdfbkrtUz5kNuQqwLj5ttvesqxPq0L4m3bPjkubQCb+QiJxx10Xcx6fcfu
+wIu7NR63qDlWFYstsDnH/VIT1pSCBHEw+muSEQ44sgPFy+AxB8O8HKd8wRfmkV2d
+YNPyotTLD+aLzDlCWtC0pGnTTJimdu9+hZRIZz5YT4m8BdLQ/jTBd6Gx2tVLvWso
+9IJSjfkhj6EtVxyZ81jM+rLAnKy3qPXDCN6CIKL07hNuSzIIhCrK2L4f82JWS7dP
+mg2acuhCH56qrhEr42Kjeak181KM/QKiRPgNyOSygJ7uRaLbqOQRh46c68NcmW4F
+13OwJQAsrjgaQY1ZWnFsvRYK9NnUqK+2XuCQFS7EYm02M2UwO2GCD88In8PCzzv8
+Q0Zj8Hb4h79fVRjG8/3MnQCJ164+9PfXyu9dj5l6XkkSvdj1IsewaSMy9NccGx7Q
+rE7yRPMB6FlAnGPj0KbJXHXJyiujPHSCF0D+Hbl9rxU7FRAbAgMBAAGjYzBhMB0G
+A1UdDgQWBBTtc8WbI4DL8Bm6CVi8//GsTyq8NTAfBgNVHSMEGDAWgBTtc8WbI4DL
+8Bm6CVi8//GsTyq8NTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN
+BgkqhkiG9w0BAQsFAAOCAgEAW4IYy1PUrV/wHblIGFTBo5z7EB33rpHfAJzbDkop
+2n5wOlmh78pkeRNb1TOKcSHJPw0MdkwVBPI1wm/SOpHUPmKTW1muO6RUnFjZ68y9
+DiVa6zCW/RBFeG3f8kywxgqPLml1TbikRuMBU0ucOa/bXZ98P2hMLkjWTgeARGSj
+QCb7QyqeFzG0mPmAuX6zMj5xwpdyPB0zCoRGXa/BIWEvYjgkaRM+E+9oRWt/6BHQ
+4uw11R7gAV4/TSu7qYNfTMllBaLJ0o/1q0QF16e4mV1E4erDfWKlrvUlgCaHCx8Q
+3PL7ovM4jjrTNAjnX0q5xtWbF0mlJhJk/NbPDb7hArBv4vp9XoITyRW1vcbe94jv
+GzqLKlvBQUxGue4kLYDmUFdog7gaCkEH3N4mH3ad4HZUsOMeanvVgbVZr10VOlNq
+TEWqDPATayJdo+VhJCGc6hVa+IJsDTAa/z2MLybqcoOfNT/rxYIdvlX4OjSqAqOj
+bSivsCe9c4km56pP2ufA/woPzh+Z46Ukt+krGyFQwKdQQLh5Pp7Yuhvdld/5kd8M
+S2fqcBFpzzBSj+huVayw6jFi5qLlISouhCVsc0rBqvnfuQTQwmfFIlfaHBTSjniv
+5DdibZEtMqYYXl1VB4XUHTt5dOGHLEX2w/d5887DQVLUbaUKm1mfScb/vPjGgk6/
+re4=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.crt
deleted file mode 100644 (file)
index 3512368..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC+DCCAeCgAwIBAgIJAKCcXOpDPyjQMA0GCSqGSIb3DQEBCwUAMBExDzANBgNV
-BAMMBmNsaWVudDAeFw0xODEwMTgwNzU1NDlaFw0zODEwMTMwNzU1NDlaMBExDzAN
-BgNVBAMMBmNsaWVudDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM/V
-zZE2xloz06wO+Fj6GA26pzEFhTHpMOG20woWIkzL7N/TuTyPi24ZqzhyFvGmn71K
-eDC14zYeZVTj+8OoJKRSPYcPiyGqMK46hkUNJ9LjVCLGBhqqgTGYd4YTn2FeTAiR
-2/rduOD4N7AzYiJlZHcd1zls+QQOyQkFcuO4xKQiwjyC2djDx7W9qUsPZVha/9v9
-u7PcPZ7LnsAPdDSaL/bBz5aYFTX8IMo1nBIujpETCPyQoNc3h+lMilFhY4A1Nj0F
-hkwF7GB9Xh7aLC2rEobVbn6s6biUq9+hg7OgTYZtQX7/SfD+6nioXSHMJNGYm7j9
-Z4Yf26BfQStd0cL9GwkCAwEAAaNTMFEwHQYDVR0OBBYEFK+hMFIwHNrVNqudmcQ+
-sLABdVMuMB8GA1UdIwQYMBaAFK+hMFIwHNrVNqudmcQ+sLABdVMuMA8GA1UdEwEB
-/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAMzawFZ8j99zdWhavqBpTeulsisL
-IthHkRT8sIBnAkimS5Bujjix8NHsaqUc/1d56KPerDWJ4tXx7Sd4+F7aNIpIkp+1
-lFxKLPU4Fnsbq/IEWAJOuVOWZ0Lug/8UcJbp0Ma/ac1t76uHBQ/mmiJUu/22FUrA
-X0Udg3q/xAT2H0QLLK/s2jfR511rNOY5u9zcdKArmHoN13ZuVeZ6HMVO6U78rqZk
-TTbdhO9BieARIhoPC+/G9eTV7uJyzi4n60HDpxA0j+ZsH5L6CdU5M3XATMCxpxm4
-xAnHVb0fcudNzIsqZlP0jrJdrNOKkX8qij1poKvvJ2Ap/vKtZZVPL76GHCk=
------END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/client.key
deleted file mode 100644 (file)
index 17eebd2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEowIBAAKCAQEAz9XNkTbGWjPTrA74WPoYDbqnMQWFMekw4bbTChYiTMvs39O5
-PI+LbhmrOHIW8aafvUp4MLXjNh5lVOP7w6gkpFI9hw+LIaowrjqGRQ0n0uNUIsYG
-GqqBMZh3hhOfYV5MCJHb+t244Pg3sDNiImVkdx3XOWz5BA7JCQVy47jEpCLCPILZ
-2MPHtb2pSw9lWFr/2/27s9w9nsuewA90NJov9sHPlpgVNfwgyjWcEi6OkRMI/JCg
-1zeH6UyKUWFjgDU2PQWGTAXsYH1eHtosLasShtVufqzpuJSr36GDs6BNhm1Bfv9J
-8P7qeKhdIcwk0ZibuP1nhh/boF9BK13Rwv0bCQIDAQABAoIBAA2Fs6JHFhC4XoVL
-VA01+GqsQkSGP2xH585HvuNhHUox2m+Vru+px0CamvFJOwTt+mauebNxoh7bS2yC
-iNbqEbg/QZGQCVVfZVtwo1vKx1SJRegdSjhh75XyfZRTooMLR5cnJlDkLCs2+yiT
-r0bdofO+FUq/NFR3Qc08dYUreF/VZQzGT86vgpxTqFE1xdVX3mL5X/RFYED25s/n
-nw+v8uRVcb21OGsEnHar4wV5VyyG6g0nZGk4uAfLGvvYKwcmMTtKulYtqnZ+0RNI
-Iqu3siXOq6BcKly+TzKZ6kpqn+hsD9V9plQ45yPOswboToOnOBanZUxsEJ1mT5lO
-wbpqYoECgYEA9IbxrWMri2b5kXz8o6O33RsG6qLrkaOU8M4PJOvxn7LaD9WLbsZZ
-J6vv6eXAbHqF1ZfXv52sSZu9Bug3x8cv0ItOiOCPf5T6nTrdLjnCthivNUfLHVJ8
-nonzA2YJWaYe6u5sFtUSifQaHnrAMKqoX2D1qY7SD1QWWbSoK7cRxY0CgYEA2ZYl
-T7OYKGKP8Ra2mLFpwY/84n+Rx/A3p0rzZ1cge9Xldo8pGbGduI+aII+XKPC4/lDx
-dhS7rbOtIA08aF8htkunSErNUiDtZ+i386KYR3JsQuDruKbk51YYWpRhBPvs0mOT
-7lBSeqbJZEJ2vDMU/oNJyUOW+0eL2Jjo28URdm0CgYEA2yucsPFDVVZ9+LZTZ4TV
-xvtzjplqlYZOeCvpjQlh7+cJ5slbiXWE8bb9eeLxPwnurUzFFz2G8A8ENY2seYcC
-R2Slhq/oTs1Ed+sL1mP1LuwfFp1745NMmXlB9NjfJphr+9ypyyk9zaKaSplxa+16
-rsqkRk753r1arxrq5QvYhP0CgYB8nJW/wI4qys++9hAbALgdh7X/janSxMtKvw0J
-KQfMhCKHNNQICAXY9j0B2tpqMvrvgzHWO2eEwnsq+QmYiKsI+OjT6SsPlxX/xXLc
-UEk/2dMQtjmppcNAjbki3wl1TkZB8498E3o5Dh4Wkk3n2KV0YYI3hsMII+B+aowp
-mQI4PQKBgH8MZj1WDB05mgxC3jK6wNEM+0V08xL8sooYCEST11uZ1Pj7vZmRNjWn
-/4pUrIOp1P9EnrS9RsWlVgRKUo6+yvPqdmenq5k7w7dSSowmAnW68rUV+HHuueXQ
-9V98fkg3hAnI7ioV19bDaL6EtMvYLg+xSq2GmKvUqRcBRmlObW1L
------END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer b/tests/dcaegen2/prh-testcases/resources/simulator/certs/dmaap_bc_topic_mgr_dmaap_bc.onap.org.cer
new file mode 100644 (file)
index 0000000..756dd3a
--- /dev/null
@@ -0,0 +1,51 @@
+-----BEGIN CERTIFICATE-----
+MIIELDCCAxSgAwIBAgIJAI5fEseaW2LbMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNV
+BAYTAlVTMQ0wCwYDVQQKDARPTkFQMQ4wDAYDVQQLDAVPU0FBRjEZMBcGA1UEAwwQ
+aW50ZXJtZWRpYXRlQ0FfMjAeFw0xODEwMjIxMjM4MTZaFw0xOTA0MjIxMjM4MTZa
+MH8xETAPBgNVBAMMCGRtYWFwLWJjMQ8wDQYJKoZIhvcNAQkBFgAxLTArBgNVBAsM
+JGRtYWFwLWJjLXRvcGljLW1nckBkbWFhcC1iYy5vbmFwLm9yZzEOMAwGA1UECwwF
+T1NBQUYxDTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAs2mQSeSshK4ZrAwc8/QNHZiUVILlQwYyoviPfL27
+8mV1OXSYoTW+PzFU1Tv6HwKEFL3q9i9/y1m0DjhP4frHpNVVTo5KIeCv6fIsAYnp
+/p50P3EOh3AJehtZm4AtxN6DeMlaBv11GYUUm6E60Q36Y6Wgklq8u1KDngYJy1/Q
+Bl8aAiJbj2vpL64WSI3cyNz/qeI4/PxHsqBHUFI96GcLtLPLDSlIQWoWoZhkiQTH
+rU4Sx5/nVdWihfc0R0+jG5IH+mDb8WUNmyHnaHinrt5Er1sypU/NxD+NlRPFO1K4
+Dx40sxfAlu2LFCllDgSS/Xcfse0ny/TrL2RWELoIOz9NjQIDAQABo4HiMIHfMAkG
+A1UdEwQCMAAwDgYDVR0PAQH/BAQDAgXgMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMB
+BggrBgEFBQcDAjBUBgNVHSMETTBLgBQEBI0AJDjGnHjXgFdBZ0kGgOZyR6EwpC4w
+LDEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEC
+MB0GA1UdDgQWBBTvkTjHV87v4IBJ8N/PqkjjWGKICjArBgNVHREEJDAigghkbWFh
+cC1iY4IWZG1hYXAtYmMgZG1hYXAtYmMub25hcDANBgkqhkiG9w0BAQsFAAOCAQEA
+EJFyoeQtkjDf/yUyWReewxiOfDdmmrDOO4gbxt6hd3ilOflmC7QolR1NAzmCML3b
+vmLS7a8zhwBsUU11wjasN8PI3qG7H36U7hP/NVwvql0YNGIcxvukPJJvDqW6V3MI
+fOaCFs4uJexSYeaXRWdk0Rq8GY9gB2j1TUsl+we9zJeErKr2vY2LAJI0iYJ+v6YY
+Ug14aPYu4m4ABUDhqfM+4z580h8GA+5ZkWNr5z9xfeJB520jAc6zx86obx9hep74
+OByfVqleMV0QfZeH9oLGYh2FnSSEG60GyWFIf9k76kh2LREVCbU+nOhFfVy9YD5Q
++2TXjh/wMcv3RxAHqSeW9A==
+-----END CERTIFICATE-----
+-----BEGIN CERTIFICATE-----
+MIIEVDCCAjygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAsMQ4wDAYDVQQLDAVPU0FB
+RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVMwHhcNMTgwOTI0MTE0MjE2WhcN
+MjMwOTI0MTE0MjE2WjBHMQswCQYDVQQGEwJVUzENMAsGA1UECgwET05BUDEOMAwG
+A1UECwwFT1NBQUYxGTAXBgNVBAMMEGludGVybWVkaWF0ZUNBXzIwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCjPFeAho7BtWjB4Enww/KXD0tTuoda/Fkc
+o/yv2waNNsx+pOYGdJwNHYvNS7/RLBHc8kCN+TbKnYZ6AE97wD1Pzrc7AZ58qpjq
+Ob7aTp4u3IAMWR5YOkDyjiibA5X7z9N/wveG/Ei2SgN2pY7O2lK5ucm6igarfxll
+rZC1MA9zAXrfmd5bLJQQqACT6q15KQaCIwhqwoXp8w+s0rXcZ2/L303lFIUXoHUp
+kzMsIPhJ/ZoEvAEkXIPgT2uFgOwIyWmr8Rg5jYzZhV7vey3bQUBlue9aiMIXih3d
+b4AVD6J6eF/NmJygtUfHFrWeTAYLppA0d69BWUQZ+XQgCwjOMLaNAgMBAAGjZjBk
+MB0GA1UdDgQWBBQEBI0AJDjGnHjXgFdBZ0kGgOZyRzAfBgNVHSMEGDAWgBTtc8Wb
+I4DL8Bm6CVi8//GsTyq8NTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAt4VCLb2UHiZpDfSQbe62vlFzsGlODYKF
+k7BhW9Q5jfIXpPhhtBLFwJFEKAWFLVWubz+YIa7I5wtniS6zEPC/5t3JOiEXMJQY
+PfaPDSsovZ+eShu0QtrjjldFwL2MiqNsd2IWLSIRQUP63RZGBRTTxSsxB0VAfRyT
+cu/8znpmZsHna3DspGZQputm7qsxgUhAcPCdo9RQtG6Ox6L1wTXUJmTPHdKQtZjr
+qqSQ7kn8u3i5KQYYapmc3UO+CBbzoLPD5Rrlq+ROBbiNd9R/j5vVgRO7vsU9SHnm
+AaKFEjDPTSjDtMOxu1BsTNmftaE2jcYa9/ZW67H8URCuo92NE0cZRxBqHkPUjH3/
+/S43/TBAfjfarF5WW7iMAEZfEGhrQu26JWXBMcZshStuHUEPl2b+RC5LZcBMYKgi
+SqSOXzpiJeRNASpXKCQQZG8n03c/jBf1U20HaK/4Z2ikOql5B21suxhUbixG1EQN
+DOrFGOFUqG4Eyw+xjUR5rTfDnpKgQfJo0/aohZs9p5x+UwitkrQkJQ1ZmEzeVDjm
+7xsmOcAJS2T9DLle6fDWvyh76InymAPxzk1/2AWOp8uw8iwNfFxE+p+M7h0psZxp
+SnvlgASASdWlZLcMQtNiiKzMK75FW9SMctQfA/RfohNEwivpp6tNpgJozoKmhoPK
+zs5HS/mx8GI=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.password b/tests/dcaegen2/prh-testcases/resources/simulator/certs/keystore.password
new file mode 100644 (file)
index 0000000..3982387
--- /dev/null
@@ -0,0 +1 @@
+mYHC98!qX}7h?W}jRv}MIXTJ
\ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.aai.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.aai.key
new file mode 100644 (file)
index 0000000..b9a22cf
--- /dev/null
@@ -0,0 +1,29 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCCnz1BBkcDy1M7
+3ANgkbfwYANSJPdnU/meXpgHKYvXa8xbEI3Lsi5EnB7o9nthZFdU5dPZRFV5uJEO
+l0pjt3ogmPo0XZGYO++GfRNLq+c2YVmYjTLgFvEz6GzUtLueYjrl2JItGRugx0wN
+PXQmaAX3/8wD7nOTAZjlmuSWCeeJu5GBaX4aaiwVOONDGhmZZ7jISTE0xvvU936E
+CnUhSZtt/qRvnA1EJB/Hhs5Se4VPx6lTXYf8PXquI0IgDV49hlLhbPMKadQ8lo2y
+itiaSMJHsLZ1Wt6ob9oNFlBcceq3tfXPMVVylssuAI1pc3HsbmV7kMIwg0P1fyVo
+IALHlXgDAgMBAAECggEATFkLEpC6vWsAsYI9rxo9KxDToBXfTdP1mS2tKrKL/FQT
+1D5uwtrY1F10a7J2F0zxBrx3AQ1B8K2Ci8a+Ql6h0Z/YzvbJ/PM7Y56Dwr0tncl0
+9wfA7t46CZ8WzZT9/OtphaL6fcWpMmaK+0oqM7ClnHk1JC8h+pD6b2oDpfcQEJ5r
+hxFxdOotKgMzANMqTydteecfefy9l0hzgFiymxLZAo7ktW3HFpXO5HOgh1vkm5Pu
+FedGRwiI/RBqad2T59J/XcRH0f5Ky7sgpyCShwqIp23xpdum10N0/MTzY5iu/gvR
+pXGaPeYUrSPoLwuoMGAUm9wFbDqskI/mQzw6/rnfsQKBgQDU2O7ogZ/BjDVtjpfL
+NntXhLOq02U+dB16ZXSalMbsG//FILVLL/Ths2wutKk/9IIiC1qI4NhDc0smDkgJ
+l+oTZTnhVxZhWvOYovz7T3L3mp9VBIA0lW62dTDLK9gT6IRoQGN1fzzXF7ZfgOME
+irDQqBSfMqt5YCeQOKNe29eo5QKBgQCdGrLaGHBeWBdhvG8XcybJDk2Q9XnojO69
+2UtfJ64+hzTc2MFvyBlWymZt3/Qq3llP/K9WUYW/ohL9l8rTXHEfBGpQVPzU2roQ
+iicbx/zc2qfO79YaE10D/paekX2vrpoJlhtp0yMU/HMEYxrucbYQJEdKx9frcTXo
+fQ9l5V+WxwKBgQDKEkYGsQGFk+IpZ+XOhKPmu9KDDH0jJMPTrrxcAYE1KYPSl7Hm
+dtoK6Pd9BAFm+XAOeC70olpO9wdSUt6rVPFihojD2ZUiymFX+O0qfgwM7Fv2L/az
+dWcNjAbN7IsQo4AJJZAHPcv5/MYkt01Pw4gIIHqrhURsUBBfiJX5ecetzQKBgC9I
+NcPFzyvVv1O+7oBUO7wO/fE+r+35XHDu0OxWeO6Aqrw80BrgUh/40lMHL+km+iJE
+nlCQQHyoPqbr5DMwgysenRCIQ3+cRJttuM93pPajKBXzwLAgW8I0AQjAKN+S4PE5
+qA51aP2L7OHJIfXZaz34bSxocOd/LwZFfTjhi59JAoGAVc3HAzQOkrCs1GPXvuOx
+YwJUyuwLtCzcb05q+ys/5b/02RxTl4QPfOPqj47y8SDUUC7Cbr6ktqAkfsBOyPPj
+tSniVhPKa4XdP0Brsil934sd3shvwrpEb9Xs6ialTid+PKaU/rFn1DYWZUP8lNMK
+tq0nYLX/Z6N7LHiz32G9Kjs=
+-----END PRIVATE KEY-----
+
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks
new file mode 100644 (file)
index 0000000..e74ce64
Binary files /dev/null and b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.jks differ
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks
new file mode 100644 (file)
index 0000000..10103cf
Binary files /dev/null and b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dcae.trust.jks differ
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dmaap-bc.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/org.onap.dmaap-bc.key
new file mode 100644 (file)
index 0000000..880a33b
--- /dev/null
@@ -0,0 +1,29 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCzaZBJ5KyErhms
+DBzz9A0dmJRUguVDBjKi+I98vbvyZXU5dJihNb4/MVTVO/ofAoQUver2L3/LWbQO
+OE/h+sek1VVOjkoh4K/p8iwBien+nnQ/cQ6HcAl6G1mbgC3E3oN4yVoG/XUZhRSb
+oTrRDfpjpaCSWry7UoOeBgnLX9AGXxoCIluPa+kvrhZIjdzI3P+p4jj8/EeyoEdQ
+Uj3oZwu0s8sNKUhBahahmGSJBMetThLHn+dV1aKF9zRHT6Mbkgf6YNvxZQ2bIedo
+eKeu3kSvWzKlT83EP42VE8U7UrgPHjSzF8CW7YsUKWUOBJL9dx+x7SfL9OsvZFYQ
+ugg7P02NAgMBAAECggEAfPetwlqe9DgUt6skS6SVsiTCRO9746iggrXhtECwdlHH
+SkL1wWye3INvFKwXN5xYBd6Xl+1T9X/BFBqTQdOdViompnYkGt7XiXvevR+kNm+G
+h14ngZ0/bKc6Tj8FIljfeLW/mJjZBPKWfSTbxBwZaWlHpEnBpjT+aobIMbnGO3i8
+iuPEIlSTmI/MmIvwyXkJ8r41phIZpdhtyKACx5LSvSArwPTYzVLyaGBJ63T4Qcat
+GY/Oa1nAJkbFT46sP06O+sm1UIVUGbjewzPaDnfdFyJWmae0nGn1xU8VZUPI7rfu
+YCf7le2grgtKy16jQo0o69RGYc4ebP27DKGd8YJHHQKBgQDts/7x6sG3fqPvbv9D
+M5LDraslrj+noHGVcvCfigcgngvnMGcB/R8IT6YPmNRfATHV/UTLuW++PuqXsR21
+/WwJVbxudZ3alX7sz6CTGvcCQvnvPQm2e/iVW/JFrQu/poPxL1k3talDdKFWTRql
+ZvQE05YjdTutlN2hGvqjSTZ1AwKBgQDBOO7GmG4FRQ4jXvUULXKMRUw+UzUy9NAV
+io1b3CiwWynsdW2OPp6Jy6GB6+e7Di2M0i35hkpQd5NoeDnVqkm9ERYLnHr9FAs0
+5cKT7DDRC9ddJesJrqdhqGfhZCHMoqEiDRf3kNMBfFMV1TCefdQ0kIFYUuhHgboJ
+aK+GqmtGLwKBgEEqmpdaA7e5mVn39TVIO1E4GHahGcRr4RfWxg8G+UNA8QR1qZfK
+/Cn8JAucm4RcQHxpDeZINVFT0F676OhOzMKWZa1mw1r8pypnFZ+ewd81221yL2p+
+/Dx+U6I0eccV8JA7qdrzC695lw2g39A+tGFqXHvmFPFWoZgcXGBNnwdfAoGBAJ8y
+9mEAhF2pKN3xxgGq9F8oVYpgakuis7Ob5Z5TBd9QLXmawvpZE6y670YphVN0egk1
+vxWBFMe5zeVccWJfHMQ/SKemdRsBob4itC/Gge4rUHV54W6nzVdENtrY8pQ1RofU
+u/OJCqGFursZXSaoy+fHTBrmrGUGOK655y0QSrSXAoGBANbSu8DfjJwDHcWTstcn
+XJ/bHB6aZmKe4ibOSFBMsOuy0AP1vRxQTgvQhgeRWm5ngv7YhPes2UHqRktadfGz
+VUzx9/ILpL5skhIFEzgEP32cO1tQNE1vxODs3zg+U/Wy9gxJt0dLCB/sPQJcGLri
+mkzev7AyLLr137K+ssxhczqg
+-----END PRIVATE KEY-----
+
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.crt
deleted file mode 100644 (file)
index e154aee..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIC/jCCAeagAwIBAgIJALu8otyWP3z1MA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV
-BAMMCWxvY2FsaG9zdDAeFw0xODEwMTgwNzU1MzNaFw0zODEwMTMwNzU1MzNaMBQx
-EjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAMILA9ZYh8vo1ui3mNYtF185/qauRgJ5EP1ROqD445hX5T014BrlWzpsRD6B
-/uGCxSwNnIE+tGChk4zQBnOSC2Pah2QjMGWUPjgWXgnL4vp1Mb4rKrVNQsaqMi7I
-8aCdbO66rZirK04RD2hp09Vy7KGsK6TKjAnQn6UJJD2agHZtcMfQ5Kf/B0yZvlb6
-T3Yet+gefXH/iCZ+bzz4P1Ij6zetetw5S++SzsgxWJECfkk3ISkqu9DBLjfzacKz
-ixq+twq5f+kzg3zhUBtpJ4BvC9HKiJ5ZTi/NjapmgJG1WEyhI4cVcpVwoBylJwpV
-TyuVaSjVOoqprnvYre6ch9vz2JUCAwEAAaNTMFEwHQYDVR0OBBYEFGG+MZfFt5OH
-Kxr4GyBu7mYArZ5aMB8GA1UdIwQYMBaAFGG+MZfFt5OHKxr4GyBu7mYArZ5aMA8G
-A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBACoxYrR17mEPOhOxxyRp
-ulAxTIbkhiskAI1YF4XRK3FtuWhiuivSyTWmNYfbuhl01U75tyQjd9TCKYKZsaM7
-MaaYWFaSlynFx9SZdKWMPv84re7xdUIzhH9dH+YsGij/ocdedfg/kyhdto88zB5C
-+BGEopkOnXEZGZnuhgWVlwT9Aw4MCt9P/+3baJMU0MOSjLX+CnJZ7TsXpnupH3ej
-kTPJaooiVig7V84e2jmLx4iuxDgtDSnxYN9fZeDW0SJq+7b7VlyJ9QIpQYt3kUIn
-FMAtnxv6FEeMi6k5hUXmRg/XKt/K0WQ2dopwq9XQKMiyHlA4rIJ1Ar3jX3trDyCh
-qBU=
------END CERTIFICATE-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key b/tests/dcaegen2/prh-testcases/resources/simulator/certs/server.key
deleted file mode 100644 (file)
index e86fdc4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEAwgsD1liHy+jW6LeY1i0XXzn+pq5GAnkQ/VE6oPjjmFflPTXg
-GuVbOmxEPoH+4YLFLA2cgT60YKGTjNAGc5ILY9qHZCMwZZQ+OBZeCcvi+nUxvisq
-tU1CxqoyLsjxoJ1s7rqtmKsrThEPaGnT1XLsoawrpMqMCdCfpQkkPZqAdm1wx9Dk
-p/8HTJm+VvpPdh636B59cf+IJn5vPPg/UiPrN6163DlL75LOyDFYkQJ+STchKSq7
-0MEuN/NpwrOLGr63Crl/6TODfOFQG2kngG8L0cqInllOL82NqmaAkbVYTKEjhxVy
-lXCgHKUnClVPK5VpKNU6iqmue9it7pyH2/PYlQIDAQABAoIBAAlOS+3QqxqNXRkm
-DO9glDld56eIvhTKR5VOevhTV17sADNyTQAdNcXUgWVaCKY6Bki5kmLkZfQoa5Ia
-O+T5ARDV3x5fTafhdyZrdDEWFRmb2znaih7NyMEMUoHJ40SnqBy+2Sp0Mwx4ZvvD
-74PSEiUiw6kQiazC05UvngxSR4zmV1pimJAKmKxQynWAeAAFZNl7CDG+aeoaI483
-ipaPaxNc/2i1bi+dva9Hsc1q5C4+hQZIbCdHpbZfZj5bA36vyBo/NcRcicomfuVh
-IBFRM8J7jaet68KWqNE3db+ji3xwHwJoypwF/yKtmFueWByv/HrZnaHS2gnKQQ4K
-lYbW24ECgYEA5UiqxCeZGiWW+QU3X99hUkE3FlRRp6CWlw58ffn2Ztc5uZsXf0is
-EsNHT47jIKFUqkHxBHCX4vSuAcphT/FGeXo6QkRhcSfrlQrifFGfTMbNGbrGnOZU
-FVjknQUig3GLfm99Ed4jpyf7ps+iqIXQXlt2F2FRWygnqOVmK2AA2KECgYEA2Kcl
-PDlxBuXk0LLbVIxIMymkZS3re1Gw+WJw21GpRUUpAGcZ6EKPUC0zlB4A75rLoucb
-i0DmgUNX7T5ZFczrRCjduP7MhUjM64m5Ib0/Pwci46umnLhLf6i3+Z0/QLK3iGDV
-8/6FUtKOX/UU5xKUe96MysBlnPzXUG92arQed3UCgYBHB+cXU6kjp4eI5+vKwLo2
-sEtvmHmfc6mTbIJ2yIxkOcMBVCHIZewg9+xMoliM0E4ZXMpc9MCpJ+IMXfUdvgJ2
-Ob54rxR86MAb8T5PAz5Vm7UIhotnKhfccSiJ2IBjtjZf2gwmD+p9q25TtDmQ+bue
-r7j670Qz+FGpCkBHqbs5YQKBgEj9Lqc2duSrCMZiq0+1nxFVgyPvL3kxUV0DFCBf
-R5alsSWIlorP+bY6NDk/TnNqhBZSo83rRHzh8jpkGeElU1F4LxKHDOIOX7Muh+dc
-+XTDc7ad+pir4guVDL4Ugt3KF9jjPtFfuwznEL41NCCQ+uMsW+RmoxUbfXKEyrEy
-E12NAoGAGBeR3ghlmhyasnbe7TyJbCAPU/Yut1NI4Rgb4sZcN8gwI5/wkRk0QryQ
-eo9th+0e98Y8Rxa0t9k0dkmGOM9WwVdBHZCyzgs6ihLzgy7nZAGi86+pe4BiqDmb
-NyfiL8LW+EADax5koWLQpPqrVQ66Gy2BAx4/ODBNzr3ox64jQpE=
------END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.password b/tests/dcaegen2/prh-testcases/resources/simulator/certs/truststore.password
new file mode 100644 (file)
index 0000000..168e64b
--- /dev/null
@@ -0,0 +1 @@
+*TQH?Lnszprs4LmlAj38yds(
\ No newline at end of file
index dcfdb7c..7b54539 100644 (file)
@@ -13,8 +13,7 @@ def start_http_endpoint(port, handler_class):
     _thread.start_new_thread(init_http_endpoints, (port, handler_class))
 
 
-def start_https_endpoint(port, handler_class, keyfile="certs/server.key",
-                         certfile="certs/server.crt", ca_certs="certs/client.crt"):
+def start_https_endpoint(port, handler_class, keyfile, certfile, ca_certs):
     _thread.start_new_thread(init_https_endpoints, (port, handler_class, keyfile, certfile, ca_certs))
 
 
diff --git a/tests/optf-cmso/cmso/attlibs/CurlLibrary.py b/tests/optf-cmso/cmso/attlibs/CurlLibrary.py
new file mode 100644 (file)
index 0000000..44c6229
--- /dev/null
@@ -0,0 +1,13 @@
+from curl import Curl
+
+class CurlLibrary:
+   
+
+    def get_zip(self, url, filename):
+        fp = open(filename, "wb")
+        c = Curl()
+        c.get(url, )
+        c.set_option(c.WRITEDATA, fp)
+        c.perform()
+        c.close()
+        fp.close()
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/attlibs/HTTPUtils.py b/tests/optf-cmso/cmso/attlibs/HTTPUtils.py
new file mode 100644 (file)
index 0000000..f9d380c
--- /dev/null
@@ -0,0 +1,21 @@
+import urllib
+from selenium import webdriver 
+import base64
+
+class HTTPUtils:
+    """HTTPUtils is common resource for simple http helper keywords."""
+    
+    def url_encode_string(self, barestring):
+        """URL Encode String takes in a string and converts into 'percent-encoded' string"""
+        return urllib.quote_plus(barestring)
+    
+    def ff_profile(self):
+        fp =webdriver.FirefoxProfile()
+        fp.set_preference("dom.max_script_run_time",120)
+        fp.update_preferences()
+        return fp.path 
+    
+    def b64_encode(self, instring):
+        "" 
+        return base64.b64encode(instring)
+
diff --git a/tests/optf-cmso/cmso/attlibs/JSONUtils.py b/tests/optf-cmso/cmso/attlibs/JSONUtils.py
new file mode 100644 (file)
index 0000000..5df1e5c
--- /dev/null
@@ -0,0 +1,37 @@
+import json
+
+from deepdiff import DeepDiff
+
+class JSONUtils:
+    """JSONUtils is common resource for simple json helper keywords."""
+    
+    def json_equals(self, left, right):
+        """JSON Equals takes in two strings or json objects, converts them into json if needed and then compares them, returning if they are equal or not."""
+        if isinstance(left, basestring):
+            left_json = json.loads(left);
+        else:
+            left_json = left;
+        if isinstance(right, basestring):
+            right_json = json.loads(right);
+        else:
+            right_json = right;
+            
+        ddiff = DeepDiff(left_json, right_json, ignore_order=True);
+        if ddiff == {}:
+            return True;
+        else:
+            return False;
+    
+    def json_escape(self, jsonObject):
+        jsonstr = json.dumps(jsonObject)
+        outstr = jsonstr.replace('"', '\\"').replace('\n', '\\n')
+        return  outstr    
+    
+    def make_list_into_dict(self, listOfDicts, key):
+        """ Converts a list of dicts that contains a field that has a unique key into a dict of dicts """
+        d = {}
+        if isinstance(listOfDicts, list):
+            for thisDict in listOfDicts:
+                v = thisDict[key]
+                d[v] = thisDict
+        return d          
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/attlibs/OSUtils.py b/tests/optf-cmso/cmso/attlibs/OSUtils.py
new file mode 100644 (file)
index 0000000..78968f0
--- /dev/null
@@ -0,0 +1,14 @@
+from sys import platform
+
+class OSUtils:
+    """ Utilities useful for constructing OpenStack HEAT requests """
+
+    def get_normalized_os(self):
+        os = platform
+        if platform == "linux" or platform == "linux2":
+            os = 'linux64'
+        elif platform == "darwin":
+            os = 'mac64'
+        elif platform == "win32":
+            os = platform
+        return os
diff --git a/tests/optf-cmso/cmso/attlibs/RequestsClientCert.py b/tests/optf-cmso/cmso/attlibs/RequestsClientCert.py
new file mode 100644 (file)
index 0000000..e1fd66f
--- /dev/null
@@ -0,0 +1,7 @@
+
+class RequestsClientCert:
+    """RequestsClientCert allows adding a client cert to the Requests Robot Library."""
+    
+    def add_client_cert(self, session, cert):
+        """Add Client Cert takes in a requests session object and a string path to the cert"""
+        session.cert = cert
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/attlibs/StringTemplater.py b/tests/optf-cmso/cmso/attlibs/StringTemplater.py
new file mode 100644 (file)
index 0000000..680600f
--- /dev/null
@@ -0,0 +1,8 @@
+from string import Template
+
+class StringTemplater:
+    """StringTemplater is common resource for templating with strings."""
+    
+    def template_string(self, template, values):
+        """Template String takes in a string and its values and converts it using the string.Template class"""
+        return Template(template).substitute(values) 
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/attlibs/UID.py b/tests/optf-cmso/cmso/attlibs/UID.py
new file mode 100644 (file)
index 0000000..4374809
--- /dev/null
@@ -0,0 +1,8 @@
+import uuid
+
+class UID:
+    """UUID is a simple library that generates a uuid"""
+    
+    def generate_UUID(self):
+        """generate a uuid"""
+        return uuid.uuid4()
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/resources/approval_requests.robot b/tests/optf-cmso/cmso/resources/approval_requests.robot
new file mode 100644 (file)
index 0000000..9de1887
--- /dev/null
@@ -0,0 +1,38 @@
+*** Settings ***
+Documentation    Scheduler keywords
+
+#Library   StringTemplater
+#Library   UUID
+Library                ../attlibs/UID.py
+Library                ../attlibs/StringTemplater.py
+Library   DateTime
+Library   Collections
+
+Resource       scheduler_common.robot
+Resource       json_templater.robot
+
+*** Variables ****
+${TEMPLATES}    assets/templates/changemanagement
+${UTC}   %Y-%m-%dT%H:%M:%SZ
+
+*** Keywords ***
+Wait For Pending Approval
+     [Documentation]    Gets the schedule identified by the uuid and checks if it is in the Pending Approval state
+     [Arguments]   ${uuid}     ${status}=Pending Approval
+     ${resp}=   Get Change Management   auth   schedules/${uuid}
+     ${json}=   Catenate   ${resp.json()}
+     Dictionary Should Contain Item    ${resp.json()}    status    ${status}    
+
+Send Tier2 Approval
+    [Documentation]    Sends an approval post request for the given schedule using the UUID and User given and checks that request worked
+    [Arguments]   ${uuid}   ${user}   ${status}
+    ${approval}=   Create Dictionary   approvalUserId=${user}   approvalType=Tier 2   approvalStatus=${status}          
+    ${resp}=   Post Change Management   auth   schedules/${uuid}/approvals   data=${approval}
+    Should Be Equal As Strings    ${resp.status_code}   204
+     
+    
+Send Invalid Approval    
+   [Arguments]   ${uuid}   ${user}   
+   ${approval}=   Create Dictionary   approvalUserId=${user}   approvalType=Tier 3   approvalStatus=Accepted              
+   Run Keyword and Expect Error   400   Post Change Management   auth   schedules/${uuid}/approvals   data=${approval}
+    
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyDomain.json.template
new file mode 100644 (file)
index 0000000..1aea5ef
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleID.json.template
new file mode 100644 (file)
index 0000000..2733b07
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyScheduleName.json.template
new file mode 100644 (file)
index 0000000..9d827bd
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowEmptyUserID.json.template
new file mode 100644 (file)
index 0000000..d779f2c
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectPolicyId.json.template
new file mode 100644 (file)
index 0000000..061b6b7
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "string",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowIncorrectWorkflow.json.template
new file mode 100644 (file)
index 0000000..87ab8f3
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Not A Workflow"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNegativeNormalDurationInSeconds.json.template
new file mode 100644 (file)
index 0000000..633ce46
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : -5,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoEndTime.json.template
new file mode 100644 (file)
index 0000000..62dae5b
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : ""
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoNodeName.json.template
new file mode 100644 (file)
index 0000000..22fc89a
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       ""
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowNoStartTime.json.template
new file mode 100644 (file)
index 0000000..4f1f25b
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template b/tests/optf-cmso/cmso/resources/assets/templates/FailureCasesChangeManagement/OneVnfOneChangeWindowSwitchedTime.json.template
new file mode 100644 (file)
index 0000000..a7f19d4
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO.TimeLimitAndVerticalTopology",
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${end_time1}",
+                                               "endTime" : "${start_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template b/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyAdditionalDuration.json.template
new file mode 100644 (file)
index 0000000..5c9e0a3
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "VNFName1${testid}",
+                                       "VNFName2${testid}",
+                                       "VNFName3${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template b/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyDomain.json.template
new file mode 100644 (file)
index 0000000..19c1d87
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "VNFName1${testid}",
+                                       "VNFName2${testid}",
+                                       "VNFName3${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template b/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyScheduleId.json.template
new file mode 100644 (file)
index 0000000..ab92d18
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "VNFName1${testid}",
+                                       "VNFName2${testid}",
+                                       "VNFName3${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template b/tests/optf-cmso/cmso/resources/assets/templates/MutipleVNFImmediateFailureCases/MultipleVnfImmediateEmptyUserId.json.template
new file mode 100644 (file)
index 0000000..9de749c
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "groupId" : "",
+                               "node" : [
+                                       "VNFName1${testid}",
+                                       "VNFName2${testid}",
+                                       "VNFName3${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template b/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyDomain.json.template
new file mode 100644 (file)
index 0000000..8d2f09f
--- /dev/null
@@ -0,0 +1,20 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template b/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleId.json.template
new file mode 100644 (file)
index 0000000..b363a27
--- /dev/null
@@ -0,0 +1,20 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template b/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyScheduleName.json.template
new file mode 100644 (file)
index 0000000..4bb70ec
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+       
+               "vnfDetails" : [{
+                               "node" : [
+                                       "ZRDM1MMSC04${testid}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template b/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptySchedulingInfo.json.template
new file mode 100644 (file)
index 0000000..461f166
--- /dev/null
@@ -0,0 +1,14 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template b/tests/optf-cmso/cmso/resources/assets/templates/OneVNFImmediateFailureCases/OneVnfImmediateEmptyUserId.json.template
new file mode 100644 (file)
index 0000000..a2a4ba4
--- /dev/null
@@ -0,0 +1,14 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData1.json.template b/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData1.json.template
new file mode 100644 (file)
index 0000000..73c2e34
--- /dev/null
@@ -0,0 +1,26 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}",
+                       "plans" : "Run ${workflow}",
+                       "question.000000000000001" : "Yes",
+                       "domainName1" : "domainValue1"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                               "groupId" : "group1",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData2.json.template b/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData2.json.template
new file mode 100644 (file)
index 0000000..0f02116
--- /dev/null
@@ -0,0 +1,27 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}",
+                       "plans" : "Run ${workflow}",
+                       "question.000000000000001" : "Yes",
+                       "domainName1" : "domainValue1",
+                       "domainName2" : "domainValue2"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                               "groupId" : "group1",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData3.json.template b/tests/optf-cmso/cmso/resources/assets/templates/SearchSchedulerDetails/OneVnfImmediate_domainData3.json.template
new file mode 100644 (file)
index 0000000..dc64483
--- /dev/null
@@ -0,0 +1,29 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}",
+                       "plans" : "Run ${workflow}",
+                       "question.000000000000001" : "Yes",
+                       "domainName1" : "domainValue1",
+                       "domainName2" : "domainValue2",
+                       "domainName3" : "domainValue3"
+                       
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                               "groupId" : "group1",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/MultipleVnfImmediate.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/MultipleVnfImmediate.json.template
new file mode 100644 (file)
index 0000000..542e19e
--- /dev/null
@@ -0,0 +1,24 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}",
+                                       "${node2}",
+                                       "${node3}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNFsOneChangeWindow.json.template
new file mode 100644 (file)
index 0000000..9bfd3d2
--- /dev/null
@@ -0,0 +1,32 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_pserver",
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}",
+                                       "${node2}",
+                                       "${node3}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneGroupMultipleVNSsTwoChangeWindows.json.template
new file mode 100644 (file)
index 0000000..a3cef8a
--- /dev/null
@@ -0,0 +1,37 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_pserver",
+               "vnfDetails" : [{
+                               "groupId" : "Group1",
+                               "node" : [
+                                       "${node1}",
+                                       "${node2}",
+                                       "${node3}",
+                                       "${node4}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       },{
+                                               "startTime" : "${start_time2}",
+                                               "endTime" : "${end_time2}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
+
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediate.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediate.json.template
new file mode 100644 (file)
index 0000000..c108c15
--- /dev/null
@@ -0,0 +1,25 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}",
+                       "plans" : "Run ${workflow}",
+                       "question.000000000000001" : "Yes"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                               "groupId" : "group1",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateIncorrectWorkflow.json.template
new file mode 100644 (file)
index 0000000..e91c653
--- /dev/null
@@ -0,0 +1,21 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Not A Workflow"
+               }
+       ],
+       "schedulingInfo" : {
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfImmediateReplaceVNFInfra.json.template
new file mode 100644 (file)
index 0000000..d896a62
--- /dev/null
@@ -0,0 +1,23 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "ReplaceVnfInfra"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "vnfDetails" : [{
+                       "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindow.json.template
new file mode 100644 (file)
index 0000000..93bb2ac
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "${workflow}"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_pserver",
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackData.json.template
new file mode 100644 (file)
index 0000000..e6e584b
--- /dev/null
@@ -0,0 +1,25 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "",
+                       "WorkflowName" : "Build Software Upgrade for vNFs"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_v2_split_1",
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowEmptyCallbackURL.json.template
new file mode 100644 (file)
index 0000000..57634d6
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Build Software Upgrade for vNFs"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_v2_split_1",
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/OneVnfOneChangeWindowReplaceVNFInfra.json.template
new file mode 100644 (file)
index 0000000..e5d62bf
--- /dev/null
@@ -0,0 +1,30 @@
+{
+       "domain" : "ChangeManagement",
+       "scheduleId" : "${uuid}",
+       "scheduleName" : "${uuid}",
+       "userId" : "${userId}",
+       "domainData" : [{
+                       "CallbackUrl" : "${callbackUrl}",
+                       "CallbackData" : "${callbackData}",
+                       "WorkflowName" : "Replace"
+               }
+       ],
+       "schedulingInfo" : {
+               "normalDurationInSeconds" : 100,
+               "additionalDurationInSeconds" : 10,
+               "concurrencyLimit" : 10,
+               "policyId" : "SNIRO_CM.TimeLimitAndVerticalTopology_v2_split_1",
+               "vnfDetails" : [{
+                               "groupId" : "group",
+                               "node" : [
+                                       "${node1}"
+                               ],
+                               "changeWindow" : [{
+                                               "startTime" : "${start_time1}",
+                                               "endTime" : "${end_time1}"
+                                       }
+                               ]
+                       }
+               ]
+       }
+}
diff --git a/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/VidCallbackData.json.template b/tests/optf-cmso/cmso/resources/assets/templates/changemanagement/VidCallbackData.json.template
new file mode 100644 (file)
index 0000000..177b55a
--- /dev/null
@@ -0,0 +1,40 @@
+{
+       "requestType" : "Update",
+       "requestDetails" : [{
+                       "vnfName" : "mdns_2017_1011_oh22u_20171103",
+                       "vnfInstanceId" : "b8d99523-1e83-4fd1-b42f-849361ef7024",
+                       "modelInfo" : {
+                               "modelType" : "vnf",
+                               "modelInvariantId" : "93e16072-715a-42ef-9d0a-080052d6b716",
+                               "modelVersionId" : "4ec07a2d-6bb5-4373-8ed6-4bc7ac1246fd",
+                               "modelName" : "mdns_2017_1011_oh22u_20171103",
+                               "modelCustomizationId" : "1779a999-ea17-4f31-98e9-75b6fbdd0acb"
+                       },
+                       "cloudConfiguration" : {
+                               "lcpCloudRegionId" : "mdt1",
+                               "tenantId" : "88a6ca3ee0394ade9403f075db23167e"
+                       },
+                       "requestInfo" : {
+                               "source" : "VID",
+                               "suppressRollback" : false,
+                               "requestorId" : "az2016"
+                       },
+                       "relatedInstanceList" : [{
+                                       "relatedInstance" : {
+                                               "instanceId" : "54ba3628-9ee5-4b32-8a2a-3abf001bed4e",
+                                               "modelInfo" : {
+                                                       "modelType" : "service",
+                                                       "modelInvariantId" : "e58733ef-43cb-4b6b-b641-922078b6c88b",
+                                                       "modelVersionId" : "4ec07a2d-6bb5-4373-8ed6-4bc7ac1246fd",
+                                                       "modelName" : "mdns_2017_1011",
+                                                       "modelVersion" : "4.0"
+                                               }
+                                       }
+                               }
+                       ],
+                       "requestParameters" : {
+                               "usePreload" : true
+                       }
+               }
+       ]
+}
diff --git a/tests/optf-cmso/cmso/resources/browser_setup.robot b/tests/optf-cmso/cmso/resources/browser_setup.robot
new file mode 100644 (file)
index 0000000..032759e
--- /dev/null
@@ -0,0 +1,50 @@
+*** Settings ***
+Documentation     The main interface for interacting with VID. It handles low level stuff like managing the selenium request library and VID required steps
+Library           Collections
+Library           OSUtils
+Library           OperatingSystem
+Library           Selenium2Library
+
+*** Variables ***
+${CHROME_DRIVER_WIN32_PATH}            drivers/win32
+${CHROME_DRIVER_MAC64_PATH}            drivers/mac64
+${CHROME_DRIVER_LINUX64_PATH}          drivers/linux64
+${CHROME_DRIVER_WIN32}            ${CHROME_DRIVER_WIN32_PATH}/chromedriver.exe
+${CHROME_DRIVER_MAC64}            ${CHROME_DRIVER_MAC64_PATH} /chromedriver
+${CHROME_DRIVER_LINUX64}          ${CHROME_DRIVER_LINUX64_PATH}/chromedriver
+
+*** Keywords ***
+Setup Browser
+    [Documentation]   Sets up browser based upon the value of 
+    [Arguments]    ${browser}
+    Run Keyword If    '${browser}' == 'firefox'    Setup Browser Firefox
+    Run Keyword If    '${browser}' == 'chrome'    Setup Browser Chrome
+    Log    Running with ${browser}
+    
+Setup Browser Firefox
+    ${dc}   Evaluate    sys.modules['selenium.webdriver'].DesiredCapabilities.FIREFOX  sys, selenium.webdriver
+    Set To Dictionary   ${dc}   elementScrollBehavior    1 
+    Create Webdriver    Firefox    desired_capabilities=${dc}
+    ##Set Global Variable    ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES}    ${dc}
+           
+ Setup Browser Chrome
+    ${os}=   Get Normalized Os 
+    Log    Normalized OS=${os}
+    Run Keyword If    '${os}' == 'win32'    Append To Environment Variable    PATH    ${CHROME_DRIVER_WIN32_PATH}
+    ##Run Keyword If    '${os}' == 'win32'    Set Environment Variable    webdriver.chrome.driver    ${CHROME_DRIVER_WIN32}
+    Run Keyword If    '${os}' == 'mac64'    Append To Environment Variable    PATH    ${CHROME_DRIVER_MAC64_PATH}
+    #Run Keyword If    '${os}' == 'mac64'    Set Environment Variable  webdriver.chrome.driver    ${CHROME_DRIVER_MAC64}
+    Run Keyword If    '${os}' == 'linux64'    Append To Environment Variable    PATH    ${CHROME_DRIVER_LINUX64_PATH}
+    #Run Keyword if    '${os}' == 'linux64'     Set Environment Variable  webdriver.chrome.driver    ${CHROME_DRIVER_LINUX64}
+    ${chrome options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys
+    Call Method    ${chrome options}    add_argument    no-sandbox
+    ${dc}   Evaluate    sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME  sys, selenium.webdriver
+    Set To Dictionary   ${dc}   elementScrollBehavior    1
+    Create Webdriver    Chrome   chrome_options=${chrome_options}    desired_capabilities=${dc}  
+    #Set Global Variable    ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES}    ${dc}       
+
+Handle ATT Speed Bump    
+    [Documentation]    Handle AT&T Speed Bump when accessing Rackspace UI from AT&T network
+    ${test}    ${value}=    Run keyword and ignore error    Title Should Be     Notice - Uncategorized Site
+    Run keyword If    '${test}' == 'PASS'    Click Element    xpath=//a[contains(@href, 'accepted-Notify-Uncategorized')] 
\ No newline at end of file
diff --git a/tests/optf-cmso/cmso/resources/change_management_ete.robot b/tests/optf-cmso/cmso/resources/change_management_ete.robot
new file mode 100644 (file)
index 0000000..2b1ff54
--- /dev/null
@@ -0,0 +1,103 @@
+*** Settings ***
+Documentation    Creates VID VNF Instance
+
+#Library   StringTemplater
+#Library   UUID
+Library                ../attlibs/UID.py
+Library                ../attlibs/StringTemplater.py
+Library   Collections
+Library   SSHLibrary
+
+Resource       scheduler_common.robot
+Resource       json_templater.robot
+Resource       create_schedule.robot
+Resource       approval_requests.robot
+
+*** Variables ****
+${TEMPLATES}   /assets/templates
+
+*** Keywords ***
+Change Management Template
+   [Arguments]    ${request_file}   ${workflow}   ${minutesFromNow}=1
+   ${template_folder}=    Catenate   ${TEMPLATES}/changemanagement
+   ${uuid}=   Generate UUID 
+   ${resp}=   Create Schedule   ${uuid}   ${request_file}   ${template_folder}   workflow=${workflow}   minutesFromNow=${minutesFromNow}   
+   Should Be Equal as Strings    ${resp.status_code}    202
+   Validate Acknowledgment Response Headers    ${resp} 
+   Wait Until Keyword Succeeds    600s    30s    Wait For Pending Approval   ${uuid}
+   Send Tier2 Approval   ${uuid}   jf9860    Accepted      
+   ${resp}=   Get Change Management   auth   schedules/${uuid}
+   Wait Until Keyword Succeeds    120s    30s    Wait For All VNFs Reach Status   Completed   ${uuid}
+   Wait Until Keyword Succeeds    120s    30s    Wait for Schedule to Complete   Completed   ${uuid}
+   ${reps}=   Delete Change Management   auth   schedules/${uuid}
+
+Change Management Immediate Template
+   [Arguments]    ${request_file}    ${workflow}  
+   ${template_folder}=    Catenate   ${TEMPLATES}/changemanagement
+   ${uuid}=   Generate UUID 
+   ${resp}=   Create Schedule   ${uuid}   ${request_file}   ${template_folder}   workflow=${workflow}
+   Should Be Equal as Strings    ${resp.status_code}   202
+   Validate Acknowledgment Response Headers    ${resp}
+   Wait Until Keyword Succeeds    120s    30s    Wait For All VNFs Reach Status   Completed   ${uuid}
+   Wait Until Keyword Succeeds    120s    30s    Wait for Schedule to Complete   Completed   ${uuid}
+   ${reps}=   Delete Change Management   auth   schedules/${uuid}
+    
+Wait For All VNFs Reach Status
+    [Arguments]   ${status}   ${uuid}
+    ${resp}=   Get Change Management   auth   schedules/scheduleDetails?request.scheduleId=${uuid}
+    : for   ${vnf}   in  @{resp.json()}
+    \   Dictionary Should Contain Item   ${vnf}   status   Completed 
+      
+Wait for Schedule to Complete
+    [Arguments]   ${status}   ${uuid}
+    ${resp}=   Get Change Management   auth   schedules/${uuid}
+    Dictionary Should Contain Item   ${resp.json()}   status   Completed 
+
+Create and Approve
+   [Arguments]    ${request_file}   ${workflow}   ${minutesFromNow}=5  
+   ${template_folder}=    Catenate   ${TEMPLATES}/changemanagement
+   ${uuid}=   Generate UUID 
+   ${resp}=   Create Schedule   ${uuid}   ${request_file}   ${template_folder}   workflow=${workflow}   minutesFromNow=${minutesFromNow}   
+   Should Be Equal as Strings    ${resp.status_code}    202 
+   Validate Acknowledgment Response Headers    ${resp}
+   Wait Until Keyword Succeeds    300s    5s    Wait For Pending Approval   ${uuid}
+   Send Tier2 Approval   ${uuid}   jf9860    Accepted      
+
+Change Management Cancel Template
+   [Arguments]    ${request_file}   ${workflow}   ${minutesFromNow}=5
+   ${template_folder}=    Catenate   ${TEMPLATES}/changemanagement
+   ${uuid}=   Generate UUID 
+   ${resp}=   Create Schedule   ${uuid}   ${request_file}   ${template_folder}   workflow=${workflow}   minutesFromNow=${minutesFromNow}   
+   Should Be Equal as Strings    ${resp.status_code}    202 
+   Validate Acknowledgment Response Headers    ${resp}
+   Wait Until Keyword Succeeds    600s    5s    Wait For Pending Approval   ${uuid}
+   Send Tier2 Approval   ${uuid}   jf9860    Accepted      
+   ${resp}=   Delete Change Management   auth   schedules/${uuid}
+   Should Be Equal as Strings    ${resp.status_code}    204 
+   Log    ${resp.headers}    
+   
+Validate Acknowledgment Response Headers 
+    [Arguments]    ${Response} 
+    Log     ${Response.headers} 
+    ${act_headers_keys} =    Get Dictionary Keys    ${Response.headers} 
+    Dictionary Should Contain Key    ${Response.headers}    X-LatestVersion 
+    Dictionary Should Contain Key    ${Response.headers}    X-MinorVersion 
+    Dictionary Should Contain Key    ${Response.headers}    X-PatchVersion
+    
+    
+    
+Change Management Immediate Template Query Data    
+   [Arguments]    ${request_file}    ${workflow}  
+   ${template_folder}=    Catenate   ${TEMPLATES}/SearchSchedulerDetails
+   ${uuid}=   Generate UUID 
+   ${resp}=   Create Schedule   ${uuid}   ${request_file}   ${template_folder}   workflow=${workflow}
+   Should Be Equal as Strings    ${resp.status_code}   202
+   Validate Acknowledgment Response Headers    ${resp}
+   Wait Until Keyword Succeeds    120s    30s    Wait For All VNFs Reach Status   Completed   ${uuid}
+   Wait Until Keyword Succeeds    120s    30s    Wait for Schedule to Complete   Completed   ${uuid}
+   [Return]    ${uuid}
+   
+   
+
+               
diff --git a/tests/optf-cmso/cmso/resources/create_schedule.robot b/tests/optf-cmso/cmso/resources/create_schedule.robot
new file mode 100644 (file)
index 0000000..43d5ff1
--- /dev/null
@@ -0,0 +1,54 @@
+*** Settings ***
+Documentation    SCheduler tests
+
+#Library   StringTemplater
+#Library   UUID
+Library                ../attlibs/UID.py
+Library                ../attlibs/StringTemplater.py
+Library                ../attlibs/JSONUtils.py
+Library   String
+Library   DateTime
+Library   Collections 
+Library   OperatingSystem 
+#Library   JSONUtils
+
+Resource       scheduler_common.robot
+Resource       json_templater.robot
+
+*** Variables ****
+${VID_TEMPLATES}    /assets/templates/changemanagement
+${GLOBAL_VID_CALLBACK_URL}             http://127.0.0.1:8080/scheduler/v1/loopbacktest/vid
+${GLOBAL_VID_USERID}           jf9860
+${NODES}       aaiaic25ctsf0002v,dpa2bhsfe0001v,ctsf0008v,nsbg0002v
+${UTC}   %Y-%m-%dT%H:%M:%SZ
+
+*** Keywords ***
+Create Schedule
+    [Arguments]   ${uuid}   ${request_file}    ${TEMPLATES}   ${workflow}=Unknown    ${minutesFromNow}=5
+    ${testid}=   Catenate   ${uuid}
+    ${testid}=   Get Substring   ${testid}   -4
+    ${dict}=   Create Dictionary   serviceInstanceId=${uuid}   parent_service_model_name=${uuid}
+    ${callbackData}=   Fill JSON Template File    ${CURDIR}${VID_TEMPLATES}/VidCallbackData.json.template   ${dict} 
+    ${callbackDataString}=   Json Escape    ${callbackData}   
+       ${map}=   Create Dictionary   uuid=${uuid}   callbackUrl=${GLOBAL_VID_CALLBACK_URL}   callbackData=${callbackDataString}    testid=${testid}   workflow=${workflow}      userId=${GLOBAL_VID_USERID}
+       ${nodelist}=   Split String    ${NODES}   ,
+       ${nn}=    Catenate    1
+    # Support up to 4 ChangeWindows
+    : For   ${i}   in range   1    4    
+    \  ${today}=    Evaluate   ((${i}-1)*1440)+${minutesFromNow}
+    \  ${tomorrow}   Evaluate   ${today}+1440 
+    \  ${last_time}   Evaluate  ${today}+30   
+    \  ${start_time}=    Get Current Date   UTC  + ${today} minutes   result_format=${UTC}
+    \  ${end_time}=    Get Current Date   UTC   + ${tomorrow} minutes   result_format=${UTC}
+    \  Set To Dictionary    ${map}   start_time${i}=${start_time}   end_time${i}=${end_time}      
+
+       : For   ${vnf}   in    @{nodelist}
+       \   Set To Dictionary    ${map}   node${nn}   ${vnf}   
+       \   ${nn}=   Evaluate    ${nn}+1     
+
+    ${data}=   Fill JSON Template File    ${CURDIR}${TEMPLATES}/${request_file}   ${map}    
+    ${resp}=   Post Change Management   auth   schedules/${uuid}   data=${data}
+    [Return]   ${resp}
+    
+       
+    
diff --git a/tests/optf-cmso/cmso/resources/files.robot b/tests/optf-cmso/cmso/resources/files.robot
new file mode 100644 (file)
index 0000000..fcfffbb
--- /dev/null
@@ -0,0 +1,50 @@
+*** Settings ***
+Documentation     Some handy Keywords for accessing log files over SSH.  Assumptions are that logs will belong to users other than the currently logged in user and that sudo will be required
+Library           OperatingSystem
+Library              SSHLibrary
+Library           HttpLibrary.HTTP
+Library           String
+Library           Collections
+
+*** Variables ***
+
+*** Keywords ***
+Open Connection And Log In
+   [Documentation]    Open a connection using the passed user and SSH key. Connection alias will be the host name by default.
+   [Arguments]    ${HOST}    ${user}    ${pvt}    ${password}=    ${alias}=${HOST}    ${timeout}=120s
+   Open Connection    ${HOST}    alias=${alias}    timeout=${timeout}
+   Login With Public Key    ${user}    ${pvt}    password=${password}    delay=0.5 seconds
+
+Grep Local File
+    [Documentation]     Grep the passed file name and return all of the lines that match the passed pattern using the current connection
+    [Arguments]    ${pattern}     ${fullpath}
+    ${output}=    Execute Command    grep ${pattern} ${fullpath}
+    [Return]     ${output}
+
+ Grep File on Host
+    [Documentation]     Grep the passed file name and return all of the lines that match the passed pattern using passed connection alias/host
+    [Arguments]     ${host}    ${pattern}     ${fullpath}
+    Switch Connection    ${host}
+    ${output}=    Grep Local File    ${pattern}    ${fullpath}
+    @{lines}=    Split To Lines    ${output}
+    [Return]     @{lines}
+
+Grep File on Hosts
+    [Documentation]     Grep the passed file name and return all of the lines that match the passed pattern using passed list of connections
+    [Arguments]    ${HOSTS}    ${pattern}    ${fullpath}
+    &{map}=    Create Dictionary
+    :FOR    ${HOST}    IN    @{HOSTS}
+    \    Log    ${HOST}
+    \    @{lines}=    Grep File on Host    ${HOST}   ${pattern}    ${fullpath}
+    \    &{map}=    Create Dictionary    ${HOST}=@{lines}    &{map}
+    [Return]    &{map}
+
+Tail File on Host Until
+    [Documentation]     Tail log file into grep which returns file lines containing the grep pattern. Will timeout after timeout= if expected pattern not received.
+    [Arguments]    ${host}    ${pattern}    ${fullpath}    ${expected}    ${timeout}=60    ${options}=-c -0
+    Switch Connection    ${host}
+    ${tailcommand}=    Catenate    tail ${options} -f ${fullpath} | grep --color=never ${pattern}
+    Write    ${tailcommand}
+    ${stdout}= Read Until Regexp    ${expected}
+    @{lines}=    Split To Lines    ${stdout}
+    [Return]    @{lines}
diff --git a/tests/optf-cmso/cmso/resources/json_templater.robot b/tests/optf-cmso/cmso/resources/json_templater.robot
new file mode 100644 (file)
index 0000000..ebbbf43
--- /dev/null
@@ -0,0 +1,21 @@
+*** Settings ***
+Documentation     This resource is filling out json string templates and returning the json back
+Library              RequestsLibrary
+#Library           StringTemplater
+Library                ../attlibs/StringTemplater.py
+Library           OperatingSystem
+
+*** Keywords ***
+Fill JSON Template
+    [Documentation]    Runs substitution on template to return a filled in json
+    [Arguments]    ${json}    ${arguments}
+    ${returned_string}=    Template String    ${json}    ${arguments}
+    ${returned_json}=  To Json    ${returned_string}
+    [Return]    ${returned_json}
+
+Fill JSON Template File
+    [Documentation]    Runs substitution on template to return a filled in json
+    [Arguments]    ${json_file}    ${arguments}
+    ${json}=    OperatingSystem.Get File    ${json_file}
+    ${returned_json}=  Fill JSON Template    ${json}    ${arguments}
+    [Return]    ${returned_json}
diff --git a/tests/optf-cmso/cmso/resources/misc.robot b/tests/optf-cmso/cmso/resources/misc.robot
new file mode 100644 (file)
index 0000000..e20640c
--- /dev/null
@@ -0,0 +1,43 @@
+*** Settings ***
+Library     Collections
+Library     String
+#Library     UUID
+Library                ../attlibs/UID.py
+Library     Process
+Library     HttpLibrary.HTTP
+Documentation     Miscellaneous keywords
+
+Resource    json_templater.robot
+Resource    create_schedule.robot
+
+
+*** Variables ***
+
+*** Keywords ***
+
+Validate Status
+    [Documentation]    Fail unless the Request response is in the passed list of valid HTTP status codes.
+    [Arguments]    ${resp}    ${valid_status_list}
+    ${status_code}   Convert To String   ${resp.status_code}
+    Return From Keyword If   '${resp.status_code}' in ${valid_status_list}
+    Fail   ${resp.status_code}
+    
+Validate JSON Error
+    [Documentation]     Fails if messageIds do not match. expected_errors should be a list but a string would likely work as well
+    [Arguments]    ${resp_json}    ${expected_errors}
+    ${result}=   Get From Dictionary   ${resp_json['requestError']}   messageId   
+    Should Contain    ${expected_errors}    ${result}    #checks expected_errors list for the actual error received from schedule
+    
+Check ATTIDs Template
+   [Documentation]    This just checks a list of uuids 
+   [Arguments]    ${expected_status_code}    ${template_folder}
+   ${request_file}=    Convert to String    OneVnfImmediateATTID.json.template
+   ${attid_file}=    OperatingSystem.Get File    robot/assets/AOTS_CM_IDs.txt
+   @{attids}=    Split to lines    ${attid_file}
+   :for    ${attid}    in    @{attids}
+   \   ${uuid}=    Generate UUID
+   \   ${resp}=   Run Keyword and Continue on Failure    Create Schedule   ${uuid}   ${request_file}   ${template_folder}    attid=${attid}
+   \   Run Keyword and Continue on Failure   Should Be Equal as Strings    ${resp.status_code}    ${expected_status_code}
+   \   ${reps}=   Delete Change Management   auth   schedules/${uuid}
+    
+    
diff --git a/tests/optf-cmso/cmso/resources/scheduler_common.robot b/tests/optf-cmso/cmso/resources/scheduler_common.robot
new file mode 100644 (file)
index 0000000..dd2f611
--- /dev/null
@@ -0,0 +1,93 @@
+*** Settings ***
+Documentation     The private interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
+
+Library           Collections
+Library              RequestsLibrary
+#Library                 UUID
+Library                ../attlibs/UID.py
+#Library           HTTPUtils
+Library                ../attlibs/HTTPUtils.py
+Library           String
+Resource   misc.robot
+*** Variables ***
+*** Variables ***
+${GLOBAL_SCHEDULER_PORT}               8080
+${GLOBAL_SCHEDULER_PROTOCOL}           http
+#${GLOBAL_SCHEDULER_HOST}              127.0.0.1
+${GLOBAL_SCHEDULER_USER}               jf9860@csp.att.com
+${GLOBAL_SCHEDULER_PASSWORD}           45=Forty5
+${GLOBAL_APPLICATION_ID}               schedulertest
+${SCHEDULER_PATH}    /cmso/v1
+${CHANGE_MANAGEMENT_PATH}    ${SCHEDULER_PATH}
+${valid_status_codes}    200    202    400    404    204    409
+#**************** Test Case Variables ******************
+
+*** Keywords ***
+
+
+Post Change Management
+    [Documentation]    Runs a scheduler POST request
+    [Arguments]    ${alias}    ${resource}   ${data}={}
+    ${data_path}=   Catenate   ${CHANGE_MANAGEMENT_PATH}/${resource}
+    ${resp}=    Post Scheduler    ${alias}    ${data_path}   ${data}
+    [Return]   ${resp}   
+
+Delete Change Management
+    [Documentation]    Runs a scheduler DELETE request (this may need to be changed for 1802 US change Delete schedule to Cancel Schedule)
+    [Arguments]    ${alias}    ${resource}
+    ${data_path}=   Catenate   ${CHANGE_MANAGEMENT_PATH}/${resource}
+    ${resp}=    Delete Scheduler    ${alias}    ${data_path}
+    [Return]   ${resp}   
+
+Get Change Management
+    [Documentation]    Runs a scheduler GET request
+    [Arguments]    ${alias}    ${resource}  
+    ${data_path}=   Catenate   ${CHANGE_MANAGEMENT_PATH}/${resource} 
+    ${resp}=   Get Scheduler    ${alias}    ${data_path}
+    [Return]   ${resp}    
+
+Post Scheduler
+    [Documentation]    Runs a scheduler POST request
+    [Arguments]    ${alias}   ${data_path}   ${data}={}
+    ${url}=   Catenate   ${GLOBAL_SCHEDULER_PROTOCOL}://${GLOBAL_SCHEDULER_HOST}:${GLOBAL_SCHEDULER_PORT}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}    
+    ${auth_string}=   B64 Encode    ${GLOBAL_SCHEDULER_USER}:${GLOBAL_SCHEDULER_PASSWORD}
+    ${headers}=  Create Dictionary   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}   Authorization=Basic ${auth_string}
+    ${resp}=   Post Request    ${alias}        ${data_path}     headers=${headers}   data=${data}
+    Log    Received response from scheduler ${resp.text}
+    ${valid}=   Split String   ${valid_status_codes}
+    
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
+
+Delete Scheduler
+    [Documentation]    Runs a scheduler POST request
+    [Arguments]    ${alias}   ${data_path} 
+    ${url}=   Catenate   ${GLOBAL_SCHEDULER_PROTOCOL}://${GLOBAL_SCHEDULER_HOST}:${GLOBAL_SCHEDULER_PORT}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}     
+    ${auth_string}=   B64 Encode    ${GLOBAL_SCHEDULER_USER}:${GLOBAL_SCHEDULER_PASSWORD}
+    ${headers}=  Create Dictionary   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}      Authorization=Basic ${auth_string}  
+    ${resp}=   Delete Request  ${alias}        ${data_path}     headers=${headers}
+    Log    Received response from scheduler ${resp.text}
+    ${valid}=   Split String   ${valid_status_codes}
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
+
+Get Scheduler
+    [Documentation]    Runs a scheduler GET request
+    [Arguments]    ${alias}   ${data_path} 
+    ${url}=   Catenate   ${GLOBAL_SCHEDULER_PROTOCOL}://${GLOBAL_SCHEDULER_HOST}:${GLOBAL_SCHEDULER_PORT}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}     
+    ${auth_string}=   B64 Encode    ${GLOBAL_SCHEDULER_USER}:${GLOBAL_SCHEDULER_PASSWORD}
+    ${headers}=  Create Dictionary   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}      Authorization=Basic ${auth_string}
+    ${resp}=   Get Request     ${alias}        ${data_path}     headers=${headers}
+    Log    Received response from scheduler ${resp.json()}
+    ${valid}=   Split String   ${valid_status_codes}
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
diff --git a/tests/optf-cmso/cmso/resources/vtm_common.robot b/tests/optf-cmso/cmso/resources/vtm_common.robot
new file mode 100644 (file)
index 0000000..3d5b50a
--- /dev/null
@@ -0,0 +1,93 @@
+*** Settings ***
+Documentation     The private interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
+
+Library           Collections
+Library              RequestsLibrary
+Library                ../attlibs/UID.py
+Library           HTTPUtils
+Library           DateTime
+
+Resource   misc.robot
+*** Variables ***
+*** Variables ***
+# http://zld03290.vci.att.com:9018
+#
+${CLOSE_PATH}    /vtm/manageChangeRecord/v1/closeCancelChangeRecord
+${CLOSE_PORT}    31127
+
+
+#**************** Test Case Variables ******************
+
+*** Keywords ***
+
+vTM Query Template
+    [Documentation]    
+    [Arguments]    ${alias}    ${offset}=0  ${numOfrows}=100   ${display}=[]   ${filter}={}
+    ${request}=   Create Dictionary   offset=${offset}   numOfRows=${numOfRows}   displayTuple=${display}   filterTuple=${filter}
+    Log   ${request}
+    ${resp}=   vTM Query   ${alias}   ${request}
+    [Return]   ${resp}
+
+
+vTM Query
+    [Documentation]    
+    [Arguments]    ${alias}    ${request}
+    ${url}=   Catenate   ${GLOBAL_VTM_URL}
+    ${data_path}=   Catenate   ${GLOBAL_LISTCHANGE_PATH}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}   verify=True      
+    ${auth_string}=   B64 Encode    ${GLOBAL_VTM_USER}:${GLOBAL_VTM_PASSWORD}
+    #Authorization=Basic ${GLOBAL_POLICY_AUTH}   ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}   
+    ${headers}=  Create Dictionary  Authorization=Basic ${auth_string}   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${resp}=   Post Request    ${alias}        ${data_path}     headers=${headers}   data=${request}
+    Log    Received response from vTM ${resp.text}
+    ${valid}=   Create List   200    404
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
+
+
+vTM Close Ticket
+    [Documentation]    
+    [Arguments]    ${alias}    ${ticket}   ${changeClosedBy}=jf9860
+    ${url}=   Catenate   ${GLOBAL_VTM_PROTO}://${GLOBAL_VTM_HOST}:${CLOSE_PORT}
+    ${data_path}=   Catenate   ${CLOSE_PATH}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}   verify=True      
+    ${auth_string}=   B64 Encode    ${GLOBAL_VTM_USER}:${GLOBAL_VTM_PASSWORD}
+    ${end}=   Get Current Date   result_format=epoch    exclude_millis=True
+    ${end}=   Convert To Integer   ${end}
+    ${start}=   Evaluate   ${end}-60
+    ${request}=   Create Dictionary   changeId=${ticket}   status=Closed   changeClosedBy=${changeClosedBy}   closureCode=Successful As Scheduled    
+       Set To Dictionary   ${request}   customerImpacted=Unknown    actualStartDate=${start}   actualEndDate=${end}
+    
+    #Authorization=Basic ${GLOBAL_POLICY_AUTH}   ClientAuth=${GLOBAL_POLICY_CLIENTAUTH}   
+    ${headers}=  Create Dictionary  Authorization=Basic ${auth_string}   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${resp}=   Post Request    ${alias}        ${data_path}     headers=${headers}   data=${request}
+    Log    Received response from vTM ${resp.json()}
+    ${valid}=   Create List   200    404
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
+
+
+vTM Cancel Ticket
+    [Documentation]    
+    [Arguments]    ${alias}    ${ticket}
+    ${url}=   Catenate   ${GLOBAL_VTM_PROTO}://${GLOBAL_VTM_HOST}:${CLOSE_PORT}
+    ${data_path}=   Catenate   ${CLOSE_PATH}
+    ${uuid}=    Generate UUID
+    ${proxies}=   Create Dictionary   no=pass
+    ${session}=    Create Session      ${alias}   ${url}   verify=True      
+    ${auth_string}=   B64 Encode    ${GLOBAL_VTM_USER}:${GLOBAL_VTM_PASSWORD}
+    ${end}=   Get Current Date   result_format=epoch    exclude_millis=True
+    ${end}=   Convert To Integer   ${end}
+    ${start}=   Evaluate   ${end}-60
+    ${request}=   Create Dictionary   changeId=${ticket}   status=Closed   changeClosedBy=${GLOBAL_VID_USERID}   closureCode=Cancelled    closingComments=Cancel requested by user    
+       Set To Dictionary   ${request}      customerImpacted=No
+    ${headers}=  Create Dictionary  Authorization=Basic ${auth_string}   Accept=application/json    Content-Type=application/json    X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${resp}=   Post Request    ${alias}        ${data_path}     headers=${headers}   data=${request}
+    Log    Received response from vTM ${resp.json()}
+    ${valid}=   Create List   200    404
+    Validate Status   ${resp}   ${valid}
+    [Return]    ${resp}
diff --git a/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot b/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot
new file mode 100644 (file)
index 0000000..ee6f8b1
--- /dev/null
@@ -0,0 +1,28 @@
+*** Settings ***
+Documentation    Creates VID VNF Instance
+
+#Library   StringTemplater
+#Library   UUID
+Library                ../attlibs/UID.py
+Library                ../attlibs/StringTemplater.py
+Resource    ../resources/change_management_ete.robot
+
+# Test Setup            
+Test Template         Change Management Immediate Template
+# Test Teardown         
+
+*** Test Cases ***
+One Vnf Immediate Replace   OneVnfImmediate.json.template   Replace 
+   [Tags]   ete   immediate
+
+One Vnf Immediate Update Config    OneVnfImmediate.json.template   VNF Config Update 
+   [Tags]   ete   immediate
+
+One Vnf Immediate Update In Place    OneVnfImmediate.json.template   VNF Update Software In Place 
+   [Tags]   ete   immediate
+
+One Vnf Immediate Update    OneVnfImmediate.json.template   Update 
+   [Tags]   ete   immediate
+
+Multiple Vnf Immediate   MultipleVnfImmediate.json.template   Replace   
+   [Tags]   ete   immediate
diff --git a/tests/optf-cmso/cmso/testsuites/__init__.robot b/tests/optf-cmso/cmso/testsuites/__init__.robot
new file mode 100644 (file)
index 0000000..baa56c7
--- /dev/null
@@ -0,0 +1,4 @@
+*** Settings ***
+Documentation    Scheduler 
+
+*** Variables ***