aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh68
-rw-r--r--plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh23
-rw-r--r--plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt3
-rwxr-xr-xplans/policy/drools-applications/setup.sh58
-rwxr-xr-xplans/policy/drools-applications/teardown.sh (renamed from scripts/policy/mock-hello.sh)19
-rw-r--r--plans/policy/drools-applications/testplan.txt3
-rwxr-xr-xplans/policy/drools-pdp/setup.sh17
-rwxr-xr-xplans/policy/drools-pdp/teardown.sh1
-rwxr-xr-xplans/policy/health/setup.sh21
-rwxr-xr-xplans/policy/health/teardown.sh1
-rw-r--r--plans/policy/health/testplan.txt2
-rw-r--r--plans/policy/pap/setup.sh24
-rw-r--r--plans/policy/pap/teardown.sh1
-rwxr-xr-xplans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh6
-rwxr-xr-xplans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh4
-rwxr-xr-xplans/vfc-gvnfm-vnfres/sanity-check/setup.sh6
-rwxr-xr-xplans/vfc-gvnfm-vnfres/sanity-check/teardown.sh4
-rw-r--r--plans/vfc-nfvo-catalog/sanity-check/setup.sh3
-rw-r--r--plans/vfc-nfvo-catalog/sanity-check/teardown.sh4
-rwxr-xr-xplans/vfc-nfvo-lcm/sanity-check/setup.sh16
-rwxr-xr-xplans/vfc-nfvo-lcm/sanity-check/teardown.sh4
-rw-r--r--scripts/policy/config/drools/base.conf119
-rw-r--r--scripts/policy/config/drools/feature-healthcheck.conf18
-rw-r--r--scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json223
-rw-r--r--scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json51
-rw-r--r--scripts/policy/docker-compose-drools-apps.yml47
-rw-r--r--scripts/policy/docker-compose-drools.yml55
-rw-r--r--scripts/policy/docker-compose-engine.yml75
-rw-r--r--scripts/policy/docker-compose-pap.yml8
-rwxr-xr-xscripts/policy/engine.sh (renamed from scripts/policy/script1.sh)2
-rw-r--r--tests/modeling-toscaparsers-genericparser/test.robot31
-rw-r--r--tests/policy/drools-applications/drools-applications-test.robot17
-rw-r--r--tests/policy/engine/Policy-CSIT.robot (renamed from tests/policy/suite1/Policy-CSIT.robot)0
-rw-r--r--tests/policy/engine/__init__.robot (renamed from tests/policy/suite1/__init__.robot)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE.template (renamed from tests/policy/suite1/configpolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/configpolicy_vCPE_R1.template (renamed from tests/policy/suite1/configpolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS.template (renamed from tests/policy/suite1/configpolicy_vDNS.template)0
-rw-r--r--tests/policy/engine/configpolicy_vDNS_R1.template (renamed from tests/policy/suite1/configpolicy_vDNS_R1.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW.template (renamed from tests/policy/suite1/configpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/configpolicy_vFW_R1.template (renamed from tests/policy/suite1/configpolicy_vFW_R1.template)0
-rw-r--r--tests/policy/engine/createpolicy.template (renamed from tests/policy/suite1/createpolicy.template)0
-rw-r--r--tests/policy/engine/deletepolicy.template (renamed from tests/policy/suite1/deletepolicy.template)0
-rw-r--r--tests/policy/engine/getconfigpolicy.template (renamed from tests/policy/suite1/getconfigpolicy.template)0
-rw-r--r--tests/policy/engine/getoofpolicy.template (renamed from tests/policy/suite1/getoofpolicy.template)0
-rw-r--r--tests/policy/engine/global_properties.robot (renamed from tests/policy/suite1/global_properties.robot)0
-rw-r--r--tests/policy/engine/json_templater.robot (renamed from tests/policy/suite1/json_templater.robot)0
-rw-r--r--tests/policy/engine/listpolicy.template (renamed from tests/policy/suite1/listpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_pushpolicy.template (renamed from tests/policy/suite1/multiple_pushpolicy.template)0
-rw-r--r--tests/policy/engine/multiple_unpushpolicy.template (renamed from tests/policy/suite1/multiple_unpushpolicy.template)0
-rw-r--r--tests/policy/engine/oofpolicy_HPA_R1.template (renamed from tests/policy/suite1/oofpolicy_HPA_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS.template (renamed from tests/policy/suite1/opspolicy_VDNS.template)0
-rw-r--r--tests/policy/engine/opspolicy_VDNS_R1.template (renamed from tests/policy/suite1/opspolicy_VDNS_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW.template (renamed from tests/policy/suite1/opspolicy_VFW.template)0
-rw-r--r--tests/policy/engine/opspolicy_VFW_R1.template (renamed from tests/policy/suite1/opspolicy_VFW_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE.template (renamed from tests/policy/suite1/opspolicy_vCPE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vCPE_R1.template (renamed from tests/policy/suite1/opspolicy_vCPE_R1.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE.template (renamed from tests/policy/suite1/opspolicy_vOLTE.template)0
-rw-r--r--tests/policy/engine/opspolicy_vOLTE_R1.template (renamed from tests/policy/suite1/opspolicy_vOLTE_R1.template)0
-rw-r--r--tests/policy/engine/policy_interface.robot (renamed from tests/policy/suite1/policy_interface.robot)0
-rw-r--r--tests/policy/engine/pushpolicy.template (renamed from tests/policy/suite1/pushpolicy.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vFW.template (renamed from tests/policy/suite1/sdncnamingpolicy_vFW.template)0
-rw-r--r--tests/policy/engine/sdncnamingpolicy_vPG.template (renamed from tests/policy/suite1/sdncnamingpolicy_vPG.template)0
-rw-r--r--tests/policy/pap/data/create.group.request.json42
-rw-r--r--tests/policy/pap/pap-test.robot89
-rw-r--r--tests/vfc/nfvo-lcm/test.robot9
65 files changed, 1010 insertions, 64 deletions
diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh b/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh
new file mode 100644
index 00000000..1ca35bef
--- /dev/null
+++ b/plans/modeling-toscaparsers-genericparser/sanity-check/setup.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Place the scripts in run order:
+# Start all process required for executing test case
+
+#login to the onap nexus docker repo
+docker login -u docker -p docker nexus3.onap.org:10001
+
+# start msb
+docker run -d -p 8500:8500 --name msb_consul consul:0.9.3
+CONSUL_IP=`get-instance-ip.sh msb_consul`
+echo CONSUL_IP=${CONSUL_IP}
+
+docker run -d -p 10081:10081 -e CONSUL_IP=$CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
+DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
+echo DISCOVERY_IP=${DISCOVERY_IP}
+
+docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
+MSB_IP==`get-instance-ip.sh msb_internal_apigateway`
+echo MSB_IP=${MSB_IP}
+
+docker run -d -p 3306:3306 --name vfc-db -v /var/lib/mysql nexus3.onap.org:10001/onap/vfc/db
+VFC_DB_IP=`get-instance-ip.sh vfc-db`
+echo VFC_DB_IP=${VFC_DB_IP}
+
+# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
+for i in {1..10}; do
+ curl -sS -m 1 ${CONSUL_IP}:8500 && curl -sS -m 1 ${DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IP}:80 && break
+ echo sleep $i
+ sleep $i
+done
+
+# Wait for initialization(3306 DB)
+for i in {1..3}; do
+ curl -sS -m 1 ${VFC_DB_IP}:3306 && break
+ echo sleep $i
+ sleep $i
+done
+
+# Need some time so service info can be synced from discovery to api gateway
+echo sleep 60
+sleep 60
+
+# start modeling-genericparser
+docker run -d --name modeling-genericparser -v /var/lib/mysql -e MSB_ADDR=${DISCOVERY_IP}:10081 -e MYSQL_ADDR=${VFC_DB_IP}:3306 nexus3.onap.org:10001/onap/vfc/catalog
+GenericParser_IP=`get-instance-ip.sh modeling-genericparser`
+for i in {1..10}; do
+ curl -sS -m 1 ${GenericParser_IP}:8806 && break
+ echo sleep $i
+ sleep $i
+done
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v GenericParser_IP:${GenericParser_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}"
diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh b/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh
new file mode 100644
index 00000000..3982a1ef
--- /dev/null
+++ b/plans/modeling-toscaparsers-genericparser/sanity-check/teardown.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+#
+# Copyright 2017 ZTE Corporation.
+#
+# 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.
+#
+
+# This script is sourced by run-csit.sh after Robot test completion.
+kill-instance.sh msb_internal_apigateway
+kill-instance.sh msb_discovery
+kill-instance.sh msb_consul
+kill-instance.sh vfc-db
+kill-instance.sh modeling-genericparser
diff --git a/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt b/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt
new file mode 100644
index 00000000..13456aed
--- /dev/null
+++ b/plans/modeling-toscaparsers-genericparser/sanity-check/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+modeling-toscaparsers-genericparser/test.robot
diff --git a/plans/policy/drools-applications/setup.sh b/plans/policy/drools-applications/setup.sh
new file mode 100755
index 00000000..24422a63
--- /dev/null
+++ b/plans/policy/drools-applications/setup.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+echo "Uninstall docker-py and reinstall docker."
+pip uninstall -y docker-py
+pip uninstall -y docker
+pip install -U docker==2.7.0
+
+docker login -u docker -p docker nexus3.onap.org:10001
+
+# Adding this waiting container to avoid race condition between api and mariadb containers.
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml run --rm start_dependencies
+docker logs mariadb
+docker container ls -a
+
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools-apps.yml up -d
+sleep 1m
+
+docker logs mariadb
+docker logs drools
+docker container ls -a
+
+POLICY_DROOLS_IP=`get-instance-ip.sh drools`
+MARIADB_IP=`get-instance-ip.sh mariadb`
+
+echo DROOLS IP IS ${POLICY_DROOLS_IP}
+echo MARIADB IP IS ${MARIADB_IP}
+
+# Wait for initialization
+for i in {1..10}; do
+ curl -sS ${MARIADB_IP}:3306 && break
+ echo sleep $i
+ sleep $i
+done
+
+for i in {1..10}; do
+ curl -sS ${POLICY_DROOLS_IP}:6969 && break
+ echo sleep $i
+ sleep $i
+done
+
+ROBOT_VARIABLES="-v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}"
diff --git a/scripts/policy/mock-hello.sh b/plans/policy/drools-applications/teardown.sh
index 6092dcba..48ab171d 100755
--- a/scripts/policy/mock-hello.sh
+++ b/plans/policy/drools-applications/teardown.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright 2019 AT&T Intellectual Property. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,18 +14,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# $1 ip address of the mock server
-
-curl -v -X PUT -d @- http://$1:1080/expectation <<EOF
-{
- "httpRequest": {
- "method": "GET",
- "path": "/hello"
- },
- "httpResponse": {
- "body": "Hello world!",
- "statusCode": 200
- }
-}
-EOF
-
+kill-instance.sh drools
+kill-instance.sh mariadb
diff --git a/plans/policy/drools-applications/testplan.txt b/plans/policy/drools-applications/testplan.txt
new file mode 100644
index 00000000..3878a4e2
--- /dev/null
+++ b/plans/policy/drools-applications/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+policy/drools-applications
diff --git a/plans/policy/drools-pdp/setup.sh b/plans/policy/drools-pdp/setup.sh
index a7ed4408..459805be 100755
--- a/plans/policy/drools-pdp/setup.sh
+++ b/plans/policy/drools-pdp/setup.sh
@@ -17,25 +17,10 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
-docker run --name i-mock -d jamesdbloom/mockserver
-MOCK_IP=`get-instance-ip.sh i-mock`
-echo ${MOCK_IP}
-
-docker inspect i-mock
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS ${MOCK_IP}:1080 && break
- echo sleep $i
- sleep $i
-done
-
-${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP}
-
source ${WORKSPACE}/scripts/policy/drools-pdp-script.sh
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
+ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
export PDP_IP=${PDP_IP}
export POLICY_IP=${POLICY_IP}
export DOCKER_IP=${DOCKER_IP}
diff --git a/plans/policy/drools-pdp/teardown.sh b/plans/policy/drools-pdp/teardown.sh
index f1f0b21c..303ccff1 100755
--- a/plans/policy/drools-pdp/teardown.sh
+++ b/plans/policy/drools-pdp/teardown.sh
@@ -24,7 +24,6 @@ docker rm -v "${name}"
mkdir -p "${WORKSPACE}"/archives
-kill_instance i-mock
kill_instance drools
kill_instance pdp
kill_instance brmsgw
diff --git a/plans/policy/health/setup.sh b/plans/policy/health/setup.sh
index 890df9b4..c99af3fa 100755
--- a/plans/policy/health/setup.sh
+++ b/plans/policy/health/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright 2017, 2019 AT&T Intellectual Property. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,25 +17,10 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
-docker run --name i-mock -d jamesdbloom/mockserver
-MOCK_IP=`get-instance-ip.sh i-mock`
-echo ${MOCK_IP}
-
-docker inspect i-mock
-
-# Wait for initialization
-for i in {1..10}; do
- curl -sS ${MOCK_IP}:1080 && break
- echo sleep $i
- sleep $i
-done
-
-${WORKSPACE}/scripts/policy/mock-hello.sh ${MOCK_IP}
-
-source ${WORKSPACE}/scripts/policy/script1.sh
+source ${WORKSPACE}/scripts/policy/engine.sh
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v MOCK_IP:${MOCK_IP} -v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
+ROBOT_VARIABLES="-v IP:${IP} -v POLICY_IP:${POLICY_IP} -v PDP_IP:${PDP_IP} -v DOCKER_IP:${DOCKER_IP}"
export PDP_IP=${PDP_IP}
export POLICY_IP=${POLICY_IP}
export DOCKER_IP=${DOCKER_IP}
diff --git a/plans/policy/health/teardown.sh b/plans/policy/health/teardown.sh
index f1f0b21c..303ccff1 100755
--- a/plans/policy/health/teardown.sh
+++ b/plans/policy/health/teardown.sh
@@ -24,7 +24,6 @@ docker rm -v "${name}"
mkdir -p "${WORKSPACE}"/archives
-kill_instance i-mock
kill_instance drools
kill_instance pdp
kill_instance brmsgw
diff --git a/plans/policy/health/testplan.txt b/plans/policy/health/testplan.txt
index ab8a5b08..6bad34fc 100644
--- a/plans/policy/health/testplan.txt
+++ b/plans/policy/health/testplan.txt
@@ -1,3 +1,3 @@
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-policy/suite1
+policy/engine
diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh
index 2d31b9c4..d1ba20c2 100644
--- a/plans/policy/pap/setup.sh
+++ b/plans/policy/pap/setup.sh
@@ -27,10 +27,14 @@ docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml run --rm st
docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml up -d
sleep 3
+unset http_proxy https_proxy
+
POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
+POLICY_API_IP=`get-instance-ip.sh policy-api`
MARIADB_IP=`get-instance-ip.sh mariadb`
echo PAP IP IS ${POLICY_PAP_IP}
+echo API IP IS ${POLICY_API_IP}
echo MARIADB IP IS ${MARIADB_IP}
# Wait for initialization
for i in {1..10}; do
@@ -43,9 +47,29 @@ for i in {1..10}; do
echo sleep $i
sleep $i
done
+for i in {1..10}; do
+ curl -sS ${POLICY_API_IP}:6969 && break
+ echo sleep $i
+ sleep $i
+done
#Configure the database
docker exec -it mariadb chmod +x /docker-entrypoint-initdb.d/db.sh
docker exec -it mariadb /docker-entrypoint-initdb.d/db.sh
+#Add policy type and policy to the database via the Policy Api
+AUTH="healthcheck:zb!XztG34"
+CONTYPE="Content-Type: application/json"
+URL=https://${POLICY_API_IP}:6969/policy/api/v1/policytypes
+CONFIGDIR=${WORKSPACE}/scripts/policy/config/pap
+POLTYPE=onap.policies.monitoring.cdap.tca.hi.lo.app
+
+SRCFILE=${CONFIGDIR}/${POLTYPE}.json
+curl -sS -k --user "${AUTH}" -H "${CONTYPE}" -d @${SRCFILE} $URL
+
+URL2=${URL}/${POLTYPE}/versions/1.0.0/policies
+SRCFILE=${CONFIGDIR}/vCPE.policy.monitoring.input.tosca.json
+curl -sS -k --user "${AUTH}" -H "${CONTYPE}" -d @${SRCFILE} $URL2
+
+
ROBOT_VARIABLES="-v POLICY_PAP_IP:${POLICY_PAP_IP}"
diff --git a/plans/policy/pap/teardown.sh b/plans/policy/pap/teardown.sh
index 87986979..f05d3af9 100644
--- a/plans/policy/pap/teardown.sh
+++ b/plans/policy/pap/teardown.sh
@@ -18,5 +18,6 @@
# ============LICENSE_END=========================================================
kill-instance.sh policy-pap
+kill-instance.sh policy-api
kill-instance.sh mariadb
kill-instance.sh policy-wait
diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
index 28be1842..22dd8ae3 100755
--- a/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
+++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/setup.sh
@@ -75,5 +75,11 @@ for i in {1..10}; do
sleep $i
done
+docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/mgr/pub/config/config.py ./
+cat config.py
+
+docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/logs/runtime_mgr.log ./
+cat runtime_mgr.log
+
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFMGR_IP:${VNFMGR_IP} -v SCRIPTS:${SCRIPTS}"
diff --git a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh
index 8ca66766..cce8998b 100755
--- a/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh
+++ b/plans/vfc-gvnfm-vnfmgr/sanity-check/teardown.sh
@@ -15,6 +15,10 @@
# limitations under the License.
#
+# print log for vnfmgr
+docker cp vfc-vnfmgr:/service/vfc/gvnfm/vnfmgr/mgr/logs/runtime_mgr.log ./
+cat runtime_mgr.log
+
# This script is sourced by run-csit.sh after Robot test completion.
kill-instance.sh msb_internal_apigateway
kill-instance.sh msb_discovery
diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
index 34be3c21..11b86c78 100755
--- a/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
+++ b/plans/vfc-gvnfm-vnfres/sanity-check/setup.sh
@@ -75,5 +75,11 @@ for i in {1..10}; do
sleep $i
done
+docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/res/pub/config/config.py ./
+cat config.py
+
+docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/logs/runtime_res.log ./
+cat runtime_res.log
+
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v VNFRES_IP:${VNFRES_IP} -v SCRIPTS:${SCRIPTS}"
diff --git a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh
index 8ca66766..4bc59849 100755
--- a/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh
+++ b/plans/vfc-gvnfm-vnfres/sanity-check/teardown.sh
@@ -15,6 +15,10 @@
# limitations under the License.
#
+# print log for vnfres
+docker cp vfc-vnfres:/service/vfc/gvnfm/vnfres/res/logs/runtime_res.log ./
+cat runtime_res.log
+
# This script is sourced by run-csit.sh after Robot test completion.
kill-instance.sh msb_internal_apigateway
kill-instance.sh msb_discovery
diff --git a/plans/vfc-nfvo-catalog/sanity-check/setup.sh b/plans/vfc-nfvo-catalog/sanity-check/setup.sh
index d839fa55..e6221731 100644
--- a/plans/vfc-nfvo-catalog/sanity-check/setup.sh
+++ b/plans/vfc-nfvo-catalog/sanity-check/setup.sh
@@ -64,5 +64,8 @@ for i in {1..10}; do
sleep $i
done
+docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./
+cat runtime_catalog.log
+
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v MSB_IP:${MSB_IP} -v CATALOG_IP:${CATALOG_IP} -v MSB_DISCOVERY_IP:${DISCOVERY_IP}"
diff --git a/plans/vfc-nfvo-catalog/sanity-check/teardown.sh b/plans/vfc-nfvo-catalog/sanity-check/teardown.sh
index d498e34c..cfccb3ff 100644
--- a/plans/vfc-nfvo-catalog/sanity-check/teardown.sh
+++ b/plans/vfc-nfvo-catalog/sanity-check/teardown.sh
@@ -15,6 +15,10 @@
# limitations under the License.
#
+# print log file for catalog
+docker cp vfc-catalog:/service/vfc/nfvo/catalog/logs/runtime_catalog.log ./
+cat runtime_catalog.log
+
# This script is sourced by run-csit.sh after Robot test completion.
kill-instance.sh msb_internal_apigateway
kill-instance.sh msb_discovery
diff --git a/plans/vfc-nfvo-lcm/sanity-check/setup.sh b/plans/vfc-nfvo-lcm/sanity-check/setup.sh
index 7a739bad..c206c0b0 100755
--- a/plans/vfc-nfvo-lcm/sanity-check/setup.sh
+++ b/plans/vfc-nfvo-lcm/sanity-check/setup.sh
@@ -50,11 +50,11 @@ for i in {1..3}; do
sleep $i
done
-docker ps > 1.txt
-cat 1.txt
+docker ps > ps.txt
+cat ps.txt
echo "****************************"
-docker logs -f vfc-db > 2.txt &
-cat 2.txt
+docker logs -f vfc-db > db.txt &
+cat db.txt
# Need some time so service info can be synced from discovery to api gateway
echo sleep 60
@@ -71,15 +71,11 @@ for i in {1..10}; do
sleep $i
done
-curl http://${NSLCM_IP}:8403/api/nslcm/v1/swagger.json
-
-docker logs -f vfc-nslcm > 3.txt &
-cat 3.txt
+docker logs -f vfc-nslcm > dockerlogs.txt &
+cat dockerlogs.txt
docker cp vfc-nslcm:/service/vfc/nfvo/lcm/logs/runtime_lcm.log ./
cat runtime_lcm.log
-
-
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v MSB_IAG_IP:${MSB_IAG_IP} -v NSLCM_IP:${NSLCM_IP} -v SCRIPTS:${SCRIPTS}"
diff --git a/plans/vfc-nfvo-lcm/sanity-check/teardown.sh b/plans/vfc-nfvo-lcm/sanity-check/teardown.sh
index 6ddf7557..5fa01069 100755
--- a/plans/vfc-nfvo-lcm/sanity-check/teardown.sh
+++ b/plans/vfc-nfvo-lcm/sanity-check/teardown.sh
@@ -15,6 +15,10 @@
# limitations under the License.
#
+# print logs of lcm
+docker cp vfc-nslcm:/service/vfc/nfvo/lcm/logs/runtime_lcm.log ./
+cat runtime_lcm.log
+
# This script is sourced by run-csit.sh after Robot test completion.
kill-instance.sh msb_internal_apigateway
kill-instance.sh msb_discovery
diff --git a/scripts/policy/config/drools/base.conf b/scripts/policy/config/drools/base.conf
new file mode 100644
index 00000000..d3164cb5
--- /dev/null
+++ b/scripts/policy/config/drools/base.conf
@@ -0,0 +1,119 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+# ============LICENSE_END=========================================================
+
+# JVM options
+
+JVM_OPTIONS=-server -Xms512m -Xmx512m
+
+# SYSTEM software configuration
+
+POLICY_HOME=/opt/app/policy
+POLICY_LOGS=/var/log/onap/policy/pdpd
+JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+KEYSTORE_PASSWD=Pol1cy_0nap
+TRUSTSTORE_PASSWD=Pol1cy_0nap
+
+# Telemetry credentials
+
+TELEMETRY_PORT=9696
+TELEMETRY_HOST=0.0.0.0
+TELEMETRY_USER=demo@people.osaaf.org
+TELEMETRY_PASSWORD=demo123456!
+
+# nexus repository
+
+SNAPSHOT_REPOSITORY_ID=
+SNAPSHOT_REPOSITORY_URL=
+RELEASE_REPOSITORY_ID=
+RELEASE_REPOSITORY_URL=
+REPOSITORY_USERNAME=
+REPOSITORY_PASSWORD=
+
+# Relational (SQL) DB access
+
+SQL_HOST=
+SQL_USER=
+SQL_PASSWORD=
+
+# AAF
+
+AAF=false
+AAF_NAMESPACE=org.onap.policy
+AAF_HOST=aaf.api.simpledemo.onap.org
+
+# PDP-D DMaaP configuration channel
+
+PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
+PDPD_CONFIGURATION_CONSUMER_GROUP=
+PDPD_CONFIGURATION_CONSUMER_INSTANCE=
+PDPD_CONFIGURATION_PARTITION_KEY=
+
+# PAP-PDP configuration channel
+
+POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
+
+# PAP
+
+PAP_HOST=pap
+PAP_USERNAME=testpap
+PAP_PASSWORD=alpha123
+
+# PDP-X
+
+PDP_HOST=pdp
+PDP_USERNAME=testpdp
+PDP_PASSWORD=alpha123
+PDP_CLIENT_USERNAME=python
+PDP_CLIENT_PASSWORD=test
+PDP_ENVIRONMENT=TEST
+
+# DCAE DMaaP
+
+DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
+DCAE_SERVERS=mr.api.simpledemo.onap.org
+DCAE_CONSUMER_GROUP=dcae.policy.shared
+
+# Open DMaaP
+
+DMAAP_SERVERS=mr.api.simpledemo.onap.org
+
+# AAI
+
+AAI_URL=https://aai.api.simpledemo.onap.org:8443
+AAI_USERNAME=policy@policy.onap.org
+AAI_PASSWORD=demo123456!
+
+# MSO
+
+SO_URL=http://vm1.mso.simpledemo.onap.org:8080/onap/so/infra
+SO_USERNAME=InfraPortalClient
+SO_PASSWORD=password1$
+
+# VFC
+
+VFC_URL=
+VFC_USERNAME=
+VFC_PASSWORD=
+
+# SDNC
+
+SDNC_URL=
+SDNC_USERNAME=
+SDNC_PASSWORD=
diff --git a/scripts/policy/config/drools/feature-healthcheck.conf b/scripts/policy/config/drools/feature-healthcheck.conf
new file mode 100644
index 00000000..c205e9f7
--- /dev/null
+++ b/scripts/policy/config/drools/feature-healthcheck.conf
@@ -0,0 +1,18 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+# ============LICENSE_END=========================================================
+
+HEALTHCHECK_USER=demo@people.osaaf.org
+HEALTHCHECK_PASSWORD=demo123456!
diff --git a/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json b/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json
new file mode 100644
index 00000000..1d1a4d64
--- /dev/null
+++ b/scripts/policy/config/pap/onap.policies.monitoring.cdap.tca.hi.lo.app.json
@@ -0,0 +1,223 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "policy_types": [
+ {
+ "onap.policies.Monitoring": {
+ "derived_from": "tosca.policies.Root",
+ "description": "a base policy type for all policies that governs monitoring provisioning"
+ }
+ },
+ {
+ "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+ "derived_from": "onap.policies.Monitoring",
+ "version": "1.0.0",
+ "properties": {
+ "tca_policy": {
+ "type": "map",
+ "description": "TCA Policy JSON",
+ "entry_schema": {
+ "type": "onap.datatypes.monitoring.tca_policy"
+ }
+ }
+ }
+ }
+ }
+ ],
+ "data_types": [
+ {
+ "onap.datatypes.monitoring.metricsPerEventName": {
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "controlLoopSchemaType": {
+ "type": "string",
+ "required": true,
+ "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+ "constraints": [
+ {
+ "valid_values": [
+ "VM",
+ "VNF"
+ ]
+ }
+ ]
+ },
+ "eventName": {
+ "type": "string",
+ "required": true,
+ "description": "Event name to which thresholds need to be applied"
+ },
+ "policyName": {
+ "type": "string",
+ "required": true,
+ "description": "TCA Policy Scope Name"
+ },
+ "policyScope": {
+ "type": "string",
+ "required": true,
+ "description": "TCA Policy Scope"
+ },
+ "policyVersion": {
+ "type": "string",
+ "required": true,
+ "description": "TCA Policy Scope Version"
+ },
+ "thresholds": {
+ "type": "list",
+ "required": true,
+ "description": "Thresholds associated with eventName",
+ "entry_schema": {
+ "type": "onap.datatypes.monitoring.thresholds"
+ }
+ }
+ }
+ }
+ },
+ {
+ "onap.datatypes.monitoring.tca_policy": {
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "domain": {
+ "type": "string",
+ "required": true,
+ "description": "Domain name to which TCA needs to be applied",
+ "default": "measurementsForVfScaling",
+ "constraints": [
+ {
+ "equal": "measurementsForVfScaling"
+ }
+ ]
+ },
+ "metricsPerEventName": {
+ "type": "list",
+ "required": true,
+ "description": "Contains eventName and threshold details that need to be applied to given eventName",
+ "entry_schema": {
+ "type": "onap.datatypes.monitoring.metricsPerEventName"
+ }
+ }
+ }
+ }
+ },
+ {
+ "onap.datatypes.monitoring.thresholds": {
+ "derived_from": "tosca.datatypes.Root",
+ "properties": {
+ "closedLoopControlName": {
+ "type": "string",
+ "required": true,
+ "description": "Closed Loop Control Name associated with the threshold"
+ },
+ "closedLoopEventStatus": {
+ "type": "string",
+ "required": true,
+ "description": "Closed Loop Event Status of the threshold",
+ "constraints": [
+ {
+ "valid_values": [
+ "ONSET",
+ "ABATED"
+ ]
+ }
+ ]
+ },
+ "direction": {
+ "type": "string",
+ "required": true,
+ "description": "Direction of the threshold",
+ "constraints": [
+ {
+ "valid_values": [
+ "LESS",
+ "LESS_OR_EQUAL",
+ "GREATER",
+ "GREATER_OR_EQUAL",
+ "EQUAL"
+ ]
+ }
+ ]
+ },
+ "fieldPath": {
+ "type": "string",
+ "required": true,
+ "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
+ "constraints": [
+ {
+ "valid_values": [
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+ "$.event.measurementsForVfScalingFields.meanRequestLatency",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+ ]
+ }
+ ]
+ },
+ "severity": {
+ "type": "string",
+ "required": true,
+ "description": "Threshold Event Severity",
+ "constraints": [
+ {
+ "valid_values": [
+ "CRITICAL",
+ "MAJOR",
+ "MINOR",
+ "WARNING",
+ "NORMAL"
+ ]
+ }
+ ]
+ },
+ "thresholdValue": {
+ "type": "integer",
+ "required": true,
+ "description": "Threshold value for the field Path inside CEF message"
+ },
+ "version": {
+ "type": "string",
+ "required": true,
+ "description": "Version number associated with the threshold"
+ }
+ }
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json b/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json
new file mode 100644
index 00000000..fac5cfad
--- /dev/null
+++ b/scripts/policy/config/pap/vCPE.policy.monitoring.input.tosca.json
@@ -0,0 +1,51 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "topology_template": {
+ "policies": [
+ {
+ "onap.restart.tca": {
+ "type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "onap.restart.tca"
+ },
+ "properties": {
+ "tca_policy": {
+ "domain": "measurementsForVfScaling",
+ "metricsPerEventName": [
+ {
+ "eventName": "Measurement_vGMUX",
+ "controlLoopSchemaType": "VNF",
+ "policyScope": "DCAE",
+ "policyName": "DCAE.Config_tca-hi-lo",
+ "policyVersion": "v0.0.1",
+ "thresholds": [
+ {
+ "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+ "thresholdValue": 0,
+ "direction": "EQUAL",
+ "severity": "MAJOR",
+ "closedLoopEventStatus": "ABATED"
+ },
+ {
+ "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
+ "version": "1.0.2",
+ "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
+ "thresholdValue": 0,
+ "direction": "GREATER",
+ "severity": "CRITICAL",
+ "closedLoopEventStatus": "ONSET"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/scripts/policy/docker-compose-drools-apps.yml b/scripts/policy/docker-compose-drools-apps.yml
new file mode 100644
index 00000000..a42c2996
--- /dev/null
+++ b/scripts/policy/docker-compose-drools-apps.yml
@@ -0,0 +1,47 @@
+# Copyright 2019 AT&T Intellectual Property. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file:
+ - ${WORKSPACE}/scripts/policy/config/db/db.conf
+ volumes:
+ - ${WORKSPACE}/scripts/policy/config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ drools:
+ image: nexus3.onap.org:10001/onap/policy-pdpd-cl:1.4-SNAPSHOT-latest
+ container_name: drools
+ depends_on:
+ - mariadb
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ${WORKSPACE}/scripts/policy/config/drools:/tmp/policy-install/config
+ environment:
+ - DEBUG=y
+ start_dependencies:
+ image: dadarek/wait-for-dependencies
+ container_name: policy-wait
+ depends_on:
+ - mariadb
+ hostname: policy-wait
+ command: mariadb:3306
+
diff --git a/scripts/policy/docker-compose-drools.yml b/scripts/policy/docker-compose-drools.yml
new file mode 100644
index 00000000..ffee9cdc
--- /dev/null
+++ b/scripts/policy/docker-compose-drools.yml
@@ -0,0 +1,55 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file: config/db/db.conf
+ volumes:
+ - ./config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ nexus:
+ image: sonatype/nexus:2.14.8-01
+ container_name: nexus
+ hostname: nexus
+ pap:
+ image: onap/policy-pe
+ environment:
+ - PRELOAD_POLICIES=${PRELOAD_POLICIES}
+ container_name: pap
+ depends_on:
+ - mariadb
+ hostname: pap
+ expose:
+ - 8443
+ - 9091
+ command: pap
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ drools:
+ image: onap/policy-drools
+ container_name: drools
+ depends_on:
+ - mariadb
+ - nexus
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools:/tmp/policy-install/config
diff --git a/scripts/policy/docker-compose-engine.yml b/scripts/policy/docker-compose-engine.yml
new file mode 100644
index 00000000..e67729e2
--- /dev/null
+++ b/scripts/policy/docker-compose-engine.yml
@@ -0,0 +1,75 @@
+# Copyright 2018 AT&T Intellectual Property. All rights reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# 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.
+version: '2'
+services:
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file: config/db/db.conf
+ volumes:
+ - ./config/db:/docker-entrypoint-initdb.d
+ expose:
+ - 3306
+ nexus:
+ image: sonatype/nexus:2.14.8-01
+ container_name: nexus
+ hostname: nexus
+ pap:
+ image: onap/policy-pe
+ environment:
+ - PRELOAD_POLICIES=${PRELOAD_POLICIES}
+ container_name: pap
+ depends_on:
+ - mariadb
+ hostname: pap
+ expose:
+ - 8443
+ - 9091
+ command: pap
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ pdp:
+ image: onap/policy-pe
+ container_name: pdp
+ depends_on:
+ - pap
+ hostname: pdp
+ expose:
+ - 8081
+ command: pdp
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ brmsgw:
+ image: onap/policy-pe
+ container_name: brmsgw
+ depends_on:
+ - pap
+ hostname: brmsgw
+ command: brmsgw
+ volumes:
+ - ./config/pe:/tmp/policy-install/config
+ drools:
+ image: onap/policy-drools
+ container_name: drools
+ depends_on:
+ - mariadb
+ - nexus
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools:/tmp/policy-install/config
diff --git a/scripts/policy/docker-compose-pap.yml b/scripts/policy/docker-compose-pap.yml
index c5ff9cfb..115f8840 100644
--- a/scripts/policy/docker-compose-pap.yml
+++ b/scripts/policy/docker-compose-pap.yml
@@ -34,6 +34,14 @@ services:
hostname: policy-pap
ports:
- "6969:6969"
+ api:
+ image: nexus3.onap.org:10001/onap/policy-api
+ container_name: policy-api
+ depends_on:
+ - mariadb
+ hostname: policy-api
+ ports:
+ - "9969:6969"
start_dependencies:
image: dadarek/wait-for-dependencies
container_name: policy-wait
diff --git a/scripts/policy/script1.sh b/scripts/policy/engine.sh
index c47c4bf8..b806cec5 100755
--- a/scripts/policy/script1.sh
+++ b/scripts/policy/engine.sh
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-echo "This is ${WORKSPACE}/scripts/policy/script1.sh"
+echo "This is ${WORKSPACE}/scripts/policy/engine.sh"
# the directory of the script
diff --git a/tests/modeling-toscaparsers-genericparser/test.robot b/tests/modeling-toscaparsers-genericparser/test.robot
new file mode 100644
index 00000000..b83bee47
--- /dev/null
+++ b/tests/modeling-toscaparsers-genericparser/test.robot
@@ -0,0 +1,31 @@
+*** settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Variables ***
+@{return_ok_list}= 200 201 202
+${queryswagger_url} /api/catalog/v1/swagger.json
+${queryVNFPackage_url} /api/catalog/v1/vnfpackages
+${queryNSPackages_url} /api/catalog/v1/nspackages
+${healthcheck_url} /api/catalog/v1/health_check
+
+*** Test Cases ***
+GetVNFPackages
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ ${resp}= Get Request web_session ${queryVNFPackage_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+
+CatalogHealthCheckTest
+ [Documentation] check health for catalog by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${CATALOG_IP}:8806 headers=${headers}
+ ${resp}= Get Request web_session ${healthcheck_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}
+ ${response_json} json.loads ${resp.content}
+ ${health_status}= Convert To String ${response_json['status']}
+ Should Be Equal ${health_status} active
diff --git a/tests/policy/drools-applications/drools-applications-test.robot b/tests/policy/drools-applications/drools-applications-test.robot
new file mode 100644
index 00000000..cf4d3cea
--- /dev/null
+++ b/tests/policy/drools-applications/drools-applications-test.robot
@@ -0,0 +1,17 @@
+*** Settings ***
+Library Collections
+Library RequestsLibrary
+Library OperatingSystem
+Library json
+
+*** Test Cases ***
+Alive
+ [Documentation] Runs Policy PDP Alive Check
+ ${auth}= Create List demo@people.osaaf.org demo123456!
+ Log Creating session https://${POLICY_DROOLS_IP}:9696
+ ${session}= Create Session policy https://${POLICY_DROOLS_IP}:9696 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pdp/engine headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['alive']} True
diff --git a/tests/policy/suite1/Policy-CSIT.robot b/tests/policy/engine/Policy-CSIT.robot
index 514cc840..514cc840 100644
--- a/tests/policy/suite1/Policy-CSIT.robot
+++ b/tests/policy/engine/Policy-CSIT.robot
diff --git a/tests/policy/suite1/__init__.robot b/tests/policy/engine/__init__.robot
index c7970e6a..c7970e6a 100644
--- a/tests/policy/suite1/__init__.robot
+++ b/tests/policy/engine/__init__.robot
diff --git a/tests/policy/suite1/configpolicy_vCPE.template b/tests/policy/engine/configpolicy_vCPE.template
index e3e3a2d0..e3e3a2d0 100644
--- a/tests/policy/suite1/configpolicy_vCPE.template
+++ b/tests/policy/engine/configpolicy_vCPE.template
diff --git a/tests/policy/suite1/configpolicy_vCPE_R1.template b/tests/policy/engine/configpolicy_vCPE_R1.template
index 77653c3f..77653c3f 100644
--- a/tests/policy/suite1/configpolicy_vCPE_R1.template
+++ b/tests/policy/engine/configpolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/configpolicy_vDNS.template b/tests/policy/engine/configpolicy_vDNS.template
index ab1d2e0d..ab1d2e0d 100644
--- a/tests/policy/suite1/configpolicy_vDNS.template
+++ b/tests/policy/engine/configpolicy_vDNS.template
diff --git a/tests/policy/suite1/configpolicy_vDNS_R1.template b/tests/policy/engine/configpolicy_vDNS_R1.template
index 185a7c72..185a7c72 100644
--- a/tests/policy/suite1/configpolicy_vDNS_R1.template
+++ b/tests/policy/engine/configpolicy_vDNS_R1.template
diff --git a/tests/policy/suite1/configpolicy_vFW.template b/tests/policy/engine/configpolicy_vFW.template
index 39e99e7b..39e99e7b 100644
--- a/tests/policy/suite1/configpolicy_vFW.template
+++ b/tests/policy/engine/configpolicy_vFW.template
diff --git a/tests/policy/suite1/configpolicy_vFW_R1.template b/tests/policy/engine/configpolicy_vFW_R1.template
index 067ed07f..067ed07f 100644
--- a/tests/policy/suite1/configpolicy_vFW_R1.template
+++ b/tests/policy/engine/configpolicy_vFW_R1.template
diff --git a/tests/policy/suite1/createpolicy.template b/tests/policy/engine/createpolicy.template
index 7c693e84..7c693e84 100644
--- a/tests/policy/suite1/createpolicy.template
+++ b/tests/policy/engine/createpolicy.template
diff --git a/tests/policy/suite1/deletepolicy.template b/tests/policy/engine/deletepolicy.template
index 55510102..55510102 100644
--- a/tests/policy/suite1/deletepolicy.template
+++ b/tests/policy/engine/deletepolicy.template
diff --git a/tests/policy/suite1/getconfigpolicy.template b/tests/policy/engine/getconfigpolicy.template
index 611e65d0..611e65d0 100644
--- a/tests/policy/suite1/getconfigpolicy.template
+++ b/tests/policy/engine/getconfigpolicy.template
diff --git a/tests/policy/suite1/getoofpolicy.template b/tests/policy/engine/getoofpolicy.template
index 37fe0471..37fe0471 100644
--- a/tests/policy/suite1/getoofpolicy.template
+++ b/tests/policy/engine/getoofpolicy.template
diff --git a/tests/policy/suite1/global_properties.robot b/tests/policy/engine/global_properties.robot
index e0c816ea..e0c816ea 100644
--- a/tests/policy/suite1/global_properties.robot
+++ b/tests/policy/engine/global_properties.robot
diff --git a/tests/policy/suite1/json_templater.robot b/tests/policy/engine/json_templater.robot
index a1cc7e35..a1cc7e35 100644
--- a/tests/policy/suite1/json_templater.robot
+++ b/tests/policy/engine/json_templater.robot
diff --git a/tests/policy/suite1/listpolicy.template b/tests/policy/engine/listpolicy.template
index aef17a23..aef17a23 100644
--- a/tests/policy/suite1/listpolicy.template
+++ b/tests/policy/engine/listpolicy.template
diff --git a/tests/policy/suite1/multiple_pushpolicy.template b/tests/policy/engine/multiple_pushpolicy.template
index 5f20b647..5f20b647 100644
--- a/tests/policy/suite1/multiple_pushpolicy.template
+++ b/tests/policy/engine/multiple_pushpolicy.template
diff --git a/tests/policy/suite1/multiple_unpushpolicy.template b/tests/policy/engine/multiple_unpushpolicy.template
index afee7aeb..afee7aeb 100644
--- a/tests/policy/suite1/multiple_unpushpolicy.template
+++ b/tests/policy/engine/multiple_unpushpolicy.template
diff --git a/tests/policy/suite1/oofpolicy_HPA_R1.template b/tests/policy/engine/oofpolicy_HPA_R1.template
index 3a170b20..3a170b20 100644
--- a/tests/policy/suite1/oofpolicy_HPA_R1.template
+++ b/tests/policy/engine/oofpolicy_HPA_R1.template
diff --git a/tests/policy/suite1/opspolicy_VDNS.template b/tests/policy/engine/opspolicy_VDNS.template
index 801773d5..801773d5 100644
--- a/tests/policy/suite1/opspolicy_VDNS.template
+++ b/tests/policy/engine/opspolicy_VDNS.template
diff --git a/tests/policy/suite1/opspolicy_VDNS_R1.template b/tests/policy/engine/opspolicy_VDNS_R1.template
index 92627cc2..92627cc2 100644
--- a/tests/policy/suite1/opspolicy_VDNS_R1.template
+++ b/tests/policy/engine/opspolicy_VDNS_R1.template
diff --git a/tests/policy/suite1/opspolicy_VFW.template b/tests/policy/engine/opspolicy_VFW.template
index 224f5cf4..224f5cf4 100644
--- a/tests/policy/suite1/opspolicy_VFW.template
+++ b/tests/policy/engine/opspolicy_VFW.template
diff --git a/tests/policy/suite1/opspolicy_VFW_R1.template b/tests/policy/engine/opspolicy_VFW_R1.template
index a93063f7..a93063f7 100644
--- a/tests/policy/suite1/opspolicy_VFW_R1.template
+++ b/tests/policy/engine/opspolicy_VFW_R1.template
diff --git a/tests/policy/suite1/opspolicy_vCPE.template b/tests/policy/engine/opspolicy_vCPE.template
index c17a1bc6..c17a1bc6 100644
--- a/tests/policy/suite1/opspolicy_vCPE.template
+++ b/tests/policy/engine/opspolicy_vCPE.template
diff --git a/tests/policy/suite1/opspolicy_vCPE_R1.template b/tests/policy/engine/opspolicy_vCPE_R1.template
index 36695daa..36695daa 100644
--- a/tests/policy/suite1/opspolicy_vCPE_R1.template
+++ b/tests/policy/engine/opspolicy_vCPE_R1.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE.template b/tests/policy/engine/opspolicy_vOLTE.template
index e43a3e6f..e43a3e6f 100644
--- a/tests/policy/suite1/opspolicy_vOLTE.template
+++ b/tests/policy/engine/opspolicy_vOLTE.template
diff --git a/tests/policy/suite1/opspolicy_vOLTE_R1.template b/tests/policy/engine/opspolicy_vOLTE_R1.template
index ff5fc42c..ff5fc42c 100644
--- a/tests/policy/suite1/opspolicy_vOLTE_R1.template
+++ b/tests/policy/engine/opspolicy_vOLTE_R1.template
diff --git a/tests/policy/suite1/policy_interface.robot b/tests/policy/engine/policy_interface.robot
index 745f7817..745f7817 100644
--- a/tests/policy/suite1/policy_interface.robot
+++ b/tests/policy/engine/policy_interface.robot
diff --git a/tests/policy/suite1/pushpolicy.template b/tests/policy/engine/pushpolicy.template
index 7e236e3d..7e236e3d 100644
--- a/tests/policy/suite1/pushpolicy.template
+++ b/tests/policy/engine/pushpolicy.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vFW.template b/tests/policy/engine/sdncnamingpolicy_vFW.template
index d9c773d1..d9c773d1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vFW.template
+++ b/tests/policy/engine/sdncnamingpolicy_vFW.template
diff --git a/tests/policy/suite1/sdncnamingpolicy_vPG.template b/tests/policy/engine/sdncnamingpolicy_vPG.template
index 9bae20a1..9bae20a1 100644
--- a/tests/policy/suite1/sdncnamingpolicy_vPG.template
+++ b/tests/policy/engine/sdncnamingpolicy_vPG.template
diff --git a/tests/policy/pap/data/create.group.request.json b/tests/policy/pap/data/create.group.request.json
new file mode 100644
index 00000000..b0937f7f
--- /dev/null
+++ b/tests/policy/pap/data/create.group.request.json
@@ -0,0 +1,42 @@
+{
+ "groups": [
+ {
+ "name": "create.group.request",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "hello": "world"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "desiredInstanceCount": 2,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "onap.restart.tca",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ {
+ "pdpType": "pdpTypeB",
+ "desiredInstanceCount": 1,
+ "properties": {},
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
index d187d8fc..0a6251de 100644
--- a/tests/policy/pap/pap-test.robot
+++ b/tests/policy/pap/pap-test.robot
@@ -26,3 +26,92 @@ Statistics
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['code']} 200
+
+CreatePdpGroups
+ [Documentation] Runs Policy PAP Create PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${postjson}= Get file ${CURDIR}/data/create.group.request.json
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy /policy/pap/v1/pdps data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+ActivatePdpGroup
+ [Documentation] Runs Policy PAP Change PDP Group State to ACTIVE
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Put Request policy /policy/pap/v1/pdps/groups/create.group.request?state=ACTIVE headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroups
+ [Documentation] Runs Policy PAP Query PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][0]['name']} controlloop
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} create.group.request
+ Should Be Equal As Strings ${resp.json()['groups'][1]['pdpGroupState']} ACTIVE
+ Should Be Equal As Strings ${resp.json()['groups'][2]['name']} monitoring
+
+UndeployPolicy
+ [Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/pap/v1/pdps/policies/onap.restart.tca headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroupsAfterUndeploy
+ [Documentation] Runs Policy PAP Query PDP Groups after Undeploy
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} create.group.request
+ Should Be Equal As Strings ${resp.json()['groups'][1]['pdpSubgroups'][0]['policies']} []
+
+DeactivatePdpGroup
+ [Documentation] Runs Policy PAP Change PDP Group State to PASSIVE
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Put Request policy /policy/pap/v1/pdps/groups/create.group.request?state=PASSIVE headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+DeletePdpGroups
+ [Documentation] Runs Policy PAP Delete PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/pap/v1/pdps/groups/create.group.request headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+QueryPdpGroupsAfterDelete
+ [Documentation] Runs Policy PAP Query PDP Groups after Delete
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request policy /policy/pap/v1/pdps headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.json()['groups'][0]['name']} controlloop
+ Should Be Equal As Strings ${resp.json()['groups'][1]['name']} monitoring
diff --git a/tests/vfc/nfvo-lcm/test.robot b/tests/vfc/nfvo-lcm/test.robot
index 833e24bb..83040ade 100644
--- a/tests/vfc/nfvo-lcm/test.robot
+++ b/tests/vfc/nfvo-lcm/test.robot
@@ -12,6 +12,7 @@ ${queryswagger_url} /api/nslcm/v1/swagger.json
${create_ns_url} /api/nslcm/v1/ns
${delete_ns_url} /api/nslcm/v1/ns
${get_ns_url} /api/nslcm/v1/ns
+${get_subscriptions_url} /api/nslcm/v1/subscriptions
${healthcheck_url} /api/nslcm/v1/health_check
#json files
@@ -83,3 +84,11 @@ LcmGetNsTest
${resp}= Get Request web_session ${get_ns_url}
${responese_code}= Convert To String ${resp.status_code}
List Should Contain Value ${return_ok_list} ${responese_code}
+
+LcmGetSubscriptionsTest
+ [Documentation] get subscriptions for nslcm by MSB
+ ${headers} Create Dictionary Content-Type=application/json Accept=application/json
+ Create Session web_session http://${MSB_IAG_IP}:80 headers=${headers}
+ ${resp}= Get Request web_session ${get_subscriptions_url}
+ ${responese_code}= Convert To String ${resp.status_code}
+ List Should Contain Value ${return_ok_list} ${responese_code}