diff options
69 files changed, 1606 insertions, 624 deletions
@@ -11,6 +11,10 @@ report.html env.properties .vagrant /archives/ +*.jar +*.zip +*.tar +*.gz *.log .vagrant *~ diff --git a/plans/aaf/aafapi/setup.sh b/plans/aaf/aafapi/setup.sh index add9ae17..d561ee09 100644 --- a/plans/aaf/aafapi/setup.sh +++ b/plans/aaf/aafapi/setup.sh @@ -25,53 +25,169 @@ source ${SCRIPTS}/common_functions.sh # Clone AAF Authz repo -mkdir -p $WORKSPACE/archives/aafcsit -cd $WORKSPACE/archives/aafcsit -#unset http_proxy https_proxy +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.3-SNAPSHOT + +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 git clone --depth 1 http://gerrit.onap.org/r/aaf/authz -b master git pull -cd $WORKSPACE/archives/aafcsit/authz/auth/auth-service/src/main/resources/docker-compose +chmod -R 777 authz +cd authz +CURRENT_DIR=$(pwd) + pwd -chmod -R 777 $WORKSPACE/archives/aafcsit/authz/auth/auth-service/src/main/resources/docker-compose +if [ ! -e auth/csit/d.props ]; then + cp auth/csit/d.props.init auth/csit/d.props +fi -# start aaf containers with docker compose and configuration from docker-compose.yml -docker-compose up -d -export aaf_service=$(get_docker_compose_service aaf_container) -export cassandra_service=$(get_docker_compose_service cassandra_container) +if [ ! -e auth/docker/d.props ]; then + cp auth/docker/d.props.init auth/docker/d.props +fi -# Wait for initialization of Docker container for AAF & Cassandra -for i in {1..12}; do - if [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' $cassandra_service) ] && \ - [ $(docker inspect --format '{{ .State.Running }}' $aaf_service) ] - then - echo "AAF Service Running" - break - else - echo sleep $i - sleep $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 + +sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/" auth/docker/d.props +. auth/docker/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 + +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 +fi + +sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" $WORKSPACE/archives/opt/authz/auth/csit/cass.props + +if [ ! -e $WORKSPACE/archives/opt/authz/auth/docker/cass.props ]; then + cp $WORKSPACE/archives/opt/authz/auth/docker/cass.props.init $WORKSPACE/archives/opt/authz/auth/docker/cass.props +fi + +sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" $WORKSPACE/archives/opt/authz/auth/docker/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 +fi + +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 + +# run it +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 done -AAF_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $aaf_service) -CASSANDRA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $cassandra_service) -bypass_ip_adress $AAF_IP -bypass_ip_adress $CASSANDRA_IP +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 -sS -m 1 ${AAF_IP}:8101 && break + 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}" +ROBOT_VARIABLES="-v AAF_IP:${AAF_IP}"
\ No newline at end of file diff --git a/plans/aaf/aafapi/teardown.sh b/plans/aaf/aafapi/teardown.sh index 41e0b00e..742a1b36 100644 --- a/plans/aaf/aafapi/teardown.sh +++ b/plans/aaf/aafapi/teardown.sh @@ -17,8 +17,12 @@ # Modifications copyright (c) 2017 AT&T Intellectual Property # -kill-instance.sh $aaf_service -kill-instance.sh $cassandra_service -unset aaf_service -unset cassandra_service +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/aaf/sms-test-plan/teardown.sh b/plans/aaf/sms-test-plan/teardown.sh index 2c8b3e89..fa5c218f 100644 --- a/plans/aaf/sms-test-plan/teardown.sh +++ b/plans/aaf/sms-test-plan/teardown.sh @@ -15,11 +15,5 @@ # limitations under the License. # -docker cp sms:/sms/sms.log . -cat sms.log -rm sms.log -rm -rf config -docker stop sms vault -docker rm sms vault -docker rmi nexus3.onap.org:10001/onap/aaf/sms -docker rmi docker.io/vault:0.10.0 +kill-instance.sh sms +kill-instance.sh vault diff --git a/plans/appc/healthcheck/health_check.sh b/plans/appc/healthcheck/health_check.sh index 775188f6..63e0b17a 100755 --- a/plans/appc/healthcheck/health_check.sh +++ b/plans/appc/healthcheck/health_check.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ############################################################################### -# Copyright 2018 AT&T +# Copyright 2017 Huawei Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/plans/appc/healthcheck/setup.sh b/plans/appc/healthcheck/setup.sh index 0ea9f925..5e34afba 100755 --- a/plans/appc/healthcheck/setup.sh +++ b/plans/appc/healthcheck/setup.sh @@ -21,7 +21,8 @@ SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source ${WORKSPACE}/scripts/appc/script1.sh export APPC_DOCKER_IMAGE_VERSION=1.4.0-SNAPSHOT-latest -export CCSDK_DOCKER_IMAGE_VERSION=0.2-STAGING-latest +export DGBUILDER_DOCKER_IMAGE_VERSION=0.3.0 +export ANSIBLE_DOCKER_IMAGE_VERSION=0.3.0 export BRANCH=master export SOLUTION_NAME=onap @@ -46,10 +47,16 @@ git pull cd $WORKSPACE/archives/appc/docker-compose sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" docker-compose.yml docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO + docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-image:$APPC_DOCKER_IMAGE_VERSION docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-image:$APPC_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/appc-image:latest -docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION -docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/ccsdk-dgbuilder-image:latest + +docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-dgbuilder-image:$DGBUILDER_DOCKER_IMAGE_VERSION +docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-dgbuilder-image:$DGBUILDER_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/ccsdk-dgbuilder-image:latest + +docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-ansible-server-image:$ANSIBLE_DOCKER_IMAGE_VERSION +docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/ccsdk-ansible-server-image:$ANSIBLE_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/ccsdk-ansible-server-image:latest + docker pull $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-cdt-image:$APPC_DOCKER_IMAGE_VERSION docker tag $NEXUS_DOCKER_REPO/${SOLUTION_NAME}/appc-cdt-image:$APPC_DOCKER_IMAGE_VERSION ${SOLUTION_NAME}/appc-cdt-image:latest diff --git a/plans/appc/healthcheck/teardown.sh b/plans/appc/healthcheck/teardown.sh index 94d1bc77..066c764c 100755 --- a/plans/appc/healthcheck/teardown.sh +++ b/plans/appc/healthcheck/teardown.sh @@ -17,9 +17,10 @@ # Modifications copyright (c) 2017 AT&T Intellectual Property # -kill-instance.sh appc_controller_container +kill-instance.sh ccsdk_ansible_container kill-instance.sh ccsdk_dgbuilder_container kill-instance.sh appc_cdt_container +kill-instance.sh appc_controller_container kill-instance.sh sdnc_db_container # $WORKSPACE/archives/appc deleted with archives folder when tests starts so we keep it at the end for debugging diff --git a/plans/dmaap-datarouter/dr-suite/setup.sh b/plans/dmaap-datarouter/dr-suite/setup.sh index e5debfc2..023e2658 100755 --- a/plans/dmaap-datarouter/dr-suite/setup.sh +++ b/plans/dmaap-datarouter/dr-suite/setup.sh @@ -38,7 +38,6 @@ echo DR_PROV_IP=${DR_PROV_IP} echo DR_NODE_IP=${DR_NODE_IP} echo DR_GATEWAY_IP=${DR_GATEWAY_IP} -docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$DR_GATEWAY_IP" docker exec -i datarouter-prov sh -c "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/PROV_AUTH_ADDRESSES?val=dmaap-dr-prov\|$DR_GATEWAY_IP" #Pass any variables required by Robot test suites in ROBOT_VARIABLES diff --git a/plans/integration/functionality1/setup.sh b/plans/integration/functionality1/setup.sh index 3da509fd..6ba731fe 100755 --- a/plans/integration/functionality1/setup.sh +++ b/plans/integration/functionality1/setup.sh @@ -17,6 +17,15 @@ # Place the scripts in run order: source ${WORKSPACE}/scripts/integration/script1.sh +# CLI internet speed test +curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python - + +# Test download a 100 MB file to check network speed to nexus.onap.org +wget -O /dev/null https://nexus.onap.org/content/repositories/releases/org/onap/appc/appc-dg-shared-installer/1.3.0/appc-dg-shared-installer-1.3.0.zip + +# Test download a 100 MB file to check network speed to nexus3.onap.org +wget -O /dev/null https://nexus3.onap.org/repository/docker.release/v2/-/blobs/sha256:04dc4b8163487bb1c40df1ce16f349b507c262d6e2f202baa2e66a42eb8c64a1 + docker run --name i-mock -d jamesdbloom/mockserver MOCK_IP=`get-instance-ip.sh i-mock` diff --git a/plans/optf-osdf/osdf/setup.sh b/plans/optf-osdf/osdf/setup.sh new file mode 100755 index 00000000..771423ca --- /dev/null +++ b/plans/optf-osdf/osdf/setup.sh @@ -0,0 +1,52 @@ +#!/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 "# simulator scripts calling"; +source ${WORKSPACE}/scripts/optf-osdf/osdf/simulator_script.sh + +# add here eventual scripts needed for optf/osdf +# +echo "# optf/osdf scripts calling"; +source ${WORKSPACE}/scripts/optf-osdf/osdf/osdf_script.sh + +# +# add here below the start of all docker containers needed for optf/osdf CSIT testing +# +echo "# optf/osdf scripts docker containers spinoff"; + +# +# add here all the configuration steps eventually needed to be carried out for optf/osdf CSIT testing +# +echo "# optf/osdf configuration step"; + + +# +# add here all ROBOT_VARIABLES settings +# +echo "# optf/osdf robot variables settings"; +echo "osdf ip = ${OSDF_IP}" + +ROBOT_VARIABLES="-v OSDF_HOSTNAME:http://${OSDF_IP} -v OSDF_PORT:8699" + +echo ${ROBOT_VARIABLES} + + + diff --git a/plans/optf-osdf/osdf/teardown.sh b/plans/optf-osdf/osdf/teardown.sh new file mode 100755 index 00000000..144ce266 --- /dev/null +++ b/plans/optf-osdf/osdf/teardown.sh @@ -0,0 +1,34 @@ +#!/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. +# +# ------------------------------------------------------------------------- +# + + +# +# add here below the killing of all docker containers used for optf/osdf CSIT testing +# + +# +# optf/osdf scripts docker containers killing"; +# + +kill-instance.sh optf-osdf +kill-instance.sh osdf_sim + + + diff --git a/plans/optf-osdf/osdf/testplan.txt b/plans/optf-osdf/osdf/testplan.txt new file mode 100644 index 00000000..87a2d545 --- /dev/null +++ b/plans/optf-osdf/osdf/testplan.txt @@ -0,0 +1,22 @@ +# +# ------------------------------------------------------------------------- +# Copyright (c) 2015-2017 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. +# +# ------------------------------------------------------------------------- +# + +# Test suites are relative paths under [integration.git]/test/csit/tests/. +# Place the suites in run order. +optf-osdf/osdf diff --git a/plans/policy/apex-pdp/setup.sh b/plans/policy/apex-pdp/setup.sh index 7ab5b9e2..c97072d4 100644 --- a/plans/policy/apex-pdp/setup.sh +++ b/plans/policy/apex-pdp/setup.sh @@ -21,11 +21,12 @@ docker run -d --name apex -p 12561:12561 -p 23324:23324 -it nexus3.onap.org:1000 APEX_IP=`get-instance-ip.sh apex` echo APEX IP IS ${APEX_IP} -Wait for initialization +# Wait for initialization for i in {1..10}; do curl -sS ${APEX_IP}:23324 && break echo sleep $i sleep $i done +sleep 10 ROBOT_VARIABLES="-v APEX_IP:${APEX_IP}" diff --git a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json index 17c7078e..41c4b4fe 100644 --- a/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json +++ b/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json @@ -6,8 +6,8 @@ "dmaapPortNumber": 3904, "dmaapTopicName": "/events/unauthenticated.VES_NOTIFICATION_OUTPUT", "dmaapProtocol": "http", - "dmaapUserName": "admin", - "dmaapUserPassword": "admin", + "dmaapUserName": "", + "dmaapUserPassword": "", "dmaapContentType": "application/json", "consumerId": "C12", "consumerGroup": "OpenDcae-c12", @@ -23,6 +23,14 @@ "dmaapUserPassword": "dradmin", "dmaapContentType": "application/octet-stream" } + }, + "ftp": { + "ftpesConfiguration": { + "keyCert": "/config/ftpKey.jks", + "keyPassword": "secret", + "trustedCA": "/config/ftpKey.jks", + "trustedCAPassword": "secret" + } } } -}
\ No newline at end of file +} diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml index 16db4afa..b9085d6e 100644 --- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml +++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml @@ -70,12 +70,12 @@ services: dfc: container_name: dfc - image: quay.io/martin_yan_seu/datafile + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest ports: - "8433:8433" ves: container_name: vescollector - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.3.1 + image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest environment: - DMAAPHOST:
\ No newline at end of file + DMAAPHOST: diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh index c35df72f..8dfcfe40 100644 --- a/plans/usecases/5G-bulkpm/setup.sh +++ b/plans/usecases/5G-bulkpm/setup.sh @@ -6,7 +6,6 @@ source ${SCRIPTS}/common_functions.sh mkdir -p $WORKSPACE/archives/dmaapmr cd $WORKSPACE/archives/dmaapmr git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master -git pull cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/ @@ -19,7 +18,7 @@ KAFKA=$(docker ps -a -q --filter="name=kafka_1") DMAAP=$(docker ps -a -q --filter="name=dmaap_1") # Wait for initialization of Docker contaienr for DMaaP MR, Kafka and Zookeeper -for i in {1..50}; do +for i in {1..10}; do if [ $(docker inspect --format '{{ .State.Running }}' $KAFKA) ] && \ [ $(docker inspect --format '{{ .State.Running }}' $ZOOKEEPER) ] && \ [ $(docker inspect --format '{{ .State.Running }}' $DMAAP) ] @@ -66,11 +65,11 @@ docker kill vescollector HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}') sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb ) -sed -i 's/172.100.0.2/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/prov_data/provserver.properties +sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/docker-compose/prov_data/provserver.properties docker-compose up -d # Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb -for i in {1..50}; do +for i in {1..10}; do if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \ [ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \ [ $(docker inspect --format '{{ .State.Running }}' mariadb) ] @@ -126,6 +125,7 @@ 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/ docker restart dfc +docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts" # SFTP Configuration: # Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server. @@ -138,4 +138,6 @@ docker cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/xNF.pm.xml.gz sftp:/home/ad curl -v -X POST -H "Content-Type:application/vnd.att-dr.feed" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @$WORKSPACE/plans/usecases/5G-bulkpm/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443 cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/addSubscriber.json /tmp/addSubscriber.json sed -i 's/fileconsumer/'${DR_SUBSCIBER_IP}'/g' /tmp/addSubscriber.json -curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1ii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
\ No newline at end of file +curl -v -X POST -H "Content-Type:application/vnd.att-dr.subscription" -H "X-ATT-DR-ON-BEHALF-OF:dradmin" --data-ascii @/tmp/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1 +sleep 10 +curl -k https://$DR_PROV_IP:8443/internal/prov diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh index c55f4398..0c86623b 100644 --- a/plans/usecases/5G-bulkpm/teardown.sh +++ b/plans/usecases/5G-bulkpm/teardown.sh @@ -1,5 +1,7 @@ #!/bin/bash echo "Starting teardown script" +docker exec dfc /bin/sh -c "cat /opt/log/application.log" +sleep 5 kill-instance.sh $DMAAP kill-instance.sh $KAFKA kill-instance.sh $ZOOKEEPER @@ -9,4 +11,4 @@ kill-instance.sh datarouter-prov kill-instance.sh fileconsumer-node kill-instance.sh mariadb kill-instance.sh dfc -kill-instance.sh sftp
\ No newline at end of file +kill-instance.sh sftp diff --git a/scripts/dmaap-message-router/dmaap-mr-launch.sh b/scripts/dmaap-message-router/dmaap-mr-launch.sh index 36d31689..e7ea9a97 100755 --- a/scripts/dmaap-message-router/dmaap-mr-launch.sh +++ b/scripts/dmaap-message-router/dmaap-mr-launch.sh @@ -34,7 +34,8 @@ function dmaap_mr_launch() { # # the default prefix for docker containers is the directory name containing the docker-compose.yml file. # It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment - COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-docker-compose} + COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} + export COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" @@ -83,12 +84,13 @@ function dmaap_mr_launch() { docker-compose down # Update kafkfa and zookeeper properties in MsgRtrApi.propeties which will be copied to DMaaP Container - sed -i -e 's/<zookeeper_host>/'$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties - sed -i -e 's/<kafka_host>:<kafka_port>/'$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties + sed -i -e 's/<zookeeper_host>/zookeeper/' /var/tmp/MsgRtrApi.properties + sed -i -e 's/<kafka_host>:<kafka_port>/kafka:9092/' /var/tmp/MsgRtrApi.properties docker-compose build docker login -u docker -p docker nexus3.onap.org:10001 docker-compose up -d + docker ps # Wait for initialization of Docker containers for i in {1..50}; do @@ -103,6 +105,16 @@ function dmaap_mr_launch() { sleep $i fi done + DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_dmaap_1) + IP=${DMAAP_MR_IP} + KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_kafka_1) + ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${COMPOSE_PREFIX}_zookeeper_1) + + echo "After restart of ZK and Kafka..." + echo DMAAP_MR_IP=${DMAAP_MR_IP} + echo IP=${IP} + echo KAFKA_IP=${KAFKA_IP} + echo ZOOKEEPER_IP=${ZOOKEEPER_IP} # Wait for initialization of docker services for i in {1..50}; do diff --git a/scripts/dmaap-message-router/dmaap-mr-teardown.sh b/scripts/dmaap-message-router/dmaap-mr-teardown.sh index ac6d798c..a8187d3a 100755 --- a/scripts/dmaap-message-router/dmaap-mr-teardown.sh +++ b/scripts/dmaap-message-router/dmaap-mr-teardown.sh @@ -18,7 +18,14 @@ # function dmaap_mr_teardown() { -kill-instance.sh docker-compose_dmaap_1 -kill-instance.sh docker-compose_kafka_1 -kill-instance.sh docker-compose_zookeeper_1 +# +# the default prefix for docker containers is the directory name containing the docker-compose.yml file. +# It can be over-written by an env variable COMPOSE_PROJECT_NAME. This env var seems to be set in the Jenkins CSIT environment +COMPOSE_PREFIX=${COMPOSE_PROJECT_NAME:-dockercompose} +COMPOSE_PROJECT_NAME=$COMPOSE_PREFIX +echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME" +echo "COMPOSE_PREFIX=$COMPOSE_PREFIX" +kill-instance.sh ${COMPOSE_PREFIX}_dmaap_1 +kill-instance.sh ${COMPOSE_PREFIX}_kafka_1 +kill-instance.sh ${COMPOSE_PREFIX}_zookeeper_1 } diff --git a/scripts/optf-has/has/has-properties/AAF_RootCA.cer b/scripts/optf-has/has/has-properties/AAF_RootCA.cer new file mode 100644 index 00000000..e9a50d7e --- /dev/null +++ b/scripts/optf-has/has/has-properties/AAF_RootCA.cer @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFPjCCAyagAwIBAgIJAJ6u7cCnzrWdMA0GCSqGSIb3DQEBCwUAMCwxDjAMBgNV +BAsMBU9TQUFGMQ0wCwYDVQQKDARPTkFQMQswCQYDVQQGEwJVUzAeFw0xODA0MDUx +NDE1MjhaFw0zODAzMzExNDE1MjhaMCwxDjAMBgNVBAsMBU9TQUFGMQ0wCwYDVQQK +DARPTkFQMQswCQYDVQQGEwJVUzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMA5pkgRs7NhGG4ew5JouhyYakgYUyFaG121+/h8qbSdt0hVQv56+EA41Yq7 +XGie7RYDQK9NmAFF3gruE+6X7wvJiChp+Cyd7sFMnb65uWhxEdxWTM2BJFrgfzUn +H8ZCxgaCo3XH4PzlKRy2LQQJEJECwl/RZmRCXijMt5e9h8XoZY/fKkKcZZUsWNCM +pTo266wjvA9MXLmdgReRj0+vrCjrNqy+htwJDztoiHWiYPqT6o8EvGcgjNqjlZx7 +NUNf8MfLDByqKF6+wRbHv1GKjn3/Vijd45Fv8riyRYROiFanvbV6jIfBkv8PZbXg +2VDWsYsgp8NAvMxK+iV8cO+Ck3lBI2GOPZbCEqpPVTYbLUz6sczAlCXwQoPzDIZY +wYa3eR/gYLY1gP2iEVHORag3bLPap9ZX5E8DZkzTNTjovvLk8KaCmfcaUMJsBtDd +ApcUitz10cnRyZc1sX3gE1f3DpzQM6t9C5sOVyRhDcSrKqqwb9m0Ss04XAS9FsqM +P3UWYQyqDXSxlUAYaX892u8mV1hxnt2gjb22RloXMM6TovM3sSrJS0wH+l1nznd6 +aFXftS/G4ZVIVZ/LfT1is4StoyPWZCwwwly1z8qJQ/zhip5NgZTxQw4mi7ww35DY +PdAQOCoajfSvFjqslQ/cPRi/MRCu079heVb5fQnnzVtnpFQRAgMBAAGjYzBhMB0G +A1UdDgQWBBRTVTPyS+vQUbHBeJrBKDF77+rtSTAfBgNVHSMEGDAWgBRTVTPyS+vQ +UbHBeJrBKDF77+rtSTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAN +BgkqhkiG9w0BAQsFAAOCAgEAPx/IaK94n02wPxpnYTy+LVLIxwdq/kawNd6IbiMz +L87zmNMDmHcGbfoRCj8OkhuggX9Lx1/CkhpXimuYsZOFQi5blr/u+v4mIbsgbmi9 +7j+cUHDP0zLycvSvxKHty51LwmaX9a4wkJl5zBU4O1sd/H9tWcEmwJ39ltKoBKBx +c94Zc3iMm5ytRWGj+0rKzLDAXEWpoZ5bE5PLJauA6UDCxDLfs3FwhbS7uDggxYvf +jySF5FCNET94oJ+m8s7VeHvoa8iPGKvXrIqdd7XDHnqJJlVKr7m9S0fMbyEB8ci2 +RtOXDt93ifY1uhoEtEykn4dqBSp8ezvNMnwoXdYPDvTd9uCAFeWFLVreBAWxd25h +PsBTkZA5hpa/rA+mKv6Af4VBViYr8cz4dZCsFChuioVebe9ighrfjB//qKepFjPF +CyjzKN1u0JKm/2x/ORqxkTONG8p3uDwoIOyimUcTtTMv42bfYD88RKakqSFXE9G+ +Z0LlaKABqfjK49o/tsAp+c5LoNlYllKhnetO3QAdraHwdmC36BhoghzR1jpX751A +cZn2VH3Q4XKyp01cJNCJIrua+A+bx6zh3RyW6zIIkbRCbET+UD+4mr8WIcSE3mtR +ZVlnhUDO4z9//WKMVzwS9Rh8/kuszrGFI1KQozXCHLrce3YP6RYZfOed79LXaRwX +dYY= +-----END CERTIFICATE----- diff --git a/scripts/optf-has/has/has-properties/cert.cer b/scripts/optf-has/has/has-properties/cert.cer deleted file mode 100644 index 67bb1303..00000000 --- a/scripts/optf-has/has/has-properties/cert.cer +++ /dev/null @@ -1,36 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIGFjCCBP6gAwIBAgIQaTKJblnN1egdvyJmqxK6TDANBgkqhkiG9w0BAQsFADB+ -MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd -BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj -IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE3MDgzMTAwMDAwMFoX -DTE4MDgzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMREwDwYDVQQIDAhNaWNoaWdh -bjETMBEGA1UEBwwKU291dGhmaWVsZDEcMBoGA1UECgwTQVQmVCBTZXJ2aWNlcywg -SW5jLjESMBAGA1UECwwJQ29uZHVjdG9yMSYwJAYDVQQDDB1lY29tcC1wZXctOTct -MDE3LnBlZGMuc2JjLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -ANiCKEitPcCKcmTTmvuwItG34wVOhhWuha1GQ9KeW/JmKgDWYM/7BwKmT6FhrSWe -998UKHKC+MriZKI6WsBoENu070zTyyphQ0SwTw7QZbeCpgrvSBv6+q9qWpkGZEQN -OgZ4IOVQX1asqh+qmUuVKWIAN1AF60iMb+Krqr04FX/N+3N9wLFfOJIS80Ycrxwa -2Kjqza9awVXOtuTHPa4hFqz7ggRoi7Ybdr8GyxNoXTP0QNCBsYYmjuTFnbfCnC/j -d/1zMn3D6G4eihnTnUB9jhM+Jj85IXcgAG5um/jEjN7qxmi+kURFl6AbadmgTCca -aIW1rOHZtR4vlA/sRWqSh28CAwEAAaOCAnwwggJ4MCgGA1UdEQQhMB+CHWVjb21w -LXBldy05Ny0wMTcucGVkYy5zYmMuY29tMAkGA1UdEwQCMAAwDgYDVR0PAQH/BAQD -AgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBhBgNVHSAEWjBYMFYG -BmeBDAECAjBMMCMGCCsGAQUFBwIBFhdodHRwczovL2Quc3ltY2IuY29tL2NwczAl -BggrBgEFBQcCAjAZDBdodHRwczovL2Quc3ltY2IuY29tL3JwYTAfBgNVHSMEGDAW -gBRfYM9hkFXfhEMUimAqsvV69EMY7zArBgNVHR8EJDAiMCCgHqAchhpodHRwOi8v -c3Muc3ltY2IuY29tL3NzLmNybDBXBggrBgEFBQcBAQRLMEkwHwYIKwYBBQUHMAGG -E2h0dHA6Ly9zcy5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9zcy5zeW1j -Yi5jb20vc3MuY3J0MIIBBgYKKwYBBAHWeQIEAgSB9wSB9ADyAHcA3esdK3oNT6Yg -i4GtgWhwfi6OnQHVXIiNPRHEzbbsvswAAAFeOADGyAAABAMASDBGAiEAzYxTfoKt -RnxlePKnJ0sCqLOvdd223T7CjqNsqbgmxfECIQC6FOBOe9J+a1poasZ7QfCVl9g2 -McAdcKofxp21Qw1DhwB3AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQ -AAABXjgAxuAAAAQDAEgwRgIhAIUbjCQBxcxAXBT3MS77jIR3Lw90Y622+JGAuhH7 -PASuAiEAzblNSNu2GDHu/KINsiX4apBzXgSw5J8BM9LCAYPmUogwDQYJKoZIhvcN -AQELBQADggEBAIwOqd+U0iRFSt68vWh1ErMeY0I7Re/81cm17cAn1cQuhTNKFUwq -lYnVXZHFBkGhVAU0vXAI59XN29TQ3sjBlmfDdtxAJ3PzITBxeHswJjnqCaslEGik -sbdK4/cwCjWmAN0azKtUmKhH3ajnjyduWdlvCx5hsUdFmYGZ1yl+1QbTrwkkU9JB -bYjHNbtca0Orq8JlfZlc6L9vO6LNU6+qa9NTkLs2qd3rsCOXUiAWhGBdARB+a0AT -1ukrZDS2BZ6fUDmG2XxUsRPqUwuVNAb8NgOc0zLNaAe8CpU6fVzek1fZnL0KkJmK -jJnnuCr6AOteod19VIChd54mo0QtFm+i/Ww= ------END CERTIFICATE----- - diff --git a/scripts/optf-has/has/has-properties/cert.key b/scripts/optf-has/has/has-properties/cert.key deleted file mode 100644 index b8a957ff..00000000 --- a/scripts/optf-has/has/has-properties/cert.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA2IIoSK09wIpyZNOa+7Ai0bfjBU6GFa6FrUZD0p5b8mYqANZg -z/sHAqZPoWGtJZ733xQocoL4yuJkojpawGgQ27TvTNPLKmFDRLBPDtBlt4KmCu9I -G/r6r2pamQZkRA06Bngg5VBfVqyqH6qZS5UpYgA3UAXrSIxv4quqvTgVf837c33A -sV84khLzRhyvHBrYqOrNr1rBVc625Mc9riEWrPuCBGiLtht2vwbLE2hdM/RA0IGx -hiaO5MWdt8KcL+N3/XMyfcPobh6KGdOdQH2OEz4mPzkhdyAAbm6b+MSM3urGaL6R -REWXoBtp2aBMJxpohbWs4dm1Hi+UD+xFapKHbwIDAQABAoIBAQCQVn1arjwL34CR -3UxmXK9p1si/YfEcBURTFxPiFva/bAK2mjTikrzCtHND6GVRPmCLVNn+NXh9cV6b -lIGp4fbTMhWSx2ObdkotQckC3EXjiHL/uTP+i1ySkzmg6NTxVUwIwg9UMTfOBcBI -6ifWbrOvBOvbKocHz7BLkhx6lygmEccyiy3wD/a/NBTRFTBLFyGrNBh2/a9ZXRqs -Gz1IxVSdxrNJZUoi1nKbBTOX5lKyjL0AyAkIEzC4MvgEBcGz5xZHFRF1cj4x0ajc -xEDsRUv0hi3Vczw5/FfKVWUVQPmY7sqpLtvu9qnb9MeZFwtrVZBxG5Ik4LP0Sjxt -0B1+EHYpAoGBAPeOpR1co9pJa8tgkObZWehrVd+VEMD9UM5SKfYYn/2FyVMl1/TH -Z6SqB7e1aNYsT5oUDt5y3g+tG3i/r4zmE4OzwT/9neb/rVBsKdd5cPICVnhHajYu -bdOKoCNEMBrQRBSBAeSK0IjbUYIMyre1bwhxU7HT5NzGJnLYBn4vx0BNAoGBAN/k -bxLQpsYcMwAX4K0H42qI1yL4jlezv4zj+kDRAI9Szh94c2yxGBC4rAub3Igz1OlQ -CfqPimvlnkWrhgz50+0CdJFPEQyC0+d2rzS7i816k8WYUYCDkrTJhr64eFnV1jjs -AuLpnhF0WpqvrixBzf5ZENPV3C8k4HG4KrYjDuSrAoGBALeDELdRY01/u97JuODI -IrP+TWwujnrhzbMEiYKbAo7nTDTNCuezogsY2BvA6PRLaL7pO5R/RkoMox7ByhsC -u1iYOht7oEALLKk/ZU0MA0QDo6IKHpwHkvaL/uXluFtIJA+nCoYmuSuamTN01BmW -77YsfESItVFLuljL9xQ3ytbJAoGAVqkd0SOQGgiaOQQFBBSUkwzqcO/ScOHzV756 -hBIh7Ff5zraZvs2Bah+BAHFQ2Ctv0usXIbPjuUXEkGUG2wjsXcXghsoa6EPPb71B -reCWCW/TuNzvVxYWeAG1NSdD9knNxHSd3WTduRXXaB5uBVVnPXcOC2Cw/FKCyaGm -bp99SUcCgYEAxzGq0cxFedF7TAQLjIMagsGIAatokzDvvQOvOK0lWZ+f17G+LV9Y -tLpnvS6IdGnki6Kvg9Xa0F4eP7YoY4laHxl2DEceP/TeMLNHetM9cXCPKwP7w/24 -5mZlQ0t/HdVnjc1uDvkeHR6HVxnXTyWtKBJ0FtC6SfdRgK20YYFrKAQ= ------END RSA PRIVATE KEY----- - diff --git a/scripts/optf-has/has/has-properties/cert.pem b/scripts/optf-has/has/has-properties/cert.pem deleted file mode 100644 index 5ecf3823..00000000 --- a/scripts/optf-has/has/has-properties/cert.pem +++ /dev/null @@ -1,36 +0,0 @@ -Bag Attributes - friendlyName: mso-client - localKeyID: 54 69 6D 65 20 31 35 31 39 32 39 37 30 37 31 32 33 33 -subject=/C=US/ST=Michigan/L=Southfield/O=AT&T Services, Inc./OU=mso-bpel-client-mtanj/CN=msobpel-client.mtanj.aic.cip.att.com -issuer=/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA ------BEGIN CERTIFICATE----- -MIIFZDCCBEygAwIBAgIQCDZ0gBbsclD2Ino3w+NqPDANBgkqhkiG9w0BAQsFADBN -MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E -aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTgwMTE5MDAwMDAwWhcN -MTkwMTE5MTIwMDAwWjCBojELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE1pY2hpZ2Fu -MRMwEQYDVQQHEwpTb3V0aGZpZWxkMRwwGgYDVQQKDBNBVCZUIFNlcnZpY2VzLCBJ -bmMuMR4wHAYDVQQLExVtc28tYnBlbC1jbGllbnQtbXRhbmoxLTArBgNVBAMTJG1z -b2JwZWwtY2xpZW50Lm10YW5qLmFpYy5jaXAuYXR0LmNvbTCCASIwDQYJKoZIhvcN -AQEBBQADggEPADCCAQoCggEBAOJtbcWtMUYCIgIvdqm2CPN/cVTD8j3fDAsd42vn -7I3PYJ4aBu8tiJVRheJhj9mejfwjBd5f5E2z9kWfNMPZU/9q0RB+cYbKWv0lP+q5 -q/RkbXN7iRtGUkXUyNpekvxNT3IKYfXK3P29qVDVhvUSey2ngIALRvBrRIKRTmb8 -gzrvcavJSwm8oQw2JXE1+Da+8PYR3TjJ19nfmoTmKbO+QDD58I5+2TgNqd/b7zhN -GLaS3oiVONDmJ1b5iWwKg31otPDP8AJb7cNtl8vgfnGK2zvFIWnF2TRzMb6FePbn -JBLaEyi7+c1iKJafj61t5nn27I2psbJloT9/2fmb6l4NU8MCAwEAAaOCAegwggHk -MB8GA1UdIwQYMBaAFA+AYRyCMWHVLyjnjUY4tCzhxtniMB0GA1UdDgQWBBSQcljn -BCxIKpisBfyoNgGCdtPzBzAvBgNVHREEKDAmgiRtc29icGVsLWNsaWVudC5tdGFu -ai5haWMuY2lwLmF0dC5jb20wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG -AQUFBwMBBggrBgEFBQcDAjBrBgNVHR8EZDBiMC+gLaArhilodHRwOi8vY3JsMy5k -aWdpY2VydC5jb20vc3NjYS1zaGEyLWc2LmNybDAvoC2gK4YpaHR0cDovL2NybDQu -ZGlnaWNlcnQuY29tL3NzY2Etc2hhMi1nNi5jcmwwTAYDVR0gBEUwQzA3BglghkgB -hv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQ -UzAIBgZngQwBAgIwfAYIKwYBBQUHAQEEcDBuMCQGCCsGAQUFBzABhhhodHRwOi8v -b2NzcC5kaWdpY2VydC5jb20wRgYIKwYBBQUHMAKGOmh0dHA6Ly9jYWNlcnRzLmRp -Z2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJTZWN1cmVTZXJ2ZXJDQS5jcnQwCQYDVR0T -BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAxkadmzFcpA3f3qc9PbzMWfV2lJCXWxfr -/6z4RXotl255GBZFR2zLn56k8J3hAJGWRc0WeSgSsLH1fxrxF60fWk+cmYCrMC9t -C5ha5zWav/kz+dkZvJVbUxIFdx0Cd5uqBsLFnAaGrnSR6WzJkZHQ2rQUvwvQXwdP -XL01FleDSNbV8jtHXvzmcdnVQWeLjcVOeOeBF3dW6lSvDRV0G6fe6+R9U+Gz0MwK -x93XbsIAMTCJKUBkV7QdHwHzis3fhKJHwJUrb1p2Byhn/RwYUmFbjkamFiEfAyzw -+KdkwripOgYHnmGyLBJ16FdO/8kGhn4URW/qL1FO/sN2loGGlyA82w== ------END CERTIFICATE----- diff --git a/scripts/optf-has/has/has-properties/conductor.conf.onap b/scripts/optf-has/has/has-properties/conductor.conf.onap index 2c5b8d6c..c000248c 100644 --- a/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -1,4 +1,3 @@ - [DEFAULT] # @@ -9,7 +8,14 @@ #api_paste_config = api_paste.ini # Music keyspace for content (string value) -keyspace = conductor +#keyspace = conductor + +# Delay time (Seconds) for MUSIC requests. Set it to 2 seconds by default. +# (integer value) +#delay_time = 2 + +# (boolean value) +#HPA_enabled = true # # From oslo.log @@ -20,12 +26,6 @@ keyspace = conductor # Note: This option can be changed without restarting. debug = true -# DEPRECATED: If set to false, the logging level will be set to WARNING instead -# of the default INFO level. (boolean value) -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -#verbose = true - # The name of a logging configuration file. This file is appended to any # existing logging configuration files. For details about logging configuration # files, see the Python logging module documentation. Note that when logging @@ -39,7 +39,7 @@ log_config_append = /usr/local/bin/log.conf # Defines the format string for %%(asctime)s in log records. Default: # %(default)s . This option is ignored if log_config_append is set. (string # value) -log_date_format = %d-%m-%Y %H:%M:%S +#log_date_format = %Y-%m-%d %H:%M:%S # (Optional) Name of log file to send logging output to. If no default is set, # logging will go to stderr as defined by use_stderr. This option is ignored if @@ -47,15 +47,11 @@ log_date_format = %d-%m-%Y %H:%M:%S # Deprecated group/name - [DEFAULT]/logfile #log_file = application.log - # (Optional) The base directory used for relative log_file paths. This option # is ignored if log_config_append is set. (string value) # Deprecated group/name - [DEFAULT]/logdir log_dir = /var/log - - - # Uses logging handler designed to watch file system. When log file is moved or # removed this handler will open a new log file with specified path # instantaneously. It makes sense only if log_file option is specified and @@ -68,10 +64,20 @@ log_dir = /var/log # is set. (boolean value) #use_syslog = false +# Enable journald for logging. If running in a systemd environment you may wish +# to enable journal support. Doing so will use the journal native protocol +# which includes structured metadata in addition to log messages.This option is +# ignored if log_config_append is set. (boolean value) +#use_journal = false + # Syslog facility to receive log lines. This option is ignored if # log_config_append is set. (string value) #syslog_log_facility = LOG_USER +# Use JSON formatting for logging. This option is ignored if log_config_append +# is set. (boolean value) +#use_json = false + # Log output to standard error. This option is ignored if log_config_append is # set. (boolean value) #use_stderr = false @@ -96,7 +102,7 @@ log_dir = /var/log # List of package logging levels in logger=LEVEL pairs. This option is ignored # if log_config_append is set. (list value) -#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO +#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,oslo_messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN,keystoneauth=WARN,oslo.cache=INFO,dogpile.core.dogpile=INFO # Enables or disables publication of error events. (boolean value) #publish_errors = false @@ -125,6 +131,53 @@ log_dir = /var/log #fatal_deprecations = false +[aaf_authentication] + +# +# From conductor +# + +# is_aaf_enabled. (boolean value) +#is_aaf_enabled = true + +# aaf_cache_expiry_hrs. (integer value) +#aaf_cache_expiry_hrs = 3 + +# aaf_url. (string value) +aaf_url = http://localhost:8100/authz/perms/user/ + +# aaf_retries. (integer value) +#aaf_retries = 3 + +# aaf_timeout. (integer value) +#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_sms] + +# +# From conductor +# + +# Base URL for SMS, up to and not including the version, and without a trailing +# slash. (string value) +#aaf_sms_url = https://aaf-sms.onap:10443 + +# Timeout for SMS API Call (integer value) +#aaf_sms_timeout = 30 + +# Path to the cacert that will be used to verify If this is None, verify will +# be False and the server certis not verified by the client. (string value) +#aaf_ca_certs = AAF_RootCA.cer + +# Domain UUID - A unique UUID generated when the domainfor HAS is created by +# administrator during deployment (string value) +#secret_domain = has + + [aai] # @@ -132,29 +185,51 @@ log_dir = /var/log # # Interval with which to refresh the local cache, in minutes. (integer value) +#cache_refresh_interval = 1440 cache_refresh_interval = 1 + +# Interval with which to refresh the local complex cache, in minutes. (integer +# value) +#complex_cache_refresh_interval = 1440 complex_cache_refresh_interval = 60 # Data Store table prefix. (string value) #table_prefix = aai -# Base URL for A&AI, up to and including the version. (string value) +# Base URL for A&AI, up to and not including the version, and without a +# trailing slash. (string value) +#server_url = https://controller:8443/aai server_url = http://localhost:8081/aai/ +# Timeout for A&AI Rest Call (string value) +#aai_rest_timeout = 30 -# The version of A&AI (string value) -server_url_version = v13 +# Number of retry for A&AI Rest Call (string value) +#aai_retries = 3 + +# The version of A&AI in v# format. (string value) +server_url_version = v14 # SSL/TLS certificate file in pem format. This certificate must be registered # with the A&AI endpoint. (string value) -certificate_file = /usr/local/bin/cert.cer +#certificate_file = certificate.pem +certificate_file = # Private Certificate Key file in pem format. (string value) -certificate_key_file = /usr/local/bin/cert.key +#certificate_key_file = certificate_key.pem +certificate_key_file = # Certificate Authority Bundle file in pem format. Must contain the appropriate -# trust chain for theCertificate file. (string value) -certificate_authority_bundle_file = /usr/local/bin/cert.pem +# trust chain for the Certificate file. (string value) +#certificate_authority_bundle_file = certificate_authority_bundle.pem +certificate_authority_bundle_file = /usr/local/bin/AAF_RootCA.cer + +# Username for AAI. (string value) +username = OOF + +# Password for AAI. (string value) +password = OOF + [api] @@ -169,19 +244,28 @@ certificate_authority_bundle_file = /usr/local/bin/cert.pem # Minimum value: 1 #default_api_return_limit = 100 + [conductor_api] -# Basic Authentication Username (string value) +# +# From conductor +# + +# Base URL for plans. (string value) +#server_url = + +# username for plans. (string value) +#username = username = admin1 -# Basic Authentication Password (string value) +# password for plans. (string value) +#password = password = plan.15 -# To disable basic_auth_secure = false and to enable basic_auth_secure = true +# auth toggling. (boolean value) basic_auth_secure = false - [controller] # @@ -200,6 +284,47 @@ basic_auth_secure = false # Minimum value: 1 #workers = 1 +# Set to True when controller will run in active-active mode. When set to +# False, controller will flush any abandoned messages at startup. The +# controller always restarts abandoned template translations at startup. +# (boolean value) +#concurrent = false +concurrent = true + +# Time between checking for new plans. Default value is 1. (integer value) +# Minimum value: 1 +#polling_interval = 1 + +# (integer value) +# Minimum value: 1 +#max_translation_counter = 1 + + +[data] + +# +# From conductor +# + +# Number of workers for data service. Default value is 1. (integer value) +# Minimum value: 1 +#workers = 1 + +# Set to True when data will run in active-active mode. When set to False, data +# will flush any abandoned messages at startup. (boolean value) +#concurrent = false +concurrent = true + +# Default value is -8000, which is the diameter of the earth. The distance +# cannot larger than this value (floating point value) +#existing_placement_cost = -8000.0 + +# (floating point value) +#cloud_candidate_cost = 2.0 + +# (floating point value) +#service_candidate_cost = 1.0 + [inventory_provider] @@ -208,7 +333,7 @@ basic_auth_secure = false # # Extensions list to use (list value) -# extensions = aai +#extensions = aai [messaging_server] @@ -218,17 +343,22 @@ basic_auth_secure = false # # Music keyspace for messages (string value) -keyspace = conductor_rpc +#keyspace = conductor_rpc # Wait interval while checking for a message response. Default value is 1 # second. (integer value) # Minimum value: 1 #check_interval = 1 -# Overall message response timeout. Default value is 10 seconds. (integer +# Overall message response timeout. Default value is 120 seconds. (integer # value) # Minimum value: 1 -timeout = 3600 +#response_timeout = 120 + +# Timeout for detecting a VM is down, and other VMs can pick the plan up. +# Default value is 5 minutes. (integer value) (integer value) +# Minimum value: 1 +#timeout = 300 # Number of workers for messaging service. Default value is 1. (integer value) # Minimum value: 1 @@ -242,25 +372,40 @@ timeout = 3600 #debug = false +[multicloud] + +# +# From conductor +# + +# Base URL for Multicloud without a trailing slash. (string value) +server_url = http://msb.onap.org:8082/api/multicloud + +# Timeout for Multicloud Rest Call (string value) +#multicloud_rest_timeout = 30 + +# Number of retry for Multicloud Rest Call (string value) +#multicloud_retries = 3 + +# The version of Multicloud API. (string value) +#server_url_version = v0 + + [music_api] # # From conductor # -music_new_version = True # Base URL for Music REST API without a trailing slash. (string value) server_url = http://localhost:8080/MUSIC/rest/v2 version = v2 -music_version = "2.5.3" -aafuser = conductor -aafpass = c0nduct0r -aafns = conductor # DEPRECATED: List of hostnames (round-robin access) (list value) # This option is deprecated for removal. # Its value may be silently ignored in the future. # Reason: Use server_url instead +#hostnames = <None> # DEPRECATED: Port (integer value) # This option is deprecated for removal. @@ -274,13 +419,74 @@ aafns = conductor # Reason: Use server_url instead #path = <None> +# Socket connection timeout (floating point value) +#connect_timeout = 3.05 + +# Socket read timeout (floating point value) +#read_timeout = 12.05 + # Lock timeout (integer value) #lock_timeout = 10 # Replication factor (integer value) #replication_factor = 1 -# debug = false +# Use mock API (boolean value) +#mock = false + +# (string value) +#music_topology = SimpleStrategy + +# Name of the first data center (string value) +#first_datacenter_name = <None> + +# Number of replicas in first data center (integer value) +#first_datacenter_replicas = <None> + +# Name of the second data center (string value) +#second_datacenter_name = <None> + +# Number of replicas in second data center (integer value) +#second_datacenter_replicas = <None> + +# Name of the third data center (string value) +#third_datacenter_name = <None> + +# Number of replicas in third data center (integer value) +#third_datacenter_replicas = <None> + +# new or old version (boolean value) +#music_new_version = <None> +music_new_version = True + +# for version (string value) +#music_version = <None> +music_version = "3.0.21" + +# username value that used for creating basic authorization header (string +# value) +#aafuser = <None> +aafuser = conductor + +# password value that used for creating basic authorization header (string +# value) +#aafpass = <None> +aafpass = c0nduct0r + +# AAF namespace field used in MUSIC request header (string value) +#aafns = <None> +aafns = conductor + + +[prometheus] + +# +# From conductor +# + +# Prometheus Metrics Endpoint (list value) +#metrics_port = 8000,8001,8002,8003,8004 + [reservation] @@ -294,12 +500,23 @@ aafns = conductor #workers = 1 # Number of times reservation/release should be attempted. (integer value) -#reserve_retries = 3 +#reserve_retries = 1 + +# Timeout for detecting a VM is down, and other VMs can pick the plan up and +# resereve. Default value is 600 seconds. (integer value) (integer value) +# Minimum value: 1 +#timeout = 600 # Set to True when reservation will run in active-active mode. When set to # False, reservation will restart any orphaned reserving requests at startup. # (boolean value) #concurrent = false +concurrent = true + +# (integer value) +# Minimum value: 1 +#max_reservation_counter = 1 + [sdnc] @@ -313,14 +530,23 @@ aafns = conductor # Data Store table prefix. (string value) #table_prefix = sdnc -# Base URL for SDN-C. (string value) +# Base URL for SDN-C, up to and including the version. (string value) +#server_url = https://controller:8443/restconf/ server_url = http://localhost:8083/restconf/ # Basic Authentication Username (string value) +#username = <None> username = admin # Basic Authentication Password (string value) -password = admin +#password = <None> +password = Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +# Timeout for SDNC Rest Call (string value) +#sdnc_rest_timeout = 30 + +# Retry Numbers for SDNC Rest Call (string value) +#sdnc_retries = 3 [service_controller] @@ -330,7 +556,8 @@ password = admin # # Extensions list to use (list value) -extensions = sdnc +#extensions = sdnc + [solver] @@ -342,29 +569,25 @@ extensions = sdnc # Minimum value: 1 #workers = 1 +# The timeout value for solver service. Default value is 480 seconds. (integer +# value) +# Minimum value: 1 +#solver_timeout = 480 + # Set to True when solver will run in active-active mode. When set to False, # solver will restart any orphaned solving requests at startup. (boolean value) #concurrent = false +concurrent = true +# Timeout for detecting a VM is down, and other VMs can pick the plan up. This +# value should be larger than solver_timeoutDefault value is 10 minutes. +# (integer value) (integer value) +# Minimum value: 1 +#timeout = 600 -[multicloud] - -# -# From conductor -# - -# Base URL for Multicloud without a trailing slash. (string value) -server_url = http://msb.onap.org:8082/api/multicloud - -# Timeout for Multicloud Rest Call (string value) -multicloud_rest_timeout = 30 - -# Number of retry for Multicloud Rest Call (string value) -multicloud_retries = 3 - -# The version of Multicloud API. (string value) -server_url_version = v0 - +# (integer value) +# Minimum value: 1 +#max_solver_counter = 1 [vim_controller] @@ -374,5 +597,4 @@ server_url_version = v0 # # Extensions list to use (list value) -extensions = multicloud - +#extensions = multicloud diff --git a/scripts/optf-has/has/has_script.sh b/scripts/optf-has/has/has_script.sh index 24ecc063..1364c87b 100755 --- a/scripts/optf-has/has/has_script.sh +++ b/scripts/optf-has/has/has_script.sh @@ -31,18 +31,14 @@ 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.1-SNAPSHOT-latest -CERT=/tmp/conductor/properties/cert.cer -KEY=/tmp/conductor/properties/cert.key -BUNDLE=/tmp/conductor/properties/cert.pem +IMAGE_VER=1.2.2-SNAPSHOT-latest +BUNDLE=/tmp/conductor/properties/AAF_RootCA.cer mkdir -p /tmp/conductor/properties mkdir -p /tmp/conductor/logs cp ${WORKSPACE}/scripts/optf-has/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf cp ${WORKSPACE}/scripts/optf-has/has/has-properties/log.conf.onap /tmp/conductor/properties/log.conf -cp ${WORKSPACE}/scripts/optf-has/has/has-properties/cert.cer /tmp/conductor/properties/cert.cer -cp ${WORKSPACE}/scripts/optf-has/has/has-properties/cert.key /tmp/conductor/properties/cert.key -cp ${WORKSPACE}/scripts/optf-has/has/has-properties/cert.pem /tmp/conductor/properties/cert.pem +cp ${WORKSPACE}/scripts/optf-has/has/has-properties/AAF_RootCA.cer /tmp/conductor/properties/AAF_RootCA.cer #chmod -R 777 /tmp/conductor/properties MUSIC_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` @@ -63,23 +59,29 @@ echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}" # change MULTICLOUD reference to the local instance sed -i -e "s%msb.onap.org:8082/%${MULTICLOUDSIM_IP}:8082/%g" /tmp/conductor/properties/conductor.conf +AAFSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' aafsim` +echo "AAFSIM_IP=${AAFSIM_IP}" + +# change AAF reference to the local instance +sed -i -e "s%localhost:8100/%${AAFSIM_IP}:8100/%g" /tmp/conductor/properties/conductor.conf + #onboard conductor into music echo "Query MUSIC to check for reachability. Query Version" curl -vvvvv --noproxy "*" --request GET http://${MUSIC_IP}:8080/MUSIC/rest/v2/version -H "Content-Type: application/json" - + echo "Onboard conductor into music" -curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/tests/optf-has/has/data/onboard.json +curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" -H "Authorization: Basic Y29uZHVjdG9yOmMwbmR1Y3Qwcg==" --data @${WORKSPACE}/tests/optf-has/has/data/onboard.json docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf -sleep 20 +sleep 15 docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf -sleep 20 +sleep 15 docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf -sleep 20 +sleep 15 docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf -sleep 20 -docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf -sleep 20 +sleep 5 +docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${BUNDLE}:/usr/local/bin/AAF_RootCA.cer ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf +sleep 15 COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api` ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091 diff --git a/scripts/optf-has/has/music_script.sh b/scripts/optf-has/has/music_script.sh index 811a39c2..2a4f178d 100755 --- a/scripts/optf-has/has/music_script.sh +++ b/scripts/optf-has/has/music_script.sh @@ -22,67 +22,120 @@ echo "### This is ${WORKSPACE}/scripts/optf-has/has/music_script.sh" # # add here all the configuration steps eventually needed to be carried out for music CSIT testing # -echo "# music configuration step"; - -CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest -TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 +echo "########## music configuration step ##########"; +CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_3_11:latest +CASS_IMG_JOB=nexus3.onap.org:10001/onap/music/cassandra_job:latest +TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.5 ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 -MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:2.5.3 +BUSYBOX_IMG=nexus3.onap.org:10001/library/busybox:latest +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +TT=10 WORK_DIR=/tmp/music CASS_USERNAME=nelson24 CASS_PASSWORD=winman123 MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/scripts/optf-has/has/music-properties MUSIC_PROPERTIES=/tmp/music/properties MUSIC_LOGS=/tmp/music/logs +CQL_FILES=${WORKSPACE}/scripts/music/cql +MUSIC_TRIGGER_DIR=/tmp/triggers +TRIGGER_JAR=musictrigger-0.1.0.jar +TRIGGER_JAR_URL=https://nexus.onap.org/service/local/repositories/autorelease-72298/content/org/onap/music/musictrigger/0.1.0/musictrigger-0.1.0.jar + mkdir -p ${MUSIC_PROPERTIES} mkdir -p ${MUSIC_LOGS} +mkdir -p ${MUSIC_LOGS}/MUSIC +mkdir -p /tmp/triggers + +# Get Trigger +echo "########## Get Trigger Jar ##########" +curl -o $MUSIC_TRIGGER_DIR/$TRIGGER_JAR $TRIGGER_JAR_URL cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties # Create Volume for mapping war file and tomcat +echo "########## create music-vol ##########" docker volume create --name music-vol; # Create a network for all the containers to run in. +echo "########## create music-net ##########" docker network create music-net; # Start Cassandra -docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; -#CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` +echo "########## Start Cassandra (music-db) ##########" +docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" \ +-v $MUSIC_TRIGGER_DIR/$TRIGGER_JAR:/etc/cassandra/triggers/$TRIGGER_JAR \ +${CASS_IMG}; + 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 -sleep 150 + +# 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;" + +# Check to see if Keyspaces are there. +docker exec music-db cqlsh -u cassandra -p cassandra -e "DESCRIBE keyspaces;" + +sleep 10; + +# Load data into Cassandra via Cassandra Job +echo "########## Running Cassandra Job (music-job) to load cql files ##########" +docker run -d --name music-job --network music-net \ +-v $CQL_FILES/admin.cql:/cql/admin.cql \ +-v $CQL_FILES/admin_pw.cql:/cql/admin_pw.cql \ +-v $CQL_FILES/extra:/cql/extra \ +-e PORT=9042 \ +-e CASS_HOSTNAME=music-db \ +-e USERNAME=$CASS_USERNAME \ +-e PASSWORD=$CASS_PASSWORD \ +$CASS_IMG_JOB +# Logs +echo "########## Cassandra Job logs ##########" +docker logs music-job + # Start Music war +echo "########## Start music-war ##########" docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; -sleep 30 + # Start Zookeeper +echo "########## Start zookeeper (music-zk) ##########" docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; -#ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` + ZOO_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-zk` echo "ZOOKEEPER_IP=${ZOO_IP}" # Delay between Cassandra/Zookeeper and Tomcat -sleep 120 +sleep 10; # Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. +echo "########## Start Tomcat (music-tomcat) ##########" docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; # Connect tomcat to host bridge network so that its port can be seen. +echo "########## Create Bridge for Tomcat ##########" docker network connect bridge music-tomcat; -# -# add here below the start of all docker containers needed for music CSIT testing -# - TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "TOMCAT_IP=${TOMCAT_IP}" ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${TOMCAT_IP} 8080 -# wait a while to make sure music is totally up and configured -sleep 90 +sleep 20; +echo "########## TOMCAT Logs ##########" +docker logs music-tomcat +# Needed only if we need to look at localhost logs. +echo "########## MUSIC localhost Log ##########" +docker exec music-tomcat /bin/bash -c "cat /usr/local/tomcat/logs/localhost*" + +echo "########## MUSIC Log ##########" +ls -al $MUSIC_LOGS/MUSIC +docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/music.log" +#echo "########## MUSIC error log ##########" +#docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/error.log" -echo "inspect docker things for tracing purpose" +echo "########## inspect docker things for tracing purpose ##########" docker inspect music-db docker inspect music-zk docker inspect music-tomcat @@ -90,11 +143,20 @@ docker inspect music-war docker volume inspect music-vol docker network inspect music-net -echo "dump music content just after music is started" +echo "########## dump music content just after music is started ##########" docker exec music-db /usr/bin/nodetool status docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces' +docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'DESCRIBE keyspace admin' docker exec music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master' +# +# add here all ROBOT_VARIABLES settings +# +echo "########## music robot variables settings ##########"; +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://${TOMCAT_IP} -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" + +echo ${ROBOT_VARIABLES} + diff --git a/scripts/optf-has/has/music_teardown_script.sh b/scripts/optf-has/has/music_teardown_script.sh index 605ebd4e..e05ef9d1 100755 --- a/scripts/optf-has/has/music_teardown_script.sh +++ b/scripts/optf-has/has/music_teardown_script.sh @@ -14,15 +14,40 @@ # See the License for the specific language governing permissions and # limitations under the License. # -echo "music scripts docker containers killing"; + + +# +# add here below the killing of all docker containers used for music CSIT testing +# +echo "dump music.log files" +ls -alF /tmp/music +ls -alFR /tmp/music +ls -alF /tmp/music/properties +cat /tmp/music/properties/music.properties +echo "===== MUSIC log ==================" +docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/music.log" +#cat /tmp/music/logs/MUSIC/music.log +echo "===== MUSIC error log ==================" +docker exec music-tomcat /bin/bash -c "cat /opt/app/music/logs/MUSIC/error.log" +#cat /tmp/music/logs/MUSIC/error.log + +echo "##########################################################"; +echo "#"; +echo "# music scripts docker containers killing"; +echo "#"; +echo "##########################################################"; 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; @@ -30,10 +55,9 @@ sleep 5; docker volume rm music-vol -echo "dump music.log files" -ls -alF /tmp/music -ls -alF /tmp/music/properties -cat /tmp/music/properties/music.properties -#cat /tmp/music/logs/MUSIC/music.log -cat /tmp/music/logs/MUSIC/error.log +#rm -Rf /tmp/music + + + + diff --git a/scripts/optf-has/has/simulator_script.sh b/scripts/optf-has/has/simulator_script.sh index 42dcd57f..ccb479b2 100755 --- a/scripts/optf-has/has/simulator_script.sh +++ b/scripts/optf-has/has/simulator_script.sh @@ -53,7 +53,7 @@ cat ./Dockerfile docker build -t aaisim . # run aaisim -docker run -d --name aaisim -p 8081:8081 aaisim +docker run -d --name aaisim -p 8081:8081 aaisim AAISIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' aaisim` echo "AAISIM_IP=${AAISIM_IP}" @@ -77,9 +77,32 @@ echo "MULTICLOUDSIM_IP=${MULTICLOUDSIM_IP}" ${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${MULTICLOUDSIM_IP} 8082 +# prepare aafsim +echo "simulator_script: prepare aafsim " +cd ${WORK_DIR}/has/conductor/conductor/tests/functional/simulators/aafsim/ + +# check Dockerfile content +echo "simulator_script: Dockerfile " +cat ./Dockerfile + +# build aafsim +echo "simulator_script: build docker " +docker build -t aafsim . + +# run aafsim +echo "simulator_script: run docker " +docker run -d --name aafsim -p 8100:8100 aafsim + +AAFSIM_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' aafsim` +echo "simulator_script: AAFSIM_IP=${AAFSIM_IP}" + +#echo "simulator_script: wait_for_port" +${WORKSPACE}/scripts/optf-has/has/wait_for_port.sh ${AAFSIM_IP} 8100 + # wait a while before continuing sleep 2 echo "inspect docker things for tracing purpose" docker inspect aaisim docker inspect multicloudsim +docker inspect aafsim diff --git a/scripts/optf-has/has/simulator_teardown_script.sh b/scripts/optf-has/has/simulator_teardown_script.sh index a2edd332..eb29445a 100755 --- a/scripts/optf-has/has/simulator_teardown_script.sh +++ b/scripts/optf-has/has/simulator_teardown_script.sh @@ -17,6 +17,8 @@ echo "optf/has scripts docker containers killing"; docker stop aaisim docker stop multicloudsim +docker stop aafsim docker rm aaisim docker rm multicloudsim +docker rm aafsim diff --git a/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml b/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml new file mode 100755 index 00000000..78399660 --- /dev/null +++ b/scripts/optf-osdf/osdf/osdf-properties/osdf_config.yaml @@ -0,0 +1,64 @@ +osdfUserNameForSO: "" # The OSDF Manager username for MSO. +odfPasswordForSO: "" # The OSDF Manager password for MSO. + +# msoUrl: "" # The SO url for call back. This will be part of the request, so no need +soUsername: "" # SO username for call back. +soPassword: "" # SO password for call back. + +conductorUrl: "http://127.0.0.1:5000/simulated/oof/has-api/flow1-success-simple/main.json" +conductorUsername: "CONDUCTOR-USER" +conductorPassword: "CONDUCTOR-PASSWD" +conductorPingWaitTime: 2 # seconds to wait before calling the conductor retry URL +conductorMaxRetries: 5 # if we don't get something in 30 minutes, give up + +# Policy Platform -- requires ClientAuth, Authorization, and Environment +policyPlatformUrl: http://127.0.0.1:5000/simulated/policy/pdp-has-vcpe-good/getConfig # Policy Dev platform URL +policyPlatformEnv: TEST # Environment for policy platform +policyPlatformUsername: POLICY-USER # Policy platform username. +policyPlatformPassword: POLICY-PASSWD # Policy platform password. +policyClientUsername: POLICY-CLIENT-USER # For use with ClientAuth +policyClientPassword: POLICY-CLIENT-PASSWD # For use with ClientAuth + +messageReaderHosts: https://DMAAP-HOST1:3905,https://DMAAP-HOST2:3905,https://DMAAP-HOST3:3905 +messageReaderTopic: org.onap.oof.osdf.multicloud +messageReaderAafUserId: DMAAP-OSDF-MC-USER +messageReaderAafPassword: DMAAP-OSDF-MC-PASSWD + +sdcUrl: https://SDC-HOST:8443/sdc/v1/catalog +sdcUsername: SDC-OSDF-USER +sdcPassword: SDC-OSDF-PASSWD +sdcONAPInstanceID: ONAP-OSDF + +osdfPlacementUrl: "http://127.0.0.1:24699/osdf/api/v2/placement" + +# Credentials for the OOF placement service - Generic +osdfPlacementUsername: test +osdfPlacementPassword: testpwd + +# Credentials for the OOF placement service - SO +osdfPlacementSOUsername: so_test +osdfPlacementSOPassword: so_testpwd + +# Credentials for the OOF placement service - VFC +osdfPlacementVFCUsername: vfc_test +osdfPlacementVFCPassword: vfc_testpwd + +# Credentials for the OOF CM scheduling service - Generic +osdfCMSchedulerUsername: test1 +osdfCMSchedulerPassword: testpwd1 + +# config db api +configDbUrl: http://127.0.0.1:5000/simulated/configdb +configDbUserName: osdf +configDbPassword: passwd +configDbGetCellListUrl: 'getCellList' +configDbGetNbrListUrl: 'getNbrList' + +# Credentials for PCIHandler +pciHMSUsername: "" # pcihandler username for call back. +pciHMSPassword: "" # pcihandler password for call back. + +#Credentials for the OOF PCI Opt Service +osdfPCIOptUsername: pci_test +osdfPCIOptPassword: pci_testpwd + diff --git a/scripts/optf-osdf/osdf/osdf_proxy_settings.sh b/scripts/optf-osdf/osdf/osdf_proxy_settings.sh new file mode 100755 index 00000000..b68fca97 --- /dev/null +++ b/scripts/optf-osdf/osdf/osdf_proxy_settings.sh @@ -0,0 +1,35 @@ +#!/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. +# +# ------------------------------------------------------------------------- +# + +# put into this file local proxy settings in case they are needed on your local environment +echo "### This is ${WORKSPACE}/scripts/optf-osdf/osdf/osdf_proxy_settings.sh" + +echo "optf/osdf proxy settings" +if [ "$#" -eq "1" ]; then + echo "$1" + cd $1 + pwd +else + exit 1 +fi + +# don't remove following lines: commands can be attached here + + diff --git a/scripts/optf-osdf/osdf/osdf_script.sh b/scripts/optf-osdf/osdf/osdf_script.sh new file mode 100755 index 00000000..435e44f5 --- /dev/null +++ b/scripts/optf-osdf/osdf/osdf_script.sh @@ -0,0 +1,57 @@ +#!/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-osdf/osdf/osdf_script.sh" +# +# add here whatever commands is needed to prepare the optf/osdf CSIT testing +# + +# assume the base is /tmp dir +DIR=/tmp + +# the directory of the script +echo ${DIR} +cd ${DIR} + +# create directory for volume and copy configuration file +# run docker containers +OSDF_CONF=/tmp/osdf/properties/osdf_config.yaml +IMAGE_NAME=nexus3.onap.org:10001/onap/optf-osdf +IMAGE_VER=1.2.2-SNAPSHOT-latest + +mkdir -p /tmp/osdf/properties + +cp ${WORKSPACE}/scripts/optf-osdf/osdf/osdf-properties/*.yaml /tmp/osdf/properties/. + +#change conductor/configdb simulator urls +OSDF_SIM_IP=`get-instance-ip.sh osdf_sim` +echo "OSDF_SIM_IP=${OSDF_SIM_IP}" + +sed -i -e "s%127.0.0.1:5000%${OSDF_SIM_IP}:5000%g" $OSDF_CONF + +docker run -d --name optf-osdf -v ${OSDF_CONF}:/opt/osdf/config/osdf_config.yaml -p "8698:8699" ${IMAGE_NAME}:${IMAGE_VER} + +sleep 20 + +OSDF_IP=`get-instance-ip.sh optf-osdf` +${WORKSPACE}/scripts/optf-osdf/osdf/wait_for_port.sh ${OSDF_IP} 8699 + +echo "inspect docker things for tracing purpose" +docker inspect optf-osdf diff --git a/scripts/optf-osdf/osdf/simulator_script.sh b/scripts/optf-osdf/osdf/simulator_script.sh new file mode 100755 index 00000000..8f3f7d36 --- /dev/null +++ b/scripts/optf-osdf/osdf/simulator_script.sh @@ -0,0 +1,74 @@ +#!/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-osdf/osdf/simulator_script.sh" +# +# add here whatever commands is needed to prepare the optf/osdf CSIT testing +# +# assume the base is /tmp dir + +DIR=/tmp + +# the directory of the script +echo ${DIR} +cd ${DIR} + +# the temp directory used, within $DIR +# omit the -p parameter to create a temporal directory in the default location +WORK_DIR=`mktemp -d -p "$DIR"` +echo ${WORK_DIR} +cd ${WORK_DIR} + +# clone optf-osdf project +git clone https://gerrit.onap.org/r/optf/osdf + +#echo "i am ${USER} : only non jenkins users may need proxy settings" +if [ ${USER} != 'jenkins' ]; then + + # add proxy settings into this script when you work behind a proxy + ${WORKSPACE}/scripts/optf-osdf/osdf/osdf_proxy_settings.sh ${WORK_DIR} + +fi + +# prepare osdf_sim +cd ${WORK_DIR}/osdf/test/functest/simulators + +# check Dockerfile content +cat ./Dockerfile + +# build osdf_sim +chmod +x ./build_sim_image.sh +./build_sim_image.sh + +# run osdf_sim +docker run -d --name osdf_sim -p "5000:5000" osdf_sim:latest; + +OSDF_SIM_IP=`get-instance-ip.sh osdf_sim` +echo "OSDF_SIM_IP=${OSDF_SIM_IP}" + +${WORKSPACE}/scripts/optf-osdf/osdf/wait_for_port.sh ${OSDF_SIM_IP} 5000 + + +# wait a while before continuing +sleep 2 + +echo "inspect docker things for tracing purpose" +docker inspect osdf_sim + diff --git a/scripts/optf-osdf/osdf/wait_for_port.sh b/scripts/optf-osdf/osdf/wait_for_port.sh new file mode 100755 index 00000000..360fc210 --- /dev/null +++ b/scripts/optf-osdf/osdf/wait_for_port.sh @@ -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 diff --git a/scripts/policy/script1.sh b/scripts/policy/script1.sh index b38401e3..70706921 100755 --- a/scripts/policy/script1.sh +++ b/scripts/policy/script1.sh @@ -147,7 +147,7 @@ TIME_OUT=600 INTERVAL=20 TIME=0 while [ "$TIME" -lt "$TIME_OUT" ]; do - curl -k -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break + curl -k -i --user "demo@people.osaaf.org:demo123456!" -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds sleep $INTERVAL diff --git a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot index 78e35222..a88b84f7 100644 --- a/tests/aaf/aaf-sms-suite/aaf-sms-test.robot +++ b/tests/aaf/aaf-sms-suite/aaf-sms-test.robot @@ -1,94 +1,69 @@ *** Settings *** +Suite Setup Run keywords SMS Check SMS API Docker Container Created header Created session Library OperatingSystem Library RequestsLibrary -Library json *** Variables *** -${MESSAGE} {"ping": "ok"} -#global variables +*** Test Cases *** +Create Domain + [Template] Post template + /v1/sms/domain create_domain.json + /v1/sms/domain/curltestdomain/secret create_secret.json +Get information from Domain + [Template] Get template + /v1/sms/quorum/status + /v1/sms/domain/curltestdomain/secret + /v1/sms/domain/curltestdomain/secret/curltestsecret1 -*** Test Cases *** -SMS Check SMS API Docker Container - [Documentation] Checks if SMS docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} nexus3.onap.org:10001/onap/aaf/sms +Delete from Domain + [Template] Delete template + /v1/sms/domain/curltestdomain/secret/curltestsecret1 + /v1/sms/domain/curltestdomain -SMS GetStatus - [Documentation] Gets Backend Status - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/quorum/status headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 +*** Keywords *** +Created session + Create Session aaf_sms_session ${SMS_HOSTNAME}:${SMS_PORT} + Set Suite Variable ${suite_aaf_sms_session} aaf_sms_session -SMS CreateDomain - [Documentation] Creates a Secret Domain to hold Secrets - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - ${data} Get Binary File ${CURDIR}${/}data${/}create_domain.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request SMS /v1/sms/domain data=${data} headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 201 +Created header + ${headers}= Create Dictionary Content-Type=application/json Accept=application/json + Set Suite Variable ${suite_headers} ${headers} -SMS CreateSecret - [Documentation] Create A Secret within the Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - ${data} Get Binary File ${CURDIR}${/}data${/}create_secret.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Post Request SMS /v1/sms/domain/curltestdomain/secret data=${data} headers=${headers} +Delete template + [Documentation] Deletes from Domain + [Arguments] ${topic} + ${resp}= Delete Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 201 + Should Be Equal As Integers ${resp.status_code} 204 -SMS ListSecret - [Documentation] Lists all Secret Names within Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret headers=${headers} +Post template + [Documentation] Create A Domain/Secret Names + [Arguments] ${topic} ${file} + ${data} Get Binary File ${CURDIR}${/}data${/}${file} + ${resp}= Post Request ${suite_aaf_sms_session} ${topic} data=${data} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 + Should Be Equal As Integers ${resp.status_code} 201 -SMS GetSecret - [Documentation] Gets a single Secret with Values from Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} +Get template + [Documentation] Gets from Domain + [Arguments] ${topic} + ${resp}= Get Request ${suite_aaf_sms_session} ${topic} headers=${suite_headers} Log To Console ********************* Log To Console response = ${resp} Log To Console body = ${resp.text} Should Be Equal As Integers ${resp.status_code} 200 -SMS DeleteSecret - [Documentation] Deletes a Secret referenced by Name from Domain - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain/secret/curltestsecret1 headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 204 - -SMS DeleteDomain - [Documentation] Deletes a Domain referenced by Name - Create Session SMS ${SMS_HOSTNAME}:${SMS_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Delete Request SMS /v1/sms/domain/curltestdomain headers=${headers} +SMS Check SMS API Docker Container + [Documentation] Checks if SMS docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 204 - -*** Keywords *** + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} nexus3.onap.org:10001/onap/aaf/sms diff --git a/tests/aaf/aafapi/aafapi.robot b/tests/aaf/aafapi/aafapi.robot index b1f8e746..93b6ce36 100644 --- a/tests/aaf/aafapi/aafapi.robot +++ b/tests/aaf/aafapi/aafapi.robot @@ -6,58 +6,34 @@ Library Collections Library String *** Variables *** -${TARGETURL_NAMESPACE} http://${AAF_IP}:8101/authz/nss/org.openecomp -${TARGETURL_PERMS} http://${AAF_IP}:8101/authz/perms/user/dgl@openecomp.org -${TARGETURL_ROLES} http://${AAF_IP}:8101/authz/roles/user/dgl@openecomp.org -${username} dgl@openecomp.org -${password} ecomp_admin +${TARGETURL_NAMESPACE} https://${AAF_IP}:8100/authz/nss/org.osaaf.people +${TARGETURL_PERMS} https://${AAF_IP}:8100/authz/perms/user/aaf_admin@people.osaaf.org +${TARGETURL_ROLES} https://${AAF_IP}:8100/authz/roles/user/aaf_admin@people.osaaf.org +${username} aaf_admin@people.osaaf.org +${password} demo123456! *** Test Cases *** View Namesapce [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf /authz/nss/org.openecomp headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf /authz/nss/org.osaaf.people headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 log 'JSON Response Code :'${resp.text} View by User Permission [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf authz/perms/user/dgl@openecomp.org headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf authz/perms/user/aaf_admin@people.osaaf.org headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 log 'JSON Response Code :'${resp.text} View by User Role [Tags] get - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Get Request aaf authz/roles/user/dgl@openecomp.org headers=&{headers} + CreateSession aaf https://${AAF_IP}:8100 + &{headers}= Create Dictionary Authorization=Basic YWFmX2FkbWluQHBlb3BsZS5vc2FhZi5vcmc6ZGVtbzEyMzQ1NiE= Content-Type=application/json Accept=application/json + ${resp}= Get Request aaf authz/roles/user/aaf_admin@people.osaaf.org headers=&{headers} Should Be Equal As Strings ${resp.status_code} 200 - log 'JSON Response Code :'${resp.text} - -Cleanup Namespace ( 424 Response - Delete dependencies and try again) - [Tags] delete - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Delete Request aaf authz/ns/org.openecomp.dmaapBC headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 424 - log 'JSON Response Code :'${resp.text} - -Add Data ( Add Admin to Namespace Explicit ) - [Tags] post - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Post Request aaf authz/ns/org.openecomp.dmaapBC/admin/alexD@openecomp.org headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 403 - log 'JSON Response Code :'${resp.text} - -View Explicit Permission - [Tags] post - CreateSession aaf http://${AAF_IP}:8101 - &{headers}= Create Dictionary Authorization=Basic ZGdsQG9wZW5lY29tcC5vcmc6ZWNvbXBfYWRtaW4= Content-Type=application/json Accept=application/json - ${resp}= Post Request aaf authz/perms/user/m99751@dmaapBC.openecomp.org headers=&{headers} - Should Be Equal As Strings ${resp.status_code} 406 - log 'JSON Response Code :'${resp.text}
\ No newline at end of file + log 'JSON Response Code :'${resp.text}
\ No newline at end of file diff --git a/tests/appc/healthcheck/gettime.robot b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot index 9f376f9b..d59fefa8 100644 --- a/tests/appc/healthcheck/gettime.robot +++ b/tests/appc/healthcheck/APPC_GLOBAL_KEYWORDS.robot @@ -3,12 +3,10 @@ Library Selenium2Library Library OperatingSystem Library DateTime Library String -##Library HttpLibrary.HTTP Library Collections *** Keywords *** - Get Server time [Documentation] Getting server time to update the json request [Arguments] ${RequestFile} @@ -16,10 +14,10 @@ Get Server time ${date}= Get Current Date time_zone=local result_format=%Y-%m-%dT%H:%M:%S.%fZ exclude_millis=False #updating the request file with the server time - ${file_content}= OperatingSystem.Get File ${RequestFile} - @{list}= Split to lines ${file_content} - ${data}= Get from list ${list} 5 - @{splitted_string}= Split String ${data} : 1 + ${file_content}= Get File ${RequestFile} + @{list}= Split to lines ${file_content} + ${data}= Get from list ${list} 5 + @{splitted_string}= Split String ${data} : 1 ${time}= Get From List ${splitted_string} 1 Log ${time} @{splitted_string_time}= Split String ${time} " 2 @@ -27,14 +25,9 @@ Get Server time Log ${times1} ${replaced_string}= Replace String ${data} ${times1} ${date} @{list1}= Split to lines ${file_content} - Remove from list ${list1} 5 - Insert into list ${list1} 5 ${replaced_string} - Remove File ${RequestFile} - :FOR ${line} IN @{list1} - \ Append to File ${RequestFile} ${line} encoding=UTF-8 - \ Append to File ${RequestFile} ${\n} encoding=UTF-8 - - - - -
\ No newline at end of file + Remove from list ${list1} 5 + Insert into list ${list1} 5 ${replaced_string} + Remove File ${RequestFile} + :FOR ${line} IN @{list1} + \ Append to File ${RequestFile} ${line} encoding=UTF-8 + \ Append to File ${RequestFile} ${\n} encoding=UTF-8 diff --git a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot index b869434f..9b399228 100644 --- a/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot +++ b/tests/appc/healthcheck/APPC_GLOBAL_VARIABLES.robot @@ -5,6 +5,9 @@ Documentation store all properties that can change or are used in multipl *** Variables *** -${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt -${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt -${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt
\ No newline at end of file +#${GLOBAL_VNF_RESTART_REQUESTFILE} ${CURDIR}/LCM_VNF_RESTART_REQUEST.txt +#${GLOBAL_VM_RESTART_REQUESTFILE} ${CURDIR}/LCM_VM_RESTART_REQUEST.txt +#${GLOBAL_HEALTHCHECK_REQUESTFILE} ${CURDIR}/LCM_VM_HEALTHCHECK_REQUEST.txt +${GLOBAL_APPC_ADMIN_USER} admin +${GLOBAL_APPC_ADMIN_PASS} Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U +# to try to fire up the test again because the first one was failure in 90 minutes diff --git a/tests/appc/healthcheck/APPC_Netstat.robot b/tests/appc/healthcheck/APPC_Netstat.robot index 285fc372..200a4966 100644 --- a/tests/appc/healthcheck/APPC_Netstat.robot +++ b/tests/appc/healthcheck/APPC_Netstat.robot @@ -1,8 +1,11 @@ *** Settings *** Library OperatingSystem +Library String *** Test Cases *** APPC Netstat [Documentation] Checking the active ports - ${output}= Run netstat -a | grep -E 8282 | grep LISTEN + ${output}= Run netstat -a | grep -E ":8282 " | grep LISTEN Log To Console ${output} + ${line_count}= Get Line Count ${output} + Should Be Equal As Strings ${line_count} 1 diff --git a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot index 1cea75e9..8c75addc 100644 --- a/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_HEALTHCHECK_TIMESTAMP.robot @@ -1,52 +1,42 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot +Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot -*** Variable *** -${ResponseCode} -${var} *** Test Cases *** - APPC LCM API HEALTHCHECK - [Documentation] APPC LCM API HEALTHCHECK - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] -# Set Selenium Speed 60 -# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a - -# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} + [Documentation] APPC LCM API HEALTHCHECK + [Teardown] Close All Browsers + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')] +# Set Selenium Speed 60 +# Click link xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')]/following::li[5]/ul/li/div[1]/h3/span[2]/a +# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0"]/div[1]/h3/span[2]/a + +# Get Server time ${GLOBAL_HEALTHCHECK_REQUESTFILE} +# ${file_content}= OperatingSystem.Get File ${GLOBAL_HEALTHCHECK_REQUESTFILE} -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} -# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content} - -# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] -# Set Selenium Speed 90 -# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input - -## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre -## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected - -Tear Down - - [Documentation] Close all browsers - Close All Browsers +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(health-check)input-TOP')])[1]/following::textarea[1] ${file_content} +# Input Text xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::table//tbody/tr/td[2]/textarea ${file_content} + +# wait until page contains element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:health-check')]//following::form/div[2]/input[1] +# Set Selenium Speed 90 +# Click Element xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/form/div[2]/input + +## ${var}= Get Value xpath= //*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre +## Element Text Should Be xpath=//*[@id="appc-provider-lcm(2016-01-08)_health_check_post_0_content"]/div[2]/div[3]/pre[1][text()='200'] 200 expected diff --git a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot index 7968d552..f49af460 100644 --- a/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_VM_RESTART_TIMESTAMP.robot @@ -1,47 +1,39 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem -Library XvfbRobot -Resource APPC_GLOBAL_VARIABLES.robot -Resource gettime.robot +Library XvfbRobot +Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot -*** Variable *** -${ResponseCode} -${var} *** Test Cases *** APPC LCM API VM RESTART - [Documentation] APPC LCM API VM RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - + [Documentation] APPC LCM API VM RESTART + [Teardown] Close All Browsers + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] + # Get Server time ${GLOBAL_VM_RESTART_REQUESTFILE} # ${file_content}= OperatingSystem.Get File ${GLOBAL_VM_RESTART_REQUESTFILE} # Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} +# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} + +# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + +# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre +# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected diff --git a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot index 93c72d72..ed85d4a1 100644 --- a/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot +++ b/tests/appc/healthcheck/LCM_VNF_RESTART_TIMESTAMP.robot @@ -1,50 +1,40 @@ *** Settings *** Library Selenium2Library -Library OperatingSystem -Library XvfbRobot +Library XvfbRobot Resource ${CURDIR}/APPC_GLOBAL_VARIABLES.robot -Resource ${CURDIR}/gettime.robot +Resource ${CURDIR}/APPC_GLOBAL_KEYWORDS.robot - -*** Variable *** -${ResponseCode} -${var} - *** Test Cases *** - APPC LCM API VNF RESTART - [Documentation] APPC LCM API VNF RESTART - Start Virtual Display 1920 1080 - Open Browser http://admin:Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U@localhost:8282/apidoc/explorer/index.html chrome -# Maximize Browser Window -# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img - - Reload Page - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] - - -# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] -# Set Selenium Speed 60 -# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] - -# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE} -# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE} + [Documentation] APPC LCM API VNF RESTART + [Teardown] Close All Browsers +# Set the timeout because Open Browser ended with timeout... + Set Selenium Timeout 5 seconds + Start Virtual Display 1920 1080 + Open Browser http://${GLOBAL_APPC_ADMIN_USER}:${GLOBAL_APPC_ADMIN_PASS}@localhost:8282/apidoc/explorer/index.html chrome + Set Window Size 1920 1080 +# Click Element xpath=.//p[contains(text(),'If you have reason to expect the website is safe, select the I Accept the Risk button to continue.')]//following::img + + Reload Page + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm(2016-01-08)')] + +# Wait Until Page Contains Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')] +# Set Selenium Speed 60 +# Click Element xpath=.//*[contains(text(),'appc-provider-lcm:restart')] + +# Get Server time ${GLOBAL_VNF_RESTART_REQUESTFILE} +# ${file_content}= OperatingSystem.Get File ${GLOBAL_VNF_RESTART_REQUESTFILE} # Wait Until Page Contains Element xpath=//td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] -# Set Selenium Speed 90 -# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} -# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] - -# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} - -# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre -# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected - - -Tear Down - [Documentation] Close all browsers - Close All Browsers +# Set Selenium Speed 90 +# Input Text xpath=(.//*[contains(text(),'(restart)input-TOP')])[5]/following::textarea[1] ${file_content} +# Click Element xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::form/div[2]/input[1] + +# Input Text xpath= //td[contains(text(), '(restart)input-TOP')]//following::textarea[@name='(restart)input-TOP'][3] ${file_content} + +# ${var}= Get Value xpath=//*[@id="resource_appc-provider-lcm(2016-01-08)"]/div/h2/a//following::a[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[contains(text(),'Response Code')][1]//following-sibling::div//pre +# Element Text Should Be xpath=//*[contains(text(),'/operations/appc-provider-lcm:restart')]//following::h4[text()='Response Code'][1]//following-sibling::div//pre[1][text()='200'] 200 expected diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 7b99fb0d..60580083 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -50,7 +50,7 @@ ${DCAE_APP_API_MESSAGES_PATH} /messages/all ${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate -${ROUTED_MESSAGES_TOPIC} test-hv-ran-meas +${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP ${VES_HV_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${VES_HV_CONFIGURATION_JSON_FILEPATH} ${VES_HV_RESOURCES}/ves-hv-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json index 9aca4015..25e7272c 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/authorization/xnf-valid-messages-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json index 642c7d56..92b0deca 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/dcae-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json index 642c7d56..92b0deca 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/fixed-payload/xnf-fixed-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/dcae-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json index 22d48c5f..612bfedf 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-gpb-data/xnf-invalid-gpb-data-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/dcae-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json index a7d22190..6d63acc8 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/invalid-wire-frame/xnf-invalid-wire-frame-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json index 89f3e067..dc160e51 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/dcae-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json index 60c81a89..49d9bd93 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/multiple-simulators-payload/xnf-simulator-smaller-valid-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json index 54836bf3..4296d485 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/too-big-payload/xnf-too-big-payload-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json index f38e9aa0..3b57160f 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/dcae-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json index b3aada5b..43e90874 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/unsupported-domain/xnf-unsupported-domain-request.json @@ -2,7 +2,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -24,7 +24,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "FAULT", + "domain": "fault", "sequence": 1, "priority": 1, "eventId": "sample-event-id", @@ -46,7 +46,7 @@ { "commonEventHeader": { "version": "sample-version", - "domain": "HVMEAS", + "domain": "perf3gpp", "sequence": 1, "priority": 1, "eventId": "sample-event-id", diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json index b9e1a4b5..9ef72497 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/ves-hv-configuration.json @@ -2,8 +2,8 @@ "dmaap.kafkaBootstrapServers": "kafka:9092", "collector.routing": [ { - "fromDomain": "HVMEAS", - "toTopic": "test-hv-ran-meas" + "fromDomain": "perf3gpp", + "toTopic": "TEST_HV_VES_PERF3GPP" } ] }
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index 73ce2a2c..fcad88d7 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -21,7 +21,7 @@ Invalid event processing ${data}= Get Data From File ${input_invalid_event_in_dmaap} Set event in DMaaP ${data} ${invalid_notification}= Create invalid notification ${data} - ${notification}= Catenate SEPARATOR= \\n |org.onap.dcaegen2.services.prh.exceptions.DmaapNotFoundException: Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} + ${notification}= Catenate SEPARATOR= \\n |Incorrect json, consumerDmaapModel can not be created: ${invalid_notification} Wait Until Keyword Succeeds 100x 100ms Check PRH log ${notification} Valid event processing diff --git a/tests/dmaap-datarouter/dr-suite/dr-suite.robot b/tests/dmaap-datarouter/dr-suite/dr-suite.robot index fcac2026..d00bddc7 100755 --- a/tests/dmaap-datarouter/dr-suite/dr-suite.robot +++ b/tests/dmaap-datarouter/dr-suite/dr-suite.robot @@ -10,7 +10,8 @@ ${TARGET_URL} https://${DR_PROV_IP}:8443 ${TARGET_URL_FEED} https://${DR_PROV_IP}:8443/feed/1 ${TARGET_URL_SUBSCRIBE} https://${DR_PROV_IP}:8443/subscribe/1 ${TARGET_URL_SUBSCRIPTION} https://${DR_PROV_IP}:8443/subs/1 -${TARGET_URL_PUBLISH} https://${DR_NODE_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_PROV} https://${DR_PROV_IP}:8443/publish/1/csit_test +${TARGET_URL_PUBLISH_NODE} https://${DR_NODE_IP}:8443/publish/1/csit_test ${CREATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "CSIT_Test", "business_description": "CSIT_Test", "suspend": false, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${UPDATE_FEED_DATA} {"name": "CSIT_Test", "version": "m1.0", "description": "UPDATED-CSIT_Test", "business_description": "CSIT_Test", "suspend": true, "deleted": false, "changeowner": true, "authorization": {"classification": "unclassified", "endpoint_addrs": [], "endpoint_ids": [{"password": "rs873m", "id": "rs873m"}]}} ${SUBSCRIBE_DATA} {"delivery":{ "url":"https://${DR_PROV_IP}:8080/", "user":"rs873m", "password":"rs873m", "use100":true}, "metadataOnly":false, "suspend":false, "groupid":29, "subscriber":"sg481n"} @@ -42,9 +43,10 @@ Run Publish Feed [Documentation] Publish to Feed [Timeout] 1 minute Sleep 10s Behaviour was noticed where feed was not created in time for publish to be sent - ${resp}= PutCall ${TARGET_URL_PUBLISH} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m - log ${TARGET_URL_PUBLISH} - log ${resp.text} + ${resp}= PutCall ${TARGET_URL_PUBLISH_PROV} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m + log ${TARGET_URL_PUBLISH_PROV} + Should Contain ${resp.headers['Location']} https://dmaap-dr-node:8443/publish/1/csit_test + ${resp}= PutCall ${TARGET_URL_PUBLISH_NODE} ${CREATE_FEED_DATA} ${PUBLISH_FEED_CONTENT_TYPE} rs873m Should Be Equal As Strings ${resp.status_code} 204 log 'JSON Response Code:'${resp} @@ -94,23 +96,23 @@ Run Delete Feed PostCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.post('${url}', data='${data}', headers=${headers}, verify=False) requests [Return] ${resp} PutCall [Arguments] ${url} ${data} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} Authorization=Basic cnM4NzNtOnJzODczbQ== - ${resp}= Evaluate requests.put('${url}',data='${data}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.put('${url}', data='${data}', headers=${headers}, verify=False, allow_redirects=False) requests [Return] ${resp} GetCall [Arguments] ${url} ${content_type} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} Content-Type=${content_type} - ${resp}= Evaluate requests.get('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.get('${url}', headers=${headers}, verify=False) requests [Return] ${resp} DeleteCall [Arguments] ${url} ${user} ${headers}= Create Dictionary X-ATT-DR-ON-BEHALF-OF=${user} - ${resp}= Evaluate requests.delete('${url}', headers=${headers},verify=False) requests + ${resp}= Evaluate requests.delete('${url}', headers=${headers}, verify=False) requests [Return] ${resp} diff --git a/tests/optf-has/has/optf_has_test.robot b/tests/optf-has/has/optf_has_test.robot index 3b3ee7a0..8bd313a9 100644 --- a/tests/optf-has/has/optf_has_test.robot +++ b/tests/optf-has/has/optf_has_test.robot @@ -5,6 +5,11 @@ Library json *** Variables *** ${MESSAGE} {"ping": "ok"} +${BASIC} Basic +${Music_AUTHVALUE} Y29uZHVjdG9yOmMwbmR1Y3Qwcg== +${HAS_AUTHVALUE} YWRtaW4xOnBsYW4uMTU= +${Music_Auth} ${BASIC} ${Music_AUTHVALUE} +${HAS_Auth} ${BASIC} ${HAS_AUTHVALUE} ${RESP_STATUS} "error" ${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" ${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand @@ -54,7 +59,7 @@ Check Music War Docker Container Get Music Version [Documentation] It sends a REST GET request to retrieve the Music.war version Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -109,7 +114,7 @@ Check ConductorData Docker Container Get Root Url [Documentation] It sends a REST GET request to root url Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond / headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -121,7 +126,7 @@ Conductor AddHealthcheck Row Into Music [Documentation] It sends a REST PUT request to Music to inject healthcheck plan Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}healthcheck.json - &{headers}= Create Dictionary ns=conductor userId=conductor password=c0nduct0r Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary ns=conductor Authorization=${Music_Auth} userId=conductor password=c0nduct0r Content-Type=application/json Accept=application/json ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/conductor/tables/plans/rows?id=healthcheck data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -133,7 +138,7 @@ Conductor AddHealthcheck Row Into Music Healthcheck [Documentation] It sends a REST GET request to healthcheck url Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/healthcheck headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -144,7 +149,7 @@ SendPlanWithWrongVersion [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_version.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -159,7 +164,7 @@ SendPlanWithWrongVersion GetPlanWithWrongVersion [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -175,7 +180,7 @@ SendPlanWithoutDemandSection [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_without_demand_section.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -190,7 +195,7 @@ SendPlanWithoutDemandSection GetPlanWithoutDemandSection [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -206,7 +211,7 @@ SendPlanWithWrongConstraint [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_wrong_distance_constraint.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -221,7 +226,7 @@ SendPlanWithWrongConstraint GetPlanWithWrongConstraint [Documentation] It sends a REST GET request to capture error Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -238,7 +243,7 @@ SendPlanWithLatiAndLongi [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_lati_and_longi.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -253,7 +258,7 @@ SendPlanWithLatiAndLongi GetPlanWithLatiAndLongi [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -269,7 +274,7 @@ SendPlanWithShortDistanceConstraint [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_short_distance_constraint.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -284,7 +289,7 @@ SendPlanWithShortDistanceConstraint GetPlanWithShortDistanceConstraint [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -300,7 +305,7 @@ SendPlanWithVimFit [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_vim_fit.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -315,7 +320,7 @@ SendPlanWithVimFit GetPlanWithVimFit [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -331,7 +336,7 @@ SendPlanWithHpa [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -346,7 +351,7 @@ SendPlanWithHpa GetPlanWithHpa [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -362,7 +367,7 @@ SendPlanWithHpaSimple [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_simple.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -377,7 +382,7 @@ SendPlanWithHpaSimple GetPlanWithHpaSimple [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -393,7 +398,7 @@ SendPlanWithHpaMandatory [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_mandatory.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -408,7 +413,7 @@ SendPlanWithHpaMandatory GetPlanWithHpaMandatory [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -424,7 +429,7 @@ SendPlanWithHpaOptionals [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_requirements_optionals.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -439,7 +444,7 @@ SendPlanWithHpaOptionals GetPlanWithHpaOptionals [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -455,7 +460,7 @@ SendPlanWithHpaUnmatched [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_unmatched.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -470,7 +475,7 @@ SendPlanWithHpaUnmatched GetPlanWithHpaUnmatched [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -487,7 +492,7 @@ SendPlanWithHpaScoreMultiObj [Documentation] It sends a POST request to conductor Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} ${data}= Get Binary File ${CURDIR}${/}data${/}plan_with_hpa_score_multi_objective.json - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Post Request optf-cond /v1/plans data=${data} headers=${headers} Log To Console ********************* Log To Console response = ${resp} @@ -502,7 +507,7 @@ SendPlanWithHpaScoreMultiObj GetPlanWithHpaScoreMultiObj [Documentation] It sends a REST GET request to capture recommendations Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + &{headers}= Create Dictionary Authorization=${HAS_Auth} Content-Type=application/json Accept=application/json ${resp}= Get Request optf-cond /v1/plans/${generatedPlanId} headers=${headers} Log To Console ********************* Log To Console response = ${resp} diff --git a/tests/optf-osdf/osdf/__init__.robot b/tests/optf-osdf/osdf/__init__.robot new file mode 100644 index 00000000..fb654d7b --- /dev/null +++ b/tests/optf-osdf/osdf/__init__.robot @@ -0,0 +1,4 @@ +*** Settings *** +Documentation Integration - Suite 1 + + diff --git a/tests/optf-osdf/osdf/data/pci-opt-request.json b/tests/optf-osdf/osdf/data/pci-opt-request.json new file mode 100644 index 00000000..7ec9ab5f --- /dev/null +++ b/tests/optf-osdf/osdf/data/pci-opt-request.json @@ -0,0 +1,20 @@ +{ + "requestInfo": { + "transactionId": "xxx-xxx-xxxx", + "requestId": "yyy-yyy-yyyy", + "callbackUrl": "https://wiki.onap.org:5000/callbackUrl/", + "sourceId": "SO", + "requestType": "create", + "numSolutions": 1, + "optimizers": [ + "placement" + ], + "timeout": 600 + }, + "cellInfo": { + "networkId": "1000", + "cellIdList": [ + "cell0" + ] + } +}
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/data/placement_request.json b/tests/optf-osdf/osdf/data/placement_request.json new file mode 100644 index 00000000..d9b16ca5 --- /dev/null +++ b/tests/optf-osdf/osdf/data/placement_request.json @@ -0,0 +1,102 @@ +{ + "requestInfo": { + "transactionId": "xxx-xxx-xxxx", + "requestId": "yyy-yyy-yyyy", + "callbackUrl": "https://wiki.onap.org:5000/callbackUrl/", + "sourceId": "SO", + "requestType": "create", + "numSolutions": 1, + "optimizers": ["placement"], + "timeout": 600 + }, + "placementInfo": { + "requestParameters": { "customerLatitude": 32.89748, "customerLongitude": -97.040443, "customerName": "xyz" }, + "subscriberInfo": {"globalSubscriberId": "xxx-xx-xxx", "subscriberName": "subscriber_x"}, + "placementDemands": [ + { + "resourceModuleName": "vGMuxInfra", + "serviceResourceId": "vGMuxInfra-xx", + "tenantId": "vGMuxInfra-tenant", + "resourceModelInfo": { + "modelInvariantId": "vGMuxInfra-modelInvariantId", + "modelVersionId": "vGMuxInfra-versionId", + "modelName": "vGMuxInfra-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vGMuxInfra-customeModelName" + } + }, + { + "resourceModuleName": "vG", + "serviceResourceId": "71d563e8-e714-4393-8f99-cc480144a05e", + "tenantId": "vG-tenant", + "resourceModelInfo": { + "modelInvariantId": "vG-modelInvariantId", + "modelVersionId": "vG-versionId", + "modelName": "vG-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vG-customeModelName" + }, + "existingCandidates": [ + { + "identifierType": "serviceInstanceId", + "cloudOwner": "", + "identifiers": ["gjhd-098-fhd-987"] + } + ], + "excludedCandidates": [ + { + "identifierType": "serviceInstanceId", + "cloudOwner": "", + "identifiers": ["gjhd-098-fhd-987"] + }, + { + "identifierType": "vimId", + "cloudOwner": "vmware", + "identifiers": ["NYMDT67"] + } + ], + "requiredCandidates": [ + { + "identifierType": "vimId", + "cloudOwner": "amazon", + "identifiers": ["TXAUS219"] + } + ] + } + ] + }, + "serviceInfo": { + "serviceInstanceId": "d61b2543-5914-4b8f-8e81-81e38575b8ec", + "serviceName": "vCPE", + "modelInfo": { + "modelInvariantId": "vCPE-invariantId", + "modelVersionId": "vCPE-versionId", + "modelName": "vCPE-model", + "modelType": "service", + "modelVersion": "1.0", + "modelCustomizationName": "vCPE-customeModelName" + } + }, + "licenseInfo": { + "licenseDemands": [ + { + "resourceModuleName": "vGMuxInfra", + "serviceResourceId": "vGMuxInfra-xx", + "resourceModelInfo": { + "modelInvariantId": "vGMuxInfra-modelInvariantId", + "modelVersionId": "vGMuxInfra-versionId", + "modelName": "vGMuxInfra-model", + "modelType": "resource", + "modelVersion": "1.0", + "modelCustomizationName": "vGMuxInfra-customeModelName" + }, + "existingLicenses": { + "entitlementPoolUUID": ["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"], + "licenseKeyGroupUUID": ["87257b49-9602-4ca1-9817-094e52bc873b", "43257b49-9602-4fe5-9337-094e52bc9435"] + } + } + ] + } +}
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/optf_osdf_setup.robot b/tests/optf-osdf/osdf/optf_osdf_setup.robot new file mode 100644 index 00000000..fdf7f3e3 --- /dev/null +++ b/tests/optf-osdf/osdf/optf_osdf_setup.robot @@ -0,0 +1,12 @@ +*** Settings *** +Documentation Suite description +Resource ./resources/common-keywords.robot + +*** Test Cases *** +Check OSDF_SIM Docker Container + [Documentation] It checks osdf_simulator docker container is running + Verify Docker RC Status osdf_sim + +Check OSDF Docker Container + [Documentation] It checks optf-osdf docker container is running + Verify Docker RC Status optf-osdf
\ No newline at end of file diff --git a/tests/optf-osdf/osdf/optf_osdf_test.robot b/tests/optf-osdf/osdf/optf_osdf_test.robot new file mode 100644 index 00000000..c3921d5c --- /dev/null +++ b/tests/optf-osdf/osdf/optf_osdf_test.robot @@ -0,0 +1,48 @@ +*** Settings *** +Library json +Library OperatingSystem +Resource ./resources/common-keywords.robot + +Suite Teardown Delete All Sessions + +*** Variables *** +${osdf_host} ${OSDF_HOSTNAME}:${OSDF_PORT} +&{placement_auth} = username=test password=testpwd +&{wrong_authorization} = username=test password=test +&{pci_auth}= username=pci_test password=pci_testpwd + +*** Test Cases *** +Healthcheck + [Documentation] It sends a REST GET request to healthcheck url + ${resp}= Http Get ${osdf_host} /api/oof/v1/healthcheck + Should Be Equal As Integers ${resp.status_code} 200 + +SendPlacementWithInvalidAuth + [Documentation] It sends a POST request to osdf fail authentication + ${data}= Get Binary File ${CURDIR}${/}data${/}placement_request.json + ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/placement data=${data} auth=${wrong_authorization} + ${response_json} json.loads ${resp.content} + Should Be Equal Unauthorized, check username and password ${response_json['serviceException']['text']} + Should Be Equal As Integers ${resp.status_code} 401 + +SendPlacementWithValidAuth + [Documentation] It sends a POST request to osdf with correct authentication + ${data}= Get Binary File ${CURDIR}${/}data${/}placement_request.json + ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/placement data=${data} auth=${placement_auth} + ${response_json} json.loads ${resp.content} + Should Be Equal As Integers ${resp.status_code} 202 + Should Be Equal accepted ${response_json['requestStatus']} + +#SendPCIOptimizationWithAuth +# [Documentation] It sends a POST request PCI Optimization service +# +# ${data}= Get Binary File ${CURDIR}${/}data${/}pci-opt-request.json +# ${resp}= Http Post host=${osdf_host} restUrl=/api/oof/v1/pci data=${data} auth=${pci_auth} +# ${response_json} json.loads ${resp.content} +# Should Be Equal As Integers ${resp.status_code} 202 +# Should Be Equal accepted ${response_json['requestStatus']} + + + + + diff --git a/tests/optf-osdf/osdf/resources/common-keywords.robot b/tests/optf-osdf/osdf/resources/common-keywords.robot new file mode 100644 index 00000000..ea45f09d --- /dev/null +++ b/tests/optf-osdf/osdf/resources/common-keywords.robot @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Suite description +Library OperatingSystem +Library RequestsLibrary +Library json +Library RequestsLibrary +*** Variables *** +&{headers}= Content-Type=application/json Accept=application/json +*** Keywords *** +Verify Docker RC Status + [Documentation] Method to verify whether docker instance is up and running + [Arguments] ${process_name} + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} ${process_name} + +Http Get + [Documentation] Wrapper for Http GET + [Arguments] ${host} ${restUrl} + Create Session optf-osdf ${host} + ${resp}= Get Request optf-osdf ${restUrl} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp} + +Http Post + [Documentation] Wrapper for Http POST + [Arguments] ${host} ${restUrl} ${auth} ${data} + ${pci_auth}= Create List ${auth['username']} ${auth['password']} + Create Session optf-osdf ${host} headers=${headers} auth=${pci_auth} + ${resp}= Post Request optf-osdf ${restUrl} data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp} + +Http Put + [Documentation] Wrapper for Http PUT + [Arguments] ${host} ${restUrl} ${auth} ${data} + ${pci_auth}= Create List ${auth['username']} ${auth['password']} + Create Session optf-osdf ${host} headers=${headers} auth=${pci_auth} + ${resp}= Put Request optf-osdf ${restUrl} data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + [Return] ${resp}
\ No newline at end of file diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/suite1/global_properties.robot index 60826bbc..e0c816ea 100644 --- a/tests/policy/suite1/global_properties.robot +++ b/tests/policy/suite1/global_properties.robot @@ -26,5 +26,5 @@ ${GLOBAL_POLICY_SERVER_URL} https://%{PDP_IP}:8081 ${GLOBAL_POLICY_AUTH} dGVzdHBkcDphbHBoYTEyMw== ${GLOBAL_POLICY_CLIENTAUTH} cHl0aG9uOnRlc3Q= ${GLOBAL_POLICY_HEALTHCHECK_URL} https://%{POLICY_IP}:6969 -${GLOBAL_POLICY_USERNAME} healthcheck -${GLOBAL_POLICY_PASSWORD} zb!XztG34 +${GLOBAL_POLICY_USERNAME} demo@people.osaaf.org +${GLOBAL_POLICY_PASSWORD} demo123456! diff --git a/tests/so/sanity-check/sanity_test_so.robot b/tests/so/sanity-check/sanity_test_so.robot index 7d6ddf31..dbf39cad 100644 --- a/tests/so/sanity-check/sanity_test_so.robot +++ b/tests/so/sanity-check/sanity_test_so.robot @@ -13,198 +13,198 @@ Create ServiceInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create ServiceInstance for invalid user Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete ServiceInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete ServiceInstance for invalid user Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Activate ServiceInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}activateService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/activate data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/activate data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Deactivate ServiceInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deactivateService.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/deactivate data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/deactivate data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create Volume Group instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVG.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete Volume Group instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVG.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/volumeGroups/ff305d54-75b4-ff1b-cdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Replace VF Module instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}replaceVF.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff/replace data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff/replace data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Put Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} + ${resp}= Put Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete Network instance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteNetwork.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/networks/2b125640-bd1a-4ef0-9ca0-ea76e2a22801 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result SO ServiceInstance health check Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3/rq1234d1-5a33-55df-13ab-12abad84e333 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5/rq1234d1-5a33-55df-13ab-12abad84e333 headers=${headers} Should Not Contain ${resp.content} null Create VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Update VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}updateVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create VnfInstance for invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete VnfInstance for invalid input Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Replace VnfInstance Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}replaceVnf.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-c7cef19d94e/replace data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-c7cef19d94e/replace data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Get Orchestration Requests Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5 headers=${headers} Should Not Contain ${resp.content} null Get Orchestration Requests Filter criteria Create Session refrepo http://${REPO_IP}:8080 &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Get Request refrepo /ecomp/mso/infra/orchestrationRequests/v3?filter=serviceInstanceId:EQUALS:bc305d54-75b4-431b-adb2-eb6b9e546014 headers=${headers} + ${resp}= Get Request refrepo /onap/so/infra/orchestrationRequests/v5?filter=serviceInstanceId:EQUALS:bc305d54-75b4-431b-adb2-eb6b9e546014 headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService with invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Create E2EService with invalid Input data Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}createE2eserviceInvalid.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Post Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3 data=${data} headers=${headers} + ${resp}= Post Request refrepo /onap/so/infra/e2eServiceInstances/v3 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService with invalid credential Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eservice.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI= Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result Delete E2EService with invalid input data Create Session refrepo http://${REPO_IP}:8080 ${data}= Get Binary File ${CURDIR}${/}data${/}deleteE2eserviceInvalid.json &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${resp}= Delete Request refrepo /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} + ${resp}= Delete Request refrepo /onap/so/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000 data=${data} headers=${headers} Run Keyword If '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405' log to console \nexecuted with expected result
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot index 154b5139..fcc1cc76 100644 --- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot +++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot @@ -18,6 +18,7 @@ ${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics ${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov ${CLI_EXEC_CLI_DFC} docker exec dfc /bin/sh -c "ls /target | grep .gz" +${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .gz" *** Test Cases *** @@ -27,12 +28,13 @@ Send VES File Ready Event to VES Collector ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 15s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 5s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 2s + Sleep 5s ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} + Sleep 5s Log Receive HTTP Status code ${resp.status_code} Should Be Equal As Strings ${resp.status_code} 202 @@ -51,19 +53,28 @@ Check VES Notification Topic is existing in Message Router List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT Verify Downloaded PM file from xNF exist on Data File Collector - [Tags] Bulk_PM_E2E_03 - [Documentation] Check the PM XML file exists on the File Consumer Simulator - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz + [Tags] Bulk_PM_E2E_03 + [Documentation] Check the PM XML file exists on the data file collector + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz Verify Default Feed And File Consumer Subscription On Datarouter - [Tags] Bulk_PM_E2E_04 - [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 - Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070
\ No newline at end of file + [Tags] Bulk_PM_E2E_04 + [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 + Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 + + +Verify Fileconsumer Receive PM file from Data Router + [Tags] Bulk_PM_E2E_05 + [Documentation] Check PM XML file exists on the File Consumer Simulator + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.gz |