aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--INFO.yaml37
-rw-r--r--plans/aaf/aafapi/setup.sh18
-rwxr-xr-xplans/dcaegen2-collectors-restconf/testsuites/setup.sh13
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/addFeed3.txt44
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.txt35
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/node.properties87
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/assets/provserver.properties60
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml67
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml14
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/docker-compose.yml117
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/setup.sh173
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/teardown.sh13
-rwxr-xr-xplans/dcaegen2/testsuites/setup.sh5
-rw-r--r--plans/policy/apex-pdp/setup.sh36
-rw-r--r--plans/policy/api/setup.sh4
-rw-r--r--plans/policy/distribution/setup.sh40
-rwxr-xr-xplans/policy/drools-applications/setup.sh6
-rw-r--r--plans/policy/pap/setup.sh6
-rw-r--r--plans/policy/xacml-pdp/setup.sh39
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/aai-simulator/pom.xml16
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/pom.xml31
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java5
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java20
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/test/java/org/onap/so/sdncsimulator/controller/OperationsControllerTest.java19
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-api/pom.xml223
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/api/VeVnfmApi.java86
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/OperationProgressor.java7
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/util/PatternContainedChecker.java38
-rw-r--r--scripts/policy/config/drools/base.conf3
-rw-r--r--scripts/policy/config/policy-csit.conf1
-rw-r--r--scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csarbin93418 -> 94632 bytes
-rw-r--r--scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csarbin93418 -> 94632 bytes
-rw-r--r--scripts/policy/policy-models-dmaap-sim.sh35
-rwxr-xr-x[-rw-r--r--]scripts/policy/policy-xacml-pdp/config/db/db.sh6
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_library.robot2
-rw-r--r--tests/dcaegen2/testcases/assets/certs/outdated.crt24
-rw-r--r--tests/dcaegen2/testcases/assets/certs/outdated.key27
-rw-r--r--tests/dcaegen2/testcases/assets/certs/rootCA.crt31
-rw-r--r--tests/dcaegen2/testcases/assets/certs/rootCA.key54
-rw-r--r--tests/dcaegen2/testcases/assets/certs/wrong.crt32
-rw-r--r--tests/dcaegen2/testcases/assets/certs/wrong.key51
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json67
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json34
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json33
-rw-r--r--tests/dcaegen2/testcases/assets/json_events/ves7_valid.json34
-rw-r--r--tests/dcaegen2/testcases/dcae_ves.robot295
-rw-r--r--tests/dcaegen2/testcases/resources/CertsLibrary.py42
-rw-r--r--tests/dcaegen2/testcases/resources/DMaaP.py24
-rw-r--r--tests/dcaegen2/testcases/resources/DcaeLibrary.py7
-rwxr-xr-xtests/dcaegen2/testcases/resources/collector.properties65
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_keywords.robot102
-rw-r--r--tests/dcaegen2/testcases/resources/dcae_properties.robot52
-rwxr-xr-xtests/dcaegen2/testcases/resources/gen-certs.sh10
-rwxr-xr-xtests/dcaegen2/testcases/resources/rm-certs.sh6
-rwxr-xr-xtests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh10
-rw-r--r--tests/policy/apex-pdp/apex-pdp-test.robot2
-rw-r--r--tests/policy/apex-pdp/data/pdp_update.json102
-rw-r--r--tests/policy/api/api-test.robot100
-rw-r--r--tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json (renamed from tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.json)0
-rw-r--r--tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json209
-rw-r--r--tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json (renamed from tests/policy/api/data/vCPE.policy.monitoring.input.tosca.json)2
-rw-r--r--tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json51
-rw-r--r--tests/policy/pap/data/create.group.request.json7
-rw-r--r--tests/policy/pap/data/deploy.group.request.json19
-rw-r--r--tests/policy/pap/pap-test.robot13
-rw-r--r--tests/policy/xacml-pdp/xacml-pdp-test.robot15
67 files changed, 1987 insertions, 840 deletions
diff --git a/.gitattributes b/.gitattributes
index 6313b56c..21a4e0a7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,2 @@
* text=auto eol=lf
+*.csar -text
diff --git a/INFO.yaml b/INFO.yaml
index de20963f..063dcf0d 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -2,6 +2,7 @@
project: 'integration-csit'
project_creation_date: '2017-02-10'
lifecycle_state: 'Incubation'
+project_category: ''
project_lead: &onap_releng_ptl
name: 'Morgan Richomme'
email: 'morgan.richomme@orange.com'
@@ -13,16 +14,21 @@ issue_tracking:
type: 'jira'
url: 'https://jira.onap.org/projects/INT'
key: 'INT'
+mailing_list:
+ type: 'groups.io'
+ url: 'lists.onap.org'
+ tag: '<[sub-project_name]>'
+realtime_discussion: ''
meetings:
- type: 'zoom'
- agenda: 'https://wiki.onap.org/display/DW/Integration+Meeting+Minutes'
+ agenda: 'https://wiki.onap.org/pages/viewpage.action?pageId=6593670'
url: 'https://wiki.onap.org/pages/viewpage.action?pageId=6593670'
server: 'n/a'
channel: 'n/a'
repeats: 'weekly'
time: '14:00 UTC'
repositories:
- - 'csit'
+ - 'integration/csit'
committers:
- <<: *onap_releng_ptl
- name: 'Christophe Closset'
@@ -39,12 +45,12 @@ committers:
email: 'fu.jinhua@zte.com.cn'
company: 'ZTE'
id: 'fujinhua'
- timezone: 'China'
+ timezone: 'China/Beijing'
- name: 'Catherine Lefevre'
email: 'cl664y@att.com'
company: 'AT&T'
id: 'Katel34'
- timezone: 'Belgium'
+ timezone: 'Belgium/Namur'
- name: 'Marco Platania'
email: 'platania@research.att.com'
company: 'ATT'
@@ -55,19 +61,32 @@ committers:
company: 'AT&T'
id: 'bdfreeman1421'
timezone: 'America/New York'
- - name: 'Mariusz Wagner'
- email: 'mariusz.wagner@nokia.com'
- company: 'Nokia'
- id: 'mwagner9'
- timezone: 'Poland/Wroclaw'
- name: 'Morgan Richomme'
email: 'morgan.richomme@orange.com'
company: 'orange'
id: 'mrichomme'
timezone: 'France/Paris'
+ - name: 'Bartek Grzybowski'
+ email: 'b.grzybowski@partner.samsung.com'
+ company: 'samsung'
+ id: 'bgrzybowski'
+ timezone: 'Poland/Warsaw'
+ - name: 'Marcin Przybysz'
+ email: 'marcin.przybysz@nokia.com'
+ company: 'nokia'
+ id: 'mprzybys'
+ timezone: 'Poland/Warsaw'
+ - name: 'Eric Multanen'
+ email: 'eric.w.multanen@intel.com'
+ company: 'intel'
+ id: 'ewmulta'
+ timezone: 'America/Los_Angeles'
tsc:
approval: 'https://lists.onap.org/pipermail/onap-tsc'
changes:
- type: 'Addition'
name: 'Morgan Richomme'
link: 'https://wiki.onap.org/display/DW/TSC+2019-10-17'
+ - type: 'Addition'
+ name: 'Bartek, Marcin, Eric'
+ link: 'https://wiki.onap.org/display/DW/Integration+Team'
diff --git a/plans/aaf/aafapi/setup.sh b/plans/aaf/aafapi/setup.sh
index d618f534..d2b04433 100644
--- a/plans/aaf/aafapi/setup.sh
+++ b/plans/aaf/aafapi/setup.sh
@@ -91,15 +91,15 @@ if [ -z "$SKIP_PULL" ]; then
NEXUS_PASSWD=anonymous
echo "$NEXUS_PASSWD" | docker login -u $NEXUS_USERNAME --password-stdin $DOCKER_REPOSITORY
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-cass:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-config:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-cm:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-fs:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-gui:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-hello:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-locate:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-oauth:$AAF_DOCKER_VERSION
- docker pull $DOCKER_REPOSITORY/onap/aaf/aaf-service:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cass:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
+ docker pull $DOCKER_REPOSITORY/onap/aaf/aafservice:$AAF_DOCKER_VERSION
fi
# Cassandra Install/Start
cd ../auth-cass/docker
diff --git a/plans/dcaegen2-collectors-restconf/testsuites/setup.sh b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh
index c1b4f342..2b018172 100755
--- a/plans/dcaegen2-collectors-restconf/testsuites/setup.sh
+++ b/plans/dcaegen2-collectors-restconf/testsuites/setup.sh
@@ -2,14 +2,18 @@
#get current host IP addres
HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
-
+CONTAINER_NAME=rcc
RCC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:latest
echo RCC_IMAGE=${RCC_IMAGE}
+#get JAVA version
+echo java -version
+java -version
+
# Start DCAE Restconf Collector
-docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name rcc -e DMAAPHOST=${HOST_IP} ${RCC_IMAGE}
+docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name ${CONTAINER_NAME} -e DMAAPHOST=${HOST_IP} ${RCC_IMAGE}
-RCC_IP=`get-instance-ip.sh rcc`
+RCC_IP=`get-instance-ip.sh ${CONTAINER_NAME}`
export RCC_IP=${RCC_IP}
export HOST_IP=${HOST_IP}
@@ -19,3 +23,6 @@ pip install jsonschema uuid
# Wait container ready
sleep 5
+#get the docker log
+echo DOCKER LOG ${CONTAINER_NAME}
+docker logs ${CONTAINER_NAME} \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/addFeed3.txt b/plans/dcaegen2-pmmapper/pmmapper/assets/addFeed3.txt
new file mode 100644
index 00000000..60544d97
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/assets/addFeed3.txt
@@ -0,0 +1,44 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# * ===========================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * 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====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+{
+ "name": "Jettydemo",
+ "version": "m1.0",
+ "description": "Jettydemo",
+ "business_description": "Jettydemo",
+ "suspend": false,
+ "deleted": false,
+ "changeowner": true,
+ "authorization": {
+ "classification": "unclassified",
+ "endpoint_addrs": [
+ "<kafka-ip>",
+ ],
+ "endpoint_ids": [
+ {
+ "password": "rs873m",
+ "id": "rs873m"
+ }
+ ]
+ },
+}
+
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.txt b/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.txt
new file mode 100644
index 00000000..95cc2afb
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.txt
@@ -0,0 +1,35 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# * ===========================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * 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====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+{
+"delivery" :
+ {
+ "url" : "http://<kafka-ip>:7070/",
+ "user" : "datarouter",
+ "password" : "datarouter",
+ "use100" : true
+ },
+"metadataOnly" : false,
+"suspend" : false,
+"groupid" : 29,
+"subscriber" : "sg481n"
+}
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/node.properties b/plans/dcaegen2-pmmapper/pmmapper/assets/node.properties
new file mode 100644
index 00000000..ddd4ebc8
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/assets/node.properties
@@ -0,0 +1,87 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright � 2017 AT&T Intellectual Property. All rights reserved.
+# * ===========================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * 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====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+#
+# Configuration parameters set at startup for the DataRouter node
+#
+# URL to retrieve dynamic configuration
+ProvisioningURL = https://dmaap-dr-prov:8443/internal/prov
+#
+# URL to upload PUB/DEL/EXP logs
+LogUploadURL = https://dmaap-dr-prov:8443/internal/logs
+#
+# The port number for http as seen within the server
+IntHttpPort = 8080
+#
+# The port number for https as seen within the server
+IntHttpsPort = 8443
+#
+# The external port number for https taking port mapping into account
+ExtHttpsPort = 443
+#
+# The minimum interval between fetches of the dynamic configuration from the provisioning server
+MinProvFetchInterval = 10000
+#
+# The minimum interval between saves of the redirection data file
+MinRedirSaveInterval = 10000
+#
+# The path to the directory where log files are stored
+LogDir = /opt/app/datartr/logs
+#
+# The retention interval (in days) for log files
+LogRetention = 30
+#
+# The path to the directories where data and meta data files are stored
+SpoolDir = /opt/app/datartr/spool
+#
+# The path to the redirection data file
+RedirectionFile = etc/redirections.dat
+#
+# The type of keystore for https
+KeyStoreType = PKCS12
+#
+# The type of truststore for https
+TrustStoreType = jks
+#
+# The path to the file used to trigger an orderly shutdown
+QuiesceFile = etc/SHUTDOWN
+#
+# The key used to generate passwords for node to node transfers
+NodeAuthKey = Node123!
+#
+# DR_NODE DEFAULT ENABLED TLS PROTOCOLS
+NodeHttpsProtocols = TLSv1.1|TLSv1.2
+#
+# AAF type to generate permission string
+AAFType = org.onap.dmaap-dr.feed
+#
+# AAF default instance to generate permission string - default should be legacy
+AAFInstance = legacy
+#
+# AAF action to generate permission string - default should be publish
+AAFAction = publish
+#
+# AAF CADI enabled flag
+CadiEnabled = false
+#
+# AAF Props file path
+AAFPropsFilePath = /opt/app/osaaf/local/org.onap.dmaap-dr.props \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/assets/provserver.properties b/plans/dcaegen2-pmmapper/pmmapper/assets/provserver.properties
new file mode 100644
index 00000000..20b5cb92
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/assets/provserver.properties
@@ -0,0 +1,60 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START==================================================
+# * org.onap.dmaap
+# * ===========================================================================
+# * Copyright � 2017 AT&T Intellectual Property. All rights reserved.
+# * ===========================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License");
+# * you may not use this file except in compliance with the License.
+# * You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * 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====================================================
+# *
+# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+# *
+#-------------------------------------------------------------------------------
+
+#Jetty Server properties
+org.onap.dmaap.datarouter.provserver.http.port = 8080
+org.onap.dmaap.datarouter.provserver.https.port = 8443
+org.onap.dmaap.datarouter.provserver.https.relaxation = true
+
+org.onap.dmaap.datarouter.provserver.aafprops.path = /opt/app/osaaf/local/org.onap.dmaap-dr.props
+
+org.onap.dmaap.datarouter.provserver.accesslog.dir = /opt/app/datartr/logs
+org.onap.dmaap.datarouter.provserver.spooldir = /opt/app/datartr/spool
+org.onap.dmaap.datarouter.provserver.dbscripts = /opt/app/datartr/etc/misc
+org.onap.dmaap.datarouter.provserver.logretention = 30
+
+#DMAAP-597 (Tech Dept) REST request source IP auth
+# relaxation to accommodate OOM kubernetes deploy
+org.onap.dmaap.datarouter.provserver.isaddressauthenabled = false
+
+#Localhost address config
+org.onap.dmaap.datarouter.provserver.localhost = 127.0.0.1
+
+# Database access
+org.onap.dmaap.datarouter.db.driver = org.mariadb.jdbc.Driver
+org.onap.dmaap.datarouter.db.url = jdbc:mariadb://datarouter-mariadb:3306/datarouter
+org.onap.dmaap.datarouter.db.login = datarouter
+org.onap.dmaap.datarouter.db.password = datarouter
+
+# PROV - DEFAULT ENABLED TLS PROTOCOLS
+org.onap.dmaap.datarouter.provserver.https.include.protocols = TLSv1.1|TLSv1.2
+
+# AAF config
+org.onap.dmaap.datarouter.provserver.cadi.enabled = false
+
+org.onap.dmaap.datarouter.provserver.passwordencryption = PasswordEncryptionKey#@$%^&1234#
+org.onap.dmaap.datarouter.provserver.aaf.feed.type = org.onap.dmaap-dr.feed
+org.onap.dmaap.datarouter.provserver.aaf.sub.type = org.onap.dmaap-dr.sub
+org.onap.dmaap.datarouter.provserver.aaf.instance = legacy
+org.onap.dmaap.datarouter.provserver.aaf.action.publish = publish
+org.onap.dmaap.datarouter.provserver.aaf.action.subscribe = subscribe \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
deleted file mode 100644
index bf28b9fa..00000000
--- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml
+++ /dev/null
@@ -1,67 +0,0 @@
-version: '2.1'
-services:
- datarouter-prov:
- image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov
- container_name: datarouter-prov
- hostname: dmaap-dr-prov
- ports:
- - "443:8443"
- - "8443:8443"
- - "8080:8080"
- volumes:
- - ../prov_data/provserver.properties:/opt/app/datartr/etc/provserver.properties
- - ../prov_data/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
- - ../prov_data/addFeed3.txt:/opt/app/datartr/addFeed3.txt
- depends_on:
- mariadb_container:
- condition: service_healthy
- healthcheck:
- test: ["CMD", "curl", "-f", "http://dmaap-dr-prov:8080/internal/prov"]
- interval: 10s
- timeout: 10s
- retries: 5
- extra_hosts:
- - "dmaap-dr-node:1.1.1.1"
- - "dcae-pm-mapper:3.3.3.3"
-
- datarouter-node:
- image: nexus3.onap.org:10001/onap/dmaap/datarouter-node
- container_name: datarouter-node
- hostname: dmaap-dr-node
- ports:
- - "9443:8443"
- - "9090:8080"
- volumes:
- - ../node_data/node.properties:/opt/app/datartr/etc/node.properties
- depends_on:
- datarouter-prov:
- condition: service_healthy
- extra_hosts:
- - "dmaap-dr-prov:2.2.2.2"
- - "dcae-pm-mapper:3.3.3.3"
-
- mariadb_container:
- image: mariadb:10.2.14
- container_name: mariadb
- ports:
- - "3306:3306"
- environment:
- MYSQL_ROOT_PASSWORD: datarouter
- MYSQL_DATABASE: datarouter
- MYSQL_USER: datarouter
- MYSQL_PASSWORD: datarouter
- healthcheck:
- test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--silent"]
- interval: 10s
- timeout: 30s
- retries: 5
-
- consul:
- container_name: consul
- image: nexus3.onap.org:10001/consul:latest
-
- cbs:
- container_name: cbs
- image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest
- environment:
- CONSUL_HOST: \ No newline at end of file
diff --git a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml b/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml
deleted file mode 100644
index 7646c0b4..00000000
--- a/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-version: '2.1'
-services:
- pmmapper:
- container_name: pmmapper
- image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.1.3
- ports:
- - "8081:8081"
- environment:
- CONFIG_BINDING_SERVICE_SERVICE_HOST: CBSIP
- CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
- HOSTNAME: pmmapper
- extra_hosts:
- - "dmaap-dr-node:1.1.1.1"
- - "message-router:4.4.4.4"
diff --git a/plans/dcaegen2-pmmapper/pmmapper/docker-compose.yml b/plans/dcaegen2-pmmapper/pmmapper/docker-compose.yml
new file mode 100644
index 00000000..0843650e
--- /dev/null
+++ b/plans/dcaegen2-pmmapper/pmmapper/docker-compose.yml
@@ -0,0 +1,117 @@
+version: '3.3'
+
+services:
+ datarouter-prov:
+ image: nexus3.onap.org:10001/onap/dmaap/datarouter-prov
+ container_name: datarouter-prov
+ hostname: dmaap-dr-prov
+ ports:
+ - "443:8443"
+ - "8443:8443"
+ - "8080:8080"
+ volumes:
+ - /var/tmp/provserver.properties:/opt/app/datartr/etc/provserver.properties
+ - /var/tmp/addSubscriber.txt:/opt/app/datartr/addSubscriber.txt
+ - /var/tmp/addFeed3.txt:/opt/app/datartr/addFeed3.txt
+ depends_on:
+ - mariadb
+ healthcheck:
+ test: ["CMD", "curl", "-f", "http://dmaap-dr-prov:8080/internal/prov"]
+ interval: 10s
+ timeout: 10s
+ retries: 5
+ networks:
+ pmmapper-network:
+ ipv4_address: $DR_PROV_IP
+ extra_hosts:
+ - "dmaap-dr-node:$DR_NODE_IP"
+ - "dcae-pm-mapper:$PMMAPPER_IP"
+
+ datarouter-node:
+ image: nexus3.onap.org:10001/onap/dmaap/datarouter-node
+ container_name: datarouter-node
+ hostname: dmaap-dr-node
+ ports:
+ - "9443:8443"
+ - "9090:8080"
+ volumes:
+ - /var/tmp/node.properties:/opt/app/datartr/etc/node.properties
+ depends_on:
+ - datarouter-prov
+ networks:
+ pmmapper-network:
+ ipv4_address: $DR_NODE_IP
+ extra_hosts:
+ - "dmaap-dr-prov:$DR_PROV_IP"
+ - "dcae-pm-mapper:$PMMAPPER_IP"
+
+ node:
+ image: node:10-slim
+ container_name: mr-simulator
+ volumes:
+ - /var/tmp/mrserver.js:/tmp/mrserver.js
+ command:
+ nodejs /tmp/mrserver.js
+ networks:
+ pmmapper-network:
+ ipv4_address: $NODE_IP
+
+ mariadb:
+ image: mariadb:10.2.14
+ container_name: mariadb
+ ports:
+ - "3306:3306"
+ environment:
+ MYSQL_ROOT_PASSWORD: datarouter
+ MYSQL_DATABASE: datarouter
+ MYSQL_USER: datarouter
+ MYSQL_PASSWORD: datarouter
+ healthcheck:
+ test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--silent"]
+ interval: 10s
+ timeout: 30s
+ retries: 5
+ networks:
+ pmmapper-network:
+ ipv4_address: $MARIADB_IP
+
+ consul:
+ container_name: consul
+ image: nexus3.onap.org:10001/consul:latest
+ networks:
+ pmmapper-network:
+ ipv4_address: $CONSUL_IP
+
+ cbs:
+ container_name: cbs
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest
+ environment:
+ CONSUL_HOST: $CONSUL_IP
+ networks:
+ pmmapper-network:
+ ipv4_address: $CBS_IP
+
+ pmmapper:
+ container_name: pmmapper
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.1.3
+ ports:
+ - "8081:8081"
+ environment:
+ CONFIG_BINDING_SERVICE_SERVICE_HOST: $CBS_IP
+ CONFIG_BINDING_SERVICE_SERVICE_PORT: 10000
+ HOSTNAME: pmmapper
+ networks:
+ pmmapper-network:
+ ipv4_address: $PMMAPPER_IP
+ extra_hosts:
+ - "dmaap-dr-node:$DR_NODE_IP"
+ - "message-router:$NODE_IP"
+
+
+networks:
+ pmmapper-network:
+ driver: bridge
+ ipam:
+ config:
+ - subnet: 172.18.0.0/16
+
diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
index 29b8d9c5..4645223a 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
@@ -2,136 +2,101 @@
# Place the scripts in run order:
source ${SCRIPTS}/common_functions.sh
-# Clone DMaaP Message Router repo
-mkdir -p $WORKSPACE/archives/dmaapmr
-cd $WORKSPACE/archives/dmaapmr
-git clone --depth 1 http://gerrit.onap.org/r/dmaap/messagerouter/messageservice -b master
-sed -i 's/enableCadi: false/enableCadi: "false"/g' /$WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose/docker-compose.yml
-cd $WORKSPACE/archives/dmaapmr/messageservice/src/main/resources/docker-compose
-cp $WORKSPACE/archives/dmaapmr/messageservice/bundleconfig-local/etc/appprops/MsgRtrApi.properties /var/tmp/
-
-# start DMaaP MR containers with docker compose and configuration from docker-compose.yml
docker login -u docker -p docker nexus3.onap.org:10001
-docker-compose up -d
-ZOOKEEPER=$(docker ps -a -q --filter="name=zookeeper_1")
-KAFKA=$(docker ps -a -q --filter="name=kafka_1")
-DMAAP=$(docker ps -a -q --filter="name=dmaap_1")
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper
-# Get IP address of KAFKA, Zookeeper
-KAFKA_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $KAFKA)
-ZOOKEEPER_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ZOOKEEPER)
+export GATEWAY_IP=172.18.0.1
+export DR_NODE_IP=172.18.0.2
+export DR_PROV_IP=172.18.0.3
+export CONSUL_IP=172.18.0.4
+export CBS_IP=172.18.0.5
+export MARIADB_IP=172.18.0.6
+export NODE_IP=172.18.0.7
+export PMMAPPER_IP=172.18.0.8
-# Shutdown DMAAP Container
-docker kill $DMAAP
+for asset in provserver.properties addSubscriber.txt addFeed3.txt node.properties cbs.json mrserver.js; do
+ cp $TEST_PLANS_DIR/assets/${asset} /var/tmp/
+done
-# Initial docker-compose up and down is for populating kafka and zookeeper IPs in /var/tmp/MsgRtrApi.properites
-sed -i -e '/config.zk.servers=/ s/=.*/='$ZOOKEEPER_IP'/' /var/tmp/MsgRtrApi.properties
-sed -i -e '/kafka.metadata.broker.list=/ s/=.*/='$KAFKA_IP':9092/' /var/tmp/MsgRtrApi.properties
+sed -i 's/datarouter-mariadb/'$MARIADB_IP'/g' /var/tmp/provserver.properties
+#sed -i 's/<kafka-ip>/'$KAFKA_IP'/g' /var/tmp/addSubscriber.txt
+#sed -i 's/<kafka-ip>/'$KAFKA_IP'/g' /var/tmp/addFeed3.txt
+#sed -i 's/ipaddress/'$CBS_IP'/g' /var/tmp/cbs.json
+sed -i 's/ipaddress//g' /var/tmp/cbs.json
-# Start DMaaP MR containers with docker compose and configuration from docker-compose.yml
-docker login -u docker -p docker nexus3.onap.org:10001
-docker-compose up -d
-sleep 5
-
-# Get IP address of DMAAP Message Router.
-DMAAP_MR_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $DMAAP)
-
-# Clone DMaaP Data Router repo and Initialization of Data Router, Consul, Config Binding Service
-mkdir -p $WORKSPACE/archives/dmaapdr
-cd $WORKSPACE/archives/dmaapdr
-git clone --depth 1 https://gerrit.onap.org/r/dmaap/datarouter -b master
-cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources
-mkdir docker-compose
-cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
-cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml
-docker login -u docker -p docker nexus3.onap.org:10001
-docker-compose up -d
-echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unhealthy, this is expected behaiour at this stage"
-sleep 10
-docker kill cbs
-CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul )
-sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml
-MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb )
-sed -i 's/datarouter-mariadb/'$MARIADB'/g' $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/prov_data/provserver.properties
-docker-compose up -d
-DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
-DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
-
-# Consul Configuration for PM Mapper
-cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cbs.json /tmp/cbs.json
-sed -i 's/ipaddress/'${CBS_IP}'/g' /tmp/cbs.json
-curl --request PUT --data @/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register
-curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/config.json
-
-# PM Mapper startup and configuration
-mkdir /tmp/docker-compose
-cd /tmp/docker-compose
-cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/composefile/docker-compose-pmmapper.yml /tmp/docker-compose/docker-compose.yml
-CBS_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' cbs)
-sed -i 's/CBSIP/'$CBS_IP'/g' docker-compose.yml
-sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
-sed -i 's/4.4.4.4/'$MARIADB'/g' docker-compose.yml
-docker-compose up -d
-
-cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
-PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
-docker kill datarouter-node
-docker kill datarouter-prov
-sed -i 's/1.1.1.1/'$DR_NODE_IP'/g' docker-compose.yml
-sed -i 's/2.2.2.2/'$DR_PROV_IP'/g' docker-compose.yml
-sed -i 's/3.3.3.3/'$PMMAPPER_IP'/g' docker-compose.yml
-docker-compose up -d
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d mariadb consul cbs node
+
+echo "Waiting for MariaDB to come up healthy..."
+for i in {1..30}; do
+ mariadb_state=$(docker inspect --format='{{json .State.Health.Status}}' mariadb)
+ if [ $mariadb_state = '"healthy"' ]
+ then
+ break
+ else
+ sleep 2
+ fi
+done
+[ "$mariadb_state" != '"healthy"' ] && echo "Error: MariaDB container state not healthy" && exit 1
+
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d datarouter-node datarouter-prov
+
+curl --request PUT --data @/var/tmp/cbs.json http://$CONSUL_IP:8500/v1/agent/service/register
+curl 'http://'$CONSUL_IP':8500/v1/kv/pmmapper?dc=dc1' -X PUT \
+ -H 'Accept: application/json' \
+ -H 'Content-Type: application/json' \
+ -H 'X-Requested-With: XMLHttpRequest' \
+ --data @$TEST_PLANS_DIR/assets/config.json
+
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml up -d pmmapper
+sleep 2
# Setting up PM Mapper certs.
-docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/
-docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/
-docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/
-docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/
-docker restart pmmapper
+docker cp $TEST_PLANS_DIR/assets/cert.jks.b64 pmmapper:opt/app/pm-mapper/etc/
+docker cp $TEST_PLANS_DIR/assets/jks.pass pmmapper:opt/app/pm-mapper/etc/
+docker cp $TEST_PLANS_DIR/assets/trust.jks.b64 pmmapper:opt/app/pm-mapper/etc/
+docker cp $TEST_PLANS_DIR/assets/trust.pass pmmapper:opt/app/pm-mapper/etc/
+
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml restart pmmapper
# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS
+containers_ok=false
for i in {1..5}; do
if [ $(docker inspect --format '{{ .State.Running }}' datarouter-node) ] && \
[ $(docker inspect --format '{{ .State.Running }}' datarouter-prov) ] && \
[ $(docker inspect --format '{{ .State.Running }}' mariadb) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' mr-simulator) ] && \
[ $(docker inspect --format '{{ .State.Running }}' consul) ] && \
[ $(docker inspect --format '{{ .State.Running }}' cbs) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' pmmapper) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $KAFKA) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $ZOOKEEPER) ] && \
- [ $(docker inspect --format '{{ .State.Running }}' $DMAAP) ]
+ [ $(docker inspect --format '{{ .State.Running }}' pmmapper) ]
then
- echo "Message Router, Data Router, Consul, Config Binding Service Running and PM Mapper services are running healthy"
+ echo "All required docker containers are up."
+ containers_ok=true
break
else
- echo sleep $i
sleep $i
fi
done
+[ "$containers_ok" = "false" ] && echo "Error: required container not running." && exit 1
+
# Data Router Configuration.
-DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
-DR_GATEWAY_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.Gateway}}{{end}}' datarouter-prov)
-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"
+docker exec -i datarouter-prov sh -c \
+ "curl -k -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$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\|$GATEWAY_IP"
# Create PM Mapper feed and create PM Mapper subscriber on data router
-curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/createFeed.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443
-curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" --data-ascii @$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/addSubscriber.json --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
-
-# Simulation setup for Message Router
-docker cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/mrserver.js mariadb:/
-docker exec mariadb /bin/bash -c "apt update"
-sleep 2
-docker exec mariadb /bin/bash -c "apt install nodejs -y"
-sleep 10
-docker exec mariadb /bin/bash -c "nodejs mrserver.js &" &
-
-PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
-docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper.log
-cat /tmp/pmmapper.log
+curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.feed" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" \
+ --data-ascii @$TEST_PLANS_DIR/assets/createFeed.json \
+ --post301 --location-trusted -k https://${DR_PROV_IP}:8443
+curl -v -X POST -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:pmmapper" \
+ --data-ascii @$TEST_PLANS_DIR/assets/addSubscriber.json \
+ --post301 --location-trusted -k https://${DR_PROV_IP}:8443/subscribe/1
+
+docker cp pmmapper:/var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log /tmp/pmmapper.log
docker exec -it datarouter-prov sh -c "curl http://dmaap-dr-node:8080/internal/fetchProv"
sleep 10
curl -k https://$DR_PROV_IP:8443/internal/prov
+
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}" \ No newline at end of file
+ROBOT_VARIABLES="-v CONSUL_IP:${CONSUL_IP} -v DR_PROV_IP:${DR_PROV_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v CBS_IP:${CBS_IP} -v PMMAPPER_IP:${PMMAPPER_IP} -v DR_NODE_IP:${DR_NODE_IP}"
diff --git a/plans/dcaegen2-pmmapper/pmmapper/teardown.sh b/plans/dcaegen2-pmmapper/pmmapper/teardown.sh
index 45ef0d93..77bed8e0 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/teardown.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/teardown.sh
@@ -1,12 +1,7 @@
#!/bin/bash
echo "Starting teardown script"
+TEST_PLANS_DIR=$WORKSPACE/plans/dcaegen2-pmmapper/pmmapper
+mkdir -p $WORKSPACE/archives
docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
-kill-instance.sh $DMAAP
-kill-instance.sh $KAFKA
-kill-instance.sh $ZOOKEEPER
-kill-instance.sh datarouter-node
-kill-instance.sh datarouter-prov
-kill-instance.sh mariadb
-kill-instance.sh cbs
-kill-instance.sh consul
-kill-instance.sh pmmapper \ No newline at end of file
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml logs > $WORKSPACE/archives/pmmapper-docker-compose.log
+docker-compose -f $TEST_PLANS_DIR/docker-compose.yml down -v
diff --git a/plans/dcaegen2/testsuites/setup.sh b/plans/dcaegen2/testsuites/setup.sh
index 7847dce8..781e205f 100755
--- a/plans/dcaegen2/testsuites/setup.sh
+++ b/plans/dcaegen2/testsuites/setup.sh
@@ -21,11 +21,12 @@
#get current host IP addres
HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
-VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.2-latest
+VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:latest
+
echo VESC_IMAGE=${VESC_IMAGE}
# Start DCAE VES Collector
-docker run -d -p 8080:8080/tcp -p 8443:8443/tcp -P --name vesc -e DMAAPHOST=${HOST_IP} ${VESC_IMAGE}
+docker run --add-host="onap-dmaap:${HOST_IP}" -d -p 8080:8080/tcp -p 8443:8443/tcp --name vesc -P -e DMAAPHOST="${HOST_IP}" ${VESC_IMAGE}
VESC_IP=`get-instance-ip.sh vesc`
export VESC_IP=${VESC_IP}
diff --git a/plans/policy/apex-pdp/setup.sh b/plans/policy/apex-pdp/setup.sh
index 16621241..377ce4b1 100644
--- a/plans/policy/apex-pdp/setup.sh
+++ b/plans/policy/apex-pdp/setup.sh
@@ -3,7 +3,7 @@
# Copyright (C) 2018 Ericsson. All rights reserved.
#
# Modifications copyright (c) 2019 Nordix Foundation.
-# Modifications Copyright (C) 2019 AT&T Intellectual Property.
+# Modifications Copyright (C) 2020 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.
@@ -46,33 +46,15 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
exit 1
fi
-# bring down maven
-mkdir maven
-cd maven
-# download maven from automatically selected mirror server
-curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
-if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then
- echo "Installation of maven has failed!"
- exit 1
-fi
-ls -l
-export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v
-cd ..
-
-git clone http://gerrit.onap.org/r/oparent
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
-cd models/models-sim/models-sim-dmaap
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
-bash ./src/main/package/docker/docker_build.sh
-cd ${WORKSPACE}
-rm -rf ${WORK_DIR}
-sleep 3
-
sudo apt-get -y install libxml2-utils
-export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_APEX_PDP_VERSION="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
+
+POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
echo ${POLICY_API_VERSION}
echo ${POLICY_PAP_VERSION}
diff --git a/plans/policy/api/setup.sh b/plans/policy/api/setup.sh
index 91e1edee..8bd4b4af 100644
--- a/plans/policy/api/setup.sh
+++ b/plans/policy/api/setup.sh
@@ -30,8 +30,10 @@ pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
-export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
echo ${POLICY_API_VERSION}
+
# Adding this waiting container to avoid race condition between api and mariadb containers.
docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_dependencies
diff --git a/plans/policy/distribution/setup.sh b/plans/policy/distribution/setup.sh
index 18cb88ed..d1a08632 100644
--- a/plans/policy/distribution/setup.sh
+++ b/plans/policy/distribution/setup.sh
@@ -3,7 +3,7 @@
# Copyright (C) 2018 Ericsson. All rights reserved.
#
# Modifications copyright (c) 2019 Nordix Foundation.
-# Modifications Copyright (C) 2019 AT&T Intellectual Property.
+# Modifications Copyright (C) 2020 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.
@@ -19,7 +19,6 @@
#
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-
source ${SCRIPTS}/policy/config/policy-csit.conf
export POLICY_MARIADB_VER
echo ${GERRIT_BRANCH}
@@ -47,34 +46,17 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
exit 1
fi
-# bring down maven
-mkdir maven
-cd maven
-# download maven from automatically selected mirror server
-curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
-if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then
- echo "Installation of maven has failed!"
- exit 1
-fi
-ls -l
-export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v
-cd ..
-
-git clone http://gerrit.onap.org/r/oparent
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
-cd models/models-sim/models-sim-dmaap
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
-bash ./src/main/package/docker/docker_build.sh
-cd ${WORKSPACE}
-rm -rf ${WORK_DIR}
-sleep 3
-
sudo apt-get -y install libxml2-utils
-export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_APEX_PDP_VERSION="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_DISTRIBUTION_VERSION="$(curl -q --silent https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
+
+POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_DISTRIBUTION_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_DISTRIBUTION_VERSION="${POLICY_DISTRIBUTION_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
echo ${POLICY_API_VERSION}
echo ${POLICY_PAP_VERSION}
diff --git a/plans/policy/drools-applications/setup.sh b/plans/policy/drools-applications/setup.sh
index e2ca7893..e550cdb0 100755
--- a/plans/policy/drools-applications/setup.sh
+++ b/plans/policy/drools-applications/setup.sh
@@ -27,8 +27,10 @@ pip uninstall -y docker
pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
-export POLICY_DROOLS_APPS_VERSION="$(curl -q --silent https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-echo ${POLICY_DRROLS_APPS_VERSION}
+POLICY_DROOLS_APPS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+echo ${POLICY_DROOLS_APPS_VERSION_EXTRACT}
+export POLICY_DROOLS_APPS_VERSION="${POLICY_DROOLS_APPS_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+echo ${POLICY_DROOLS_APPS_VERSION}
docker login -u docker -p docker nexus3.onap.org:10001
diff --git a/plans/policy/pap/setup.sh b/plans/policy/pap/setup.sh
index 0f1ab746..8a613bca 100644
--- a/plans/policy/pap/setup.sh
+++ b/plans/policy/pap/setup.sh
@@ -30,8 +30,10 @@ pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
-export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
echo ${POLICY_API_VERSION}
echo ${POLICY_PAP_VERSION}
# Adding this waiting container due to race condition between pap and mariadb
diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh
index 9a2e92fe..79c43070 100644
--- a/plans/policy/xacml-pdp/setup.sh
+++ b/plans/policy/xacml-pdp/setup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 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.
@@ -44,39 +44,20 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
exit 1
fi
-# bring down maven
-mkdir maven
-cd maven
-# download maven from automatically selected mirror server
-curl -vLO "https://www.apache.org/dyn/mirrors/mirrors.cgi?cca2=us&preferred=http://apache.claz.org/&action=download&filename=maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz"
-if ! tar -xzvf apache-maven-3.3.9-bin.tar.gz ; then
- echo "Installation of maven has failed!"
- exit 1
-fi
-ls -l
-export PATH=${PATH}:${WORK_DIR}/maven/apache-maven-3.3.9/bin
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn -v
-cd ..
-
-git clone http://gerrit.onap.org/r/oparent
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
-cd models/models-sim/models-sim-dmaap
-${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn clean install -DskipTests --settings ${WORK_DIR}/oparent/settings.xml
-bash ./src/main/package/docker/docker_build.sh
-cd ${WORKSPACE}
-rm -rf ${WORK_DIR}
-sleep 3
-
-
-
sudo apt-get -y install libxml2-utils
-export POLICY_API_VERSION="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_XACML_PDP_VERSION="$(curl -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
+
+POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+POLICY_XACML_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_XACML_PDP_VERSION="${POLICY_XACML_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
echo ${POLICY_API_VERSION}
echo ${POLICY_PAP_VERSION}
echo ${POLICY_XACML_PDP_VERSION}
+
# Adding this waiting container due to race condition between pap and mariadb
docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml run --rm start_dependencies
diff --git a/plans/so/integration-etsi-testing/so-simulators/aai-simulator/pom.xml b/plans/so/integration-etsi-testing/so-simulators/aai-simulator/pom.xml
index e6a210a5..26815ad0 100644
--- a/plans/so/integration-etsi-testing/so-simulators/aai-simulator/pom.xml
+++ b/plans/so/integration-etsi-testing/so-simulators/aai-simulator/pom.xml
@@ -39,6 +39,22 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
diff --git a/plans/so/integration-etsi-testing/so-simulators/pom.xml b/plans/so/integration-etsi-testing/so-simulators/pom.xml
index 80d4ba95..372b073d 100644
--- a/plans/so/integration-etsi-testing/so-simulators/pom.xml
+++ b/plans/so/integration-etsi-testing/so-simulators/pom.xml
@@ -1,23 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<groupId>org.onap.so.simulators</groupId>
<artifactId>so-simulators</artifactId>
-
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<version>1.0-SNAPSHOT</version>
-
<properties>
<jax.ws.rs>2.1</jax.ws.rs>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
+ <jaxb.version>2.3.0</jaxb.version>
+ <javax.version>1.1.1</javax.version>
<java.version>1.8</java.version>
</properties>
-
<modules>
<module>common</module>
<module>sdc-simulator</module>
@@ -26,16 +24,35 @@
<module>vnfm-simulator</module>
<module>package</module>
</modules>
-
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>2.0.5.RELEASE</version>
+ <version>2.1.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>${jaxb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-core</artifactId>
+ <version>${jaxb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>${jaxb.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>${javax.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
<dependencies>
@@ -67,4 +84,4 @@
<version>${jax.ws.rs}</version>
</dependency>
</dependencies>
-</project>
+</project> \ No newline at end of file
diff --git a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java
index f96224d3..2f24ef69 100644
--- a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java
+++ b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/controller/OperationsController.java
@@ -52,6 +52,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping(path = OPERATIONS_URL)
public class OperationsController {
+ private static final String HTTP_STATUS_OK = HttpStatus.OK.value() + "";
private static final Logger LOGGER = LoggerFactory.getLogger(OperationsController.class);
@@ -80,7 +81,7 @@ public class OperationsController {
final Output output = getOutput(apiServiceOperationInformation);
final OutputRequest outputRequest = new OutputRequest(output);
- if (output.getResponseCode().equals(HttpStatus.OK.toString())) {
+ if (output.getResponseCode().equals(HTTP_STATUS_OK)) {
LOGGER.info("Sucessfully executed service request sending response: {}", outputRequest);
return ResponseEntity.ok(outputRequest);
}
@@ -106,7 +107,7 @@ public class OperationsController {
final Output output = getOutput(apiVnfOperationInformation);
final OutputRequest outputRequest = new OutputRequest(output);
- if (output.getResponseCode().equals(HttpStatus.OK.toString())) {
+ if (output.getResponseCode().equals(HTTP_STATUS_OK)) {
LOGGER.info("Sucessfully executed request vnf sending response: {}", outputRequest);
return ResponseEntity.ok(outputRequest);
}
diff --git a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java
index dae8b7f4..88db4c13 100644
--- a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java
+++ b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/main/java/org/onap/so/sdncsimulator/providers/ServiceOperationsCacheServiceProviderimpl.java
@@ -78,6 +78,8 @@ import org.springframework.stereotype.Service;
public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServiceProvider
implements ServiceOperationsCacheServiceProvider {
+ private static final String HTTP_STATUS_BAD_REQUEST = Integer.toString(HttpStatus.BAD_REQUEST.value());
+ private static final String HTTP_STATUS_OK = Integer.toString(HttpStatus.OK.value());
private static final String EMPTY_STRING = "";
private static final Logger LOGGER = LoggerFactory.getLogger(ServiceOperationsCacheServiceProviderimpl.class);
@@ -114,7 +116,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
.instanceId(serviceInstanceId).objectPath(getObjectPath(serviceInstanceId)));
}
LOGGER.error("serviceInstanceId: {} already exists", serviceInstanceId);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("serviceInstanceId: " + serviceInstanceId + " already exists")
.svcRequestId(svcRequestId);
}
@@ -122,7 +124,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
LOGGER.error(
"Unable to add GenericResourceApiServiceOperationInformation in cache due to invalid input: {}... ",
input);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("Service instance not found").svcRequestId(svcRequestId);
}
@@ -141,7 +143,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
LOGGER.info("Deleting GenericResourceApiServiceOperationInformation from cache using key: {}",
serviceInstanceId);
cache.evict(serviceInstanceId);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.OK.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_OK)
.responseMessage(EMPTY_STRING).svcRequestId(svcRequestId).serviceResponseInformation(
new GenericResourceApiInstanceReference().instanceId(serviceInstanceId));
}
@@ -151,7 +153,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
}
LOGGER.error("Unable to remove service instance from cache due to invalid input: {}... ", input);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("Unable to remove service").svcRequestId(svcRequestId);
}
@@ -208,7 +210,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
.objectPath(getObjectPath(serviceInstanceId, vnfId)));
}
LOGGER.error("vnfId: {} already exists with SVC Action: {}", vnfId, svcAction);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("vnfId: " + vnfId + " already exists").svcRequestId(svcRequestId);
}
}
@@ -220,7 +222,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
LOGGER.error(
"Unable to add GenericResourceApiServiceOperationInformation in cache due to invalid input: {}... ",
input);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("Unable to add vnf").svcRequestId(svcRequestId);
}
@@ -256,7 +258,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
return false;
});
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.OK.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_OK)
.responseMessage(EMPTY_STRING).svcRequestId(svcRequestId)
.serviceResponseInformation(
new GenericResourceApiInstanceReference().instanceId(serviceInstanceId))
@@ -271,7 +273,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
}
LOGGER.error("Unable to remove vnf instance from cache due to invalid input: {}... ", input);
- return new Output().ackFinalIndicator(YES).responseCode(HttpStatus.BAD_REQUEST.toString())
+ return new Output().ackFinalIndicator(YES).responseCode(HTTP_STATUS_BAD_REQUEST)
.responseMessage("Unable to remove vnf").svcRequestId(svcRequestId);
}
@@ -406,7 +408,7 @@ public class ServiceOperationsCacheServiceProviderimpl extends AbstractCacheServ
final GenericResourceApiServicestatusServiceStatus serviceStatus =
getServiceStatus(getSvcAction(input.getSdncRequestHeader()),
- getRequestAction(input.getRequestInformation()), HttpStatus.OK.toString());
+ getRequestAction(input.getRequestInformation()), HTTP_STATUS_OK);
return new GenericResourceApiServicemodelinfrastructureService().serviceData(apiServicedataServiceData)
.serviceStatus(serviceStatus).serviceInstanceId(serviceInstanceId);
diff --git a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/test/java/org/onap/so/sdncsimulator/controller/OperationsControllerTest.java b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/test/java/org/onap/so/sdncsimulator/controller/OperationsControllerTest.java
index b498bd6e..888a251e 100644
--- a/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/test/java/org/onap/so/sdncsimulator/controller/OperationsControllerTest.java
+++ b/plans/so/integration-etsi-testing/so-simulators/sdnc-simulator/src/test/java/org/onap/so/sdncsimulator/controller/OperationsControllerTest.java
@@ -71,6 +71,9 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@Configuration
public class OperationsControllerTest {
+ private static final String HTTP_STATUS_BAD_REQUEST = Integer.toString(HttpStatus.BAD_REQUEST.value());
+ private static final String HTTP_STATUS_OK = Integer.toString(HttpStatus.OK.value());
+
private static final String SVC_REQUEST_ID = "04fc9f50-87b8-430d-a232-ef24bd6c4150";
private static final String VNF_SVC_REQUEST_ID = "8fd2622b-01fc-424d-bfc8-f48bcd64e546";
@@ -112,7 +115,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
assertNotNull(actualObject);
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(SVC_REQUEST_ID, actualObject.getSvcRequestId());
assertNotNull(actualObject.getServiceResponseInformation());
@@ -157,7 +160,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
assertNotNull(actualObject);
- assertEquals(HttpStatus.BAD_REQUEST.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_BAD_REQUEST, actualObject.getResponseCode());
assertEquals(SVC_REQUEST_ID, actualObject.getSvcRequestId());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
@@ -183,7 +186,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(VNF_SVC_REQUEST_ID, actualObject.getSvcRequestId());
assertNotNull(actualObject.getServiceResponseInformation());
@@ -242,7 +245,7 @@ public class OperationsControllerTest {
final Output actualObject = badOutputRequest.getOutput();
assertNotNull(actualObject);
- assertEquals(HttpStatus.BAD_REQUEST.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_BAD_REQUEST, actualObject.getResponseCode());
assertEquals(VNF_SVC_REQUEST_ID, actualObject.getSvcRequestId());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
@@ -276,7 +279,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(VNF_SVC_REQUEST_ID, actualObject.getSvcRequestId());
assertNotNull(actualObject.getServiceResponseInformation());
@@ -349,7 +352,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(VNF_SVC_REQUEST_ID, actualObject.getSvcRequestId());
@@ -395,7 +398,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(SVC_REQUEST_ID, actualObject.getSvcRequestId());
@@ -435,7 +438,7 @@ public class OperationsControllerTest {
final Output actualObject = actualOutputRequest.getOutput();
- assertEquals(HttpStatus.OK.toString(), actualObject.getResponseCode());
+ assertEquals(HTTP_STATUS_OK, actualObject.getResponseCode());
assertEquals(Constants.YES, actualObject.getAckFinalIndicator());
assertEquals(SVC_REQUEST_ID, actualObject.getSvcRequestId());
diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-api/pom.xml b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-api/pom.xml
index ade3e012..23dc243f 100644
--- a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-api/pom.xml
+++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-api/pom.xml
@@ -1,106 +1,121 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.so.simulators.vnfm</groupId>
- <artifactId>vnfm-simulator</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>vnfm-api</artifactId>
- <name>${project.artifactId}</name>
- <properties>
- <gson-fire-version>1.8.2</gson-fire-version>
- <retrofit-version>2.3.0</retrofit-version>
- <threetenbp-version>1.3.5</threetenbp-version>
- <rxjava-version>2.0.0-RC1</rxjava-version>
- <oltu-version>1.0.1</oltu-version>
- <swagger-core-version>1.5.15</swagger-core-version>
- <gson-version>2.8.5</gson-version>
- </properties>
- <description>VNFM Simulator adapter API</description>
-
- <build>
- <plugins>
- <plugin>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>2.3.1</version>
- <executions>
- <execution>
- <id>vnfmsimulator</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>generate</goal>
- </goals>
- <configuration>
- <inputSpec>${basedir}/src/main/resources/vnfm-sim-swagger.yaml</inputSpec>
- <language>java</language>
- <library>retrofit2</library>
- <output>${project.build.directory}/generated-sources/vnfmsimulator</output>
- <apiPackage>org.onap.vnfm.v1.api</apiPackage>
- <modelPackage>org.onap.vnfm.v1.model</modelPackage>
- <configOptions>
- <jackson>true</jackson>
- <sourceFolder>src/gen/java/main</sourceFolder>
- <withXml>true</withXml>
- <useRxJava2>true</useRxJava2>
- </configOptions>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger-core-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-gson</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>retrofit</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>converter-scalars</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.client</artifactId>
- <version>${oltu-version}</version>
- </dependency>
- <dependency>
- <groupId>io.gsonfire</groupId>
- <artifactId>gson-fire</artifactId>
- <version>${gson-fire-version}</version>
- </dependency>
- <dependency>
- <groupId>org.threeten</groupId>
- <artifactId>threetenbp</artifactId>
- <version>${threetenbp-version}</version>
- </dependency>
- <dependency>
- <groupId>io.reactivex.rxjava2</groupId>
- <artifactId>rxjava</artifactId>
- <version>${rxjava-version}</version>
- </dependency>
- <dependency>
- <groupId>com.squareup.retrofit2</groupId>
- <artifactId>adapter-rxjava2</artifactId>
- <version>${retrofit-version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>${gson-version}</version>
- </dependency>
- </dependencies>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.so.simulators.vnfm</groupId>
+ <artifactId>vnfm-simulator</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>vnfm-api</artifactId>
+ <name>${project.artifactId}</name>
+ <properties>
+ <gson-fire-version>1.8.2</gson-fire-version>
+ <retrofit-version>2.3.0</retrofit-version>
+ <threetenbp-version>1.3.5</threetenbp-version>
+ <rxjava-version>2.0.0-RC1</rxjava-version>
+ <oltu-version>1.0.1</oltu-version>
+ <swagger-core-version>1.5.15</swagger-core-version>
+ <gson-version>2.8.5</gson-version>
+ </properties>
+ <description>VNFM Simulator adapter API</description>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>2.3.1</version>
+ <executions>
+ <execution>
+ <id>vnfmsimulator</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${basedir}/src/main/resources/vnfm-sim-swagger.yaml</inputSpec>
+ <language>java</language>
+ <library>retrofit2</library>
+ <output>${project.build.directory}/generated-sources/vnfmsimulator</output>
+ <apiPackage>org.onap.vnfm.v1.api</apiPackage>
+ <modelPackage>org.onap.vnfm.v1.model</modelPackage>
+ <configOptions>
+ <jackson>true</jackson>
+ <sourceFolder>src/gen/java/main</sourceFolder>
+ <withXml>true</withXml>
+ <useRxJava2>true</useRxJava2>
+ </configOptions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>${swagger-core-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>converter-gson</artifactId>
+ <version>${retrofit-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>retrofit</artifactId>
+ <version>${retrofit-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>converter-scalars</artifactId>
+ <version>${retrofit-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.client</artifactId>
+ <version>${oltu-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.gsonfire</groupId>
+ <artifactId>gson-fire</artifactId>
+ <version>${gson-fire-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.threeten</groupId>
+ <artifactId>threetenbp</artifactId>
+ <version>${threetenbp-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.reactivex.rxjava2</groupId>
+ <artifactId>rxjava</artifactId>
+ <version>${rxjava-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup.retrofit2</groupId>
+ <artifactId>adapter-rxjava2</artifactId>
+ <version>${retrofit-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>${gson-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ </dependencies>
</project> \ No newline at end of file
diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/api/VeVnfmApi.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/api/VeVnfmApi.java
new file mode 100644
index 00000000..14ee2fd3
--- /dev/null
+++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/api/VeVnfmApi.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Samsung. 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=========================================================
+ */
+
+package org.onap.so.svnfm.simulator.api;
+
+import com.squareup.okhttp.Call;
+import com.squareup.okhttp.Response;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.*;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.api.DefaultApi;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class VeVnfmApi extends DefaultApi {
+
+ public VeVnfmApi(final ApiClient apiClient) {
+ super(apiClient);
+ }
+
+ public Call lcnVnfLcmOperationOccurrenceNotificationPostCall(
+ final VnfLcmOperationOccurrenceNotification vnfLcmOperationOccurrenceNotification,
+ final String contentType, final String authorization,
+ final ProgressResponseBody.ProgressListener progressListener,
+ final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ return lcnVnfObjectNotificationPostCall(vnfLcmOperationOccurrenceNotification,
+ contentType, authorization, progressListener, progressRequestListener);
+ }
+
+ private Call lcnVnfObjectNotificationPostCall(
+ final Object body, final String contentType, final String authorization,
+ final ProgressResponseBody.ProgressListener progressListener,
+ final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ final List<Pair> localVarQueryParams = new ArrayList<>();
+ final List<Pair> localVarCollectionQueryParams = new ArrayList<>();
+ final Map<String, String> localVarHeaderParams = new HashMap<>();
+
+ if (authorization != null) {
+ localVarHeaderParams.put("Authorization", getApiClient().parameterToString(authorization));
+ }
+
+ if (contentType != null) {
+ localVarHeaderParams.put("Content-Type", getApiClient().parameterToString(contentType));
+ }
+
+ final String[] localVarAccepts = new String[]{"application/json"};
+ final String localVarAccept = getApiClient().selectHeaderAccept(localVarAccepts);
+
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = new String[]{"application/json"};
+ final String localVarContentType = getApiClient().selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if (progressListener != null) {
+ getApiClient().getHttpClient().networkInterceptors().add(ch -> {
+ final Response originalResponse = ch.proceed(ch.request());
+ return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();
+ });
+ }
+
+ final Map<String, Object> localVarFormParams = new HashMap<>();
+ final String[] localVarAuthNames = new String[0];
+
+ return getApiClient().buildCall("", "POST", localVarQueryParams, localVarCollectionQueryParams, body, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+}
diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/OperationProgressor.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/OperationProgressor.java
index 487a931c..ba549009 100644
--- a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/OperationProgressor.java
+++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/services/OperationProgressor.java
@@ -44,10 +44,12 @@ import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse200;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.InlineResponse201InstantiatedVnfInfoVnfcResourceInfo;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.SubscriptionsAuthenticationParamsBasic;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.model.SubscriptionsAuthenticationParamsOauth2ClientCredentials;
+import org.onap.so.svnfm.simulator.api.VeVnfmApi;
import org.onap.so.svnfm.simulator.model.Vnfds;
import org.onap.so.svnfm.simulator.repository.VnfOperationRepository;
import org.onap.so.svnfm.simulator.config.ApplicationConfig;
import org.onap.so.svnfm.simulator.model.VnfOperation;
+import org.onap.so.svnfm.simulator.util.PatternContainedChecker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.ClassPathResource;
@@ -82,11 +84,12 @@ public abstract class OperationProgressor implements Runnable {
final ApiClient apiClient = new ApiClient();
String callBackUrl = subscriptionService.getSubscriptions().iterator().next().getCallbackUri();
- callBackUrl = callBackUrl.substring(0, callBackUrl.indexOf("/lcn/"));
+ final PatternContainedChecker checker = new PatternContainedChecker("/lcn/", callBackUrl);
+ callBackUrl = checker.getText();
apiClient.setBasePath(callBackUrl);
apiClient.setKeyManagers(getKeyManagers());
apiClient.setSslCaCert(getCertificateToTrust());
- notificationClient = new DefaultApi(apiClient);
+ notificationClient = checker.isContained() ? new DefaultApi(apiClient) : new VeVnfmApi(apiClient);
final org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiClient grantApiClient =
new org.onap.so.adapters.vnfmadapter.extclients.vnfm.grant.ApiClient();
diff --git a/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/util/PatternContainedChecker.java b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/util/PatternContainedChecker.java
new file mode 100644
index 00000000..d33026ab
--- /dev/null
+++ b/plans/so/integration-etsi-testing/so-simulators/vnfm-simulator/vnfm-service/src/main/java/org/onap/so/svnfm/simulator/util/PatternContainedChecker.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2019 Samsung. 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=========================================================
+ */
+
+package org.onap.so.svnfm.simulator.util;
+
+public class PatternContainedChecker {
+
+ private final boolean contained;
+ private final String text;
+
+ public PatternContainedChecker(final String pattern, final String text) {
+ this.contained = text.contains(pattern);
+ this.text = this.contained ? text.substring(0, text.indexOf(pattern)) : text;
+ }
+
+ public boolean isContained() {
+ return contained;
+ }
+
+ public String getText() {
+ return text;
+ }
+}
diff --git a/scripts/policy/config/drools/base.conf b/scripts/policy/config/drools/base.conf
index d3164cb5..1e57226a 100644
--- a/scripts/policy/config/drools/base.conf
+++ b/scripts/policy/config/drools/base.conf
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 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.
@@ -22,7 +22,6 @@ JVM_OPTIONS=-server -Xms512m -Xmx512m
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
diff --git a/scripts/policy/config/policy-csit.conf b/scripts/policy/config/policy-csit.conf
index aa5f9396..1858698a 100644
--- a/scripts/policy/config/policy-csit.conf
+++ b/scripts/policy/config/policy-csit.conf
@@ -1,2 +1,3 @@
GERRIT_BRANCH=master
POLICY_MARIADB_VER=10.2.25
+NEXUS_URL=https://nexus.onap.org/content/repositories/snapshots
diff --git a/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar b/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar
index f4d77459..8a316181 100644
--- a/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar
+++ b/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar
Binary files differ
diff --git a/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar b/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar
index f4d77459..675e8897 100644
--- a/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar
+++ b/scripts/policy/policy-distribution/config/distribution/temp/sample_csar_with_apex_policy.csar
Binary files differ
diff --git a/scripts/policy/policy-models-dmaap-sim.sh b/scripts/policy/policy-models-dmaap-sim.sh
new file mode 100644
index 00000000..0abd9f94
--- /dev/null
+++ b/scripts/policy/policy-models-dmaap-sim.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+# ============LICENSE_START=======================================================
+# Copyright (C) 2020 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=========================================================
+
+source ${SCRIPTS}/policy/config/policy-csit.conf
+
+POLICY_MODELS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
+export POLICY_MODELS_VERSION="${POLICY_MODELS_VERSION_EXTRACT}"
+echo ${POLICY_MODELS_VERSION}
+
+# download dmaap tarball and build docker image
+git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
+cd models/models-sim/models-sim-dmaap
+item=`curl --silent -L ${NEXUS_URL}/org/onap/policy/models/sim/policy-models-sim-dmaap/${POLICY_MODELS_VERSION} | egrep 'policy-models-sim-dmaap-.*tarball' | cut '-d"' -f2 | egrep 'gz$' | sort | tail -1`
+mkdir target
+curl -L $item -o target/policy-models-sim-dmaap-${POLICY_MODELS_VERSION}-tarball.tar.gz
+bash ./src/main/package/docker/docker_build.sh
+cd ${WORKSPACE}
+rm -rf ${WORK_DIR}
+
diff --git a/scripts/policy/policy-xacml-pdp/config/db/db.sh b/scripts/policy/policy-xacml-pdp/config/db/db.sh
index ac150a03..499764df 100644..100755
--- a/scripts/policy/policy-xacml-pdp/config/db/db.sh
+++ b/scripts/policy/policy-xacml-pdp/config/db/db.sh
@@ -1,6 +1,6 @@
#!/bin/bash -xv
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2020 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,10 +17,10 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-for db in policyadmin
+for db in policyadmin operationshistory
do
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
done
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" \ No newline at end of file
+mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
index 1e6d3105..212dfe0b 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -57,7 +57,7 @@ Verify AAI not responding is logged
${ves_event}= Get Data From File ${test_case_directory}/ves-event.json
Ensure Container Is Exited aai_simulator
Set VES event in DMaaP ${ves_event}
- Wait for one of PRH log entries 90s connection timed out: aai Host is unreachable: aai
+ Wait for one of PRH log entries 90s connection timed out: aai Host is unreachable: aai No route to host: aai
[Teardown] Ensure Container Is Running aai_simulator
Verify PNF re registration
diff --git a/tests/dcaegen2/testcases/assets/certs/outdated.crt b/tests/dcaegen2/testcases/assets/certs/outdated.crt
new file mode 100644
index 00000000..8768cff7
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/outdated.crt
@@ -0,0 +1,24 @@
+-----BEGIN CERTIFICATE-----
+MIIEGDCCAgACFFgwd9DMpQEwVkrCkzJPGRq6xW3EMA0GCSqGSIb3DQEBCwUAMEUx
+CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl
+cm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTkxMTE4MTIyMzIyWhcNMTkxMTE5MTIy
+MzIyWjBMMQswCQYDVQQGEwJQTDELMAkGA1UECAwCRGwxEDAOBgNVBAcMB1dyb2Ns
+YXcxDjAMBgNVBAoMBU5va2lhMQ4wDAYDVQQLDAVOb2tpYTCCASIwDQYJKoZIhvcN
+AQEBBQADggEPADCCAQoCggEBALIx4HC0SskTvE5dzcfHcrjsvBvKJeum7NkVvpk2
+4hxhcynfmhM6wJ0VJV0x6B4mHe0ja4tJZdY5IyfRMV/5Q79hiiLmwg6hgjXX7MKn
+7JnFCX1iMj+zXlQzCLgXVpB6ruBAMImiBjGn2MlTIHKthsNGX6Qf+hDmJqEfoRuI
+jp7SwI4BvN084ijIpNWARdxAsAQ1qJjrCLhvJ9Ob8btCqclAzv3ZPAcOD6DjORx5
+JxIMMJ6bXfHgmsECy4dbGBMnieKF1O8NNdoypVCE+NuqckSmE2JQiHIkRHZ5Bul4
+ihk+wSR2WxiNOOuMN7bp+0Yan44ritMB06wpFdp4jGMvyTsCAwEAATANBgkqhkiG
+9w0BAQsFAAOCAgEAYQEi9+o6+nlMvXJlal62QPoBPOQqFKWTBd5X0Wv+L0K/5yAO
+S2Sv0woQyDLydjsglNLEJB3VJuPQsoRZDGqv9aThJ0j+/BzylbkxwcReMs7P+rl2
+DIeqjdvsato3ZB0Rtp28jBDI7HrvBfmGQQFUaeBRI7eybe3AXqy8INozkdAGeeIr
+FxMmrZ0z7eQj5T8CE/ebmsbdIDRPmI672V8Tojd6nQSZFAG9/9q6f/iK45Mx6Qls
+Qqfl+bdL3ey0aNsUR6yWNa2DBA15HW9GvUQuMxeGDNQn0bxib0KsKgxfbX4vLYVF
+RgC/c1td9LJoSMl3tURoZwRfAHFX82jDxAExtlTMvZMleMlP3O/YRB0SNieFeidE
+O3OzuCHBvEpQEcDdUMxc4XfCnV1nE6QHLsBwz3Zwt4ZnL6dS8iBE0p3NN5qHVWF7
+Vxb59ZYPCrTQbgTsKlfHyX8aB2Nk0rCgDFBbov7gVevOHjIWqmDyFhrNEJEmXO+3
+MM8UrImojbr4kn89VsujMP62jMqyXifuejGzkoHf6tBuTENiNxwmPwiX+ZD5etVE
+kh8c7aoRZi6zv+vMUu6U1RpYUEPGMTGZKBsuk+2IABhfD5UcneGR3kX2Vtb34EZE
+8i29bJY7CmzNBUlkbubqv8axklF2hxiN7w8oRLj+tH8jnVMMP47KuHaNx+8=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/testcases/assets/certs/outdated.key b/tests/dcaegen2/testcases/assets/certs/outdated.key
new file mode 100644
index 00000000..860b30fd
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/outdated.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAsjHgcLRKyRO8Tl3Nx8dyuOy8G8ol66bs2RW+mTbiHGFzKd+a
+EzrAnRUlXTHoHiYd7SNri0ll1jkjJ9ExX/lDv2GKIubCDqGCNdfswqfsmcUJfWIy
+P7NeVDMIuBdWkHqu4EAwiaIGMafYyVMgcq2Gw0ZfpB/6EOYmoR+hG4iOntLAjgG8
+3TziKMik1YBF3ECwBDWomOsIuG8n05vxu0KpyUDO/dk8Bw4PoOM5HHknEgwwnptd
+8eCawQLLh1sYEyeJ4oXU7w012jKlUIT426pyRKYTYlCIciREdnkG6XiKGT7BJHZb
+GI0464w3tun7RhqfjiuK0wHTrCkV2niMYy/JOwIDAQABAoIBAQCSYqLsM1AUa2AQ
+SMMZ0WEPRXsqoSARvKlplJFlME8D3ZJL3eKm1WcSJCLzsmHrEokXHDfmzr8YAww8
+U3/qRc0/1RMzpLnaZxeev+lB581YbSNkm1yINAPTy7Dn+lQkkIREuLam+jF4bViL
+2vwW+TJyDMfY/mPhqhAl4OPqyH3RPhSmC23zkPsqFU2ZXJQB/7CcDP9OtXN9OLM5
+/hjDTW0/+0/xLjzBDJbrzUSsBCD03/vis+mvZJ/pN31ZK+/zXz62yzGqN++bnoSA
+mlAUL6QrkVER9dKoLwUoNncbbsmeYnNSvJqmPNgdm0BSDKVzP1u0lvX93nSsRG0c
+vrHXb56xAoGBAOk5WwOfRtqUfkbGdJoX5R+PzRq9WGb6ZAquD8ST3rOtoQhPBQDI
+Cx26UbhJyH2xKhME8ZI0rjW0llI/erJbiLK9v668HzfqgoFZIly3t7nwmstFvoo9
+1CUo9TPsppGKQLo1iJV6iJIH14kPlOtSwIbGd9ixzqp1rBCIvwEi+Fq3AoGBAMOY
+x9ZlHmy2kmXTRjojf0zNPkkBsd8KatvH9AgYoUnulQBqdfCiTJTB+4JRyZ7sE6su
+mbtKP3SM9FJTGg0bNCDO2fwjkqia5WyssI9sVITwoPw5o11mR7WEXtfM1UtgLJbo
+xEN/TaFLoltW+kNaS0GzsJBzZvp8mbcmoFbx9hGdAoGAGVHjwqnpHFPgvbhP8mbD
+tkB7aPrDfTKT5+Drz1CqbeFcyTUi+um84zZWJubDwHmacsQnodLcUvJPG5DOtkxf
+s+ALzmGYFg78qiROKbi8VpB7jbP9sq5xuLMQo9l+X/CdhFnJgUjzSL9XNAcgCMhM
+JJWpbzomkLUDwCvIaMwuIFMCgYEAwv81exAkXM1G9izC/oMVDkQvrCj8YxfHoISf
+TNMBOOuZsGhyXAvxvPwG+cz/7Gf+09IJgSZsTI2ZpdkjR52vQmX1++Ca/Wwu/UDM
+ZK/jMwWR+OKdcyfcpaHpy8pxekvPKEO2JnRruDnnCpiTt0H1dPLnO5tRNrexp13i
+y8s9PiECgYEAzCk/b/62WIpEb7BPO19I7XR8xAT36QINiTJrOHqrh6iexD9T63Zf
+0OuNsnLna2uvPRsSKnoU8a0/frEKIu45LBrUh1XqKjgRP1PMktAI6KGwRvPXTzGT
+WVgznP2uU6wCyvd6obRfcX79egDeZrGfJ0xnuesaIEeYM+5CFgxqmHo=
+-----END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/testcases/assets/certs/rootCA.crt b/tests/dcaegen2/testcases/assets/certs/rootCA.crt
new file mode 100644
index 00000000..6a869ffc
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/rootCA.crt
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgIUHt/v/SBbEGqP7K3veoJTDUgmiG4wDQYJKoZIhvcNAQEL
+BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
+GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0xODExMDcwODU5MDRaFw0yMTA4
+MjcwODU5MDRaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
+HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQC+yIztigSbID4dT33lEc+UF69gKpgdD0o7/9nn3Qey
+ZrHExdNdF9RFnEReswLe64ZEL8BwBaPzveAPYzk7jN6J1LS3vfTDkGnzNXVyokcT
+rGL4xIGAFe13ZBj1xTlxBojRuJsAJ2n2ihnk2pcQa+QCOy7HA7iORVrrf4hzUthH
+ccvVFY5Z17sNLtTCrso9P9xIkMq4E+8GS7ufTZIUVSi6oruSOlhD0K0w/aeKwPjB
+HTk5o8ymhc/HSOcxVbUe+fkcsK8izHLToPT4lCAPCrsveHb6eIQzd+yzdgCSdOfL
+sCoSZP7s56DkmaPNxk8Ua5VnunTKqGOSmTIET+hwRTKW5lCyJGWNIML99rWkp4E+
+TXaSMyQ86S1ffm2qsBwHuNYbTc6KzjeN0Gr54+ApageVIpOM43bPEYd5BLM3StgV
+5GdLMH5ndX30zMoIvlgF7olcmdORdA7WgFRAmivN4fn66f6Kie6lvX2FTgjFlArb
+abHFLjiqzW4XXcS7SV+opnd67stZAbdkLx+nOZjjJZDmpI5rvh1eZOz0hL9gkbi0
+yYTHXmpkfJoikn2FeCZHrqHXbC5FkDeR0zDEUHC6o7YZvQ9h1yogWRGa6/OZU8Ni
+h3hc6ZbVWGWGvG7tX6I5ft5y5GJgwkqOqcG43UCw/Gz2u7mDi0VoNw+PhFIQG94J
+VQIDAQABo1MwUTAdBgNVHQ4EFgQUUTgeHVFkmRuXF3IL3eR1nFM1TQowHwYDVR0j
+BBgwFoAUUTgeHVFkmRuXF3IL3eR1nFM1TQowDwYDVR0TAQH/BAUwAwEB/zANBgkq
+hkiG9w0BAQsFAAOCAgEAqnpeSRF8bp4GKwnqU5HSg3uB5BbmfB3YF2D2NIVxYGfK
+Z4KOY6Iea5sxMUEACfWQrI50GBy3J/Wgw2wBMBcKSLXa0VF7WAY61B6VPKVrKBPo
+hVdSiWQ+UuwMbV00DPub3myB0rLYLagHrdZ0y9HHpDLQrqW+LR+lEbxckhrVmUsy
+wO2d4AmdLCnjqUUVG5xktmpq2Q5aEPkNhQPJEggn9hFlIybklSyRMoWyK36KUo5F
+szEt0teI+T4Q6lqJTiVrV3N5w9fNlcJ4ye5uTFrMwBjMS4I0kId2PHfv6KZ+LUQc
+4fu22RtNtFmcIfNAxaYyNb53EmcsDLf/v5WM/ZzietU1p0UHzxECdSTFt7cV1Ldt
+yFjbWkyZ4Jdn+aMadxpUdjT/Egm31hovE+KPbZUdd9xNEbQ+JZc/kx2Cuyxw1c8a
+UcFAxwPzwqU8+LpHLiXx6rZrGuZ7Nc8RpgR4ylHbyRr2ynJgi66QPyp6HhwvBEgK
+ig+8qUaczUGlSbssMN11tJ235/j6FFn+V8yp3UJEU7ax7epQ9YMyiw3maY+x1L0Z
+ZOXrZCkXCf1LQ3x52e1gvfGqYCBSxY217+bNNieQe3RsxPwaGd/KVv5C62GzIVG+
+r1k7gCv3gIHk8kTVeHpv22qvqrIT6lnGpUgJTAPzvtb+gZn/ByrvGHs5AnZkOkk=
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/testcases/assets/certs/rootCA.key b/tests/dcaegen2/testcases/assets/certs/rootCA.key
new file mode 100644
index 00000000..08347661
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/rootCA.key
@@ -0,0 +1,54 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,00244E4EB5B0693C
+
+UYrYxcNCEiXxcrA2Me6EloFPEQ34/BZwWBtQ4WKz9Ya7FLl16SKyyuoB2BXWbRfX
+3sGUCrKaLIC3BzPzwGRW5QoTlmUhOSAW5yzDWTOGN10uUlwTN9sT5CNPfWRwA211
+8eh0T3y0OyXVdGIQWDKDV9FhRStzblyZ/iZPN640dpPy/m4AldR3KFnBvErchNoL
+7lUon+lHmMQMpom+sbAlW3agv5AVeDbg8rxTU+8pBNnX0kAeB/LxzSJ85fNwwswN
+BPk+4zasUIrhJDgBliuCFsqPj404kHaIxnBDtiO16xLstDYiDuS67BRlChRwgpSX
+k/jutnC8qPo/exMlc6UtXkTyiUg+/58boZ11CH9lKntLkPhTXLxdoebUMQBSlPz/
+RfJ9e3+CxYvqN7aKLY4u57ODYdYlmFFYlQ5JBh1ulxN9BpZ6IgejrstIC4Wk/kYQ
+PMFMY+cGgTqSJW48qq7tUOmYwLNSLavRX3Smqbuzte9ntDua1c7mYtn/mYijlwso
+dE1j+0EqWLe2j4dyUMiFxf+YvGSigeeIaYxom5dGWHHKwgBRHt5hMsuvWI5coMk8
+bC3bUjpfAcikqkIUGd2Ue7iI5FNz/oKkDVKoUQfrz/k6o5szqO0CHEt9VuD5bAgx
+HoCSP+1qn5j/CxGwFZSplcBiUXcGxtdRuVuQ2gl0fCDJNpPSWAG8EBIuabAgwqoQ
+eGa3PU5iFaJOHLyRLCvZDjIqNZMI4EnMeO8SD02hQyiBQFS7czCwRXjt1bU3VIR+
+HtwMWuHlPy+L95qvRGdaI9SBII9grUGY/GK4v2WQamD7ZanW3blbVztWXDHs6xqT
+P0y3A5DOdEfcZzhVICgvJlHno7SjLJ9gjFxkGZO2VNQnhE2Yx/4PkFv5eWT8gKn6
+AQXlNhYYdyPzSNXMZ5V9K+hQT+zsKYddfDRvGYESjp/1+omaXpdpBPsaVJW0M3le
+vMv6IS5v2l3HYV39nXVNVclx46Ka4qQwbdL+HhjY6knCVMDUBxbLDa6pSOsmx1rb
+vWF+hZWWrvCryQNDyUBkRjh9yaA6oUYoSSkUQJZZ1pedwbjrvyU+h+cG/m6UZ07M
+A//oGKczrx9TjKqnVQiHJ/yq7SMCHVc7PghOyMZYClotImFGTnwLJULNIfVVNnJy
+P0xGEJxhnxi1TahgI/PIC+815yyR6Is8FlWNc/dYl88EUq3vDVdV7HKBm675NR/d
+yR4ORqlOSm7RvUTz5cKqwelGef1ne8NntM2IPqphOEaFbvVZTwYFA9LBSAYp4xD8
+S87t6yF/GOI5U1vE9TWGhRCuzcdFlatTsZsYIyWwYebbkazEEDS0Nw6Q5oeSgHhZ
+Ud2nXQhB6IuWAQsSy2/qRKa+mXMMmNiVtHSSAWtOyd8NTC2ZTSj+RR7hBe6Dn8Ua
+mpFNKl/XXtdkPvMNC+eXRK58h2Gq9+Ulz7gJKBoUUrGE8fSR1X6wcxhp8SZ3WiSJ
+TCTleTH3nueQBhvsqES28oT5dKS8CIDy9iCjJEQgs3kMYpwzApCQdN40buFIa6uh
+y+hyZaD2lrBGOHa6MQn/CZueNXOeCvTJvvs/tWHU9l+sNsb1RtfctFUUtDqk482U
+rMhOUvPZoLeHpO0GNBhWeuW76CRIxrtuArEzbT/lGoylDr4QwEMduEx08IiwVxiG
+MFGBlBTfQqtgnzDB5+cRJVAr542WvDAYq4uZcvSpV03GEcyEQyEULXS881HR0IdJ
+zvLVLW934QJ47xaWxdcISxMP9A/CwFgMcV93Nb3aRJK8TAr1VgGbQWNelAq55QYE
+114RnFR1hY3jGAh2xmuaEKsx8eUa9YMmFr9E/wfRcs8W8hhqcHAHHOUv9XG9EztR
+t7nvneaGQndi+Ylksw5jtDf/40vjwCdqCnlMSIRUI+Bbhd5AcJ5ZMc8Ah3vufqjg
+TbbL7T/eqP/cjS8hV+kfcgtHfdF+qW52Qe5hjByVWem0Zu0MeWM0Njo5Xa/YTsOJ
+wT/0Bv2UY2BYmgY5TG0KjHFaa1AlgJvdp+UVnedMmRc+zA6Cdy/t5TyC4ZAzX+1t
+FCbdK7b7J8ySx8RO4QuOJJ6XTJTqAygEU913y8I97PAo7RfOnGs9YayGwX3sKOBc
+eBEwFQb5ViC3JN04rCp0B2FjlH36m9i7cX8zWS3/OHTPz8eTU2dRFi9nicj+9H+2
+lmWbZ7jvjHwYWLbKDDaYVBb6wJYFg40A6958NTGSINcEfmixvqgaABa6kEavcwTf
+zc0HLsOlNGyZF6cs6Ad6DksxQvFopZGuLr0X1mAS4wz/bCrdffEKkPstXrArY8Ww
+Hm5VQSjBc3vgRrabHA5IAETGPQmu9ndyj0odCadPyVdCYGlBCQXwks8GaClVYxb8
+ajHCdfg9f5+iSMLznjcbooFTuZmIQo8jCssGuB0mh2q3iMLJBa8kkyBcvSZZQZEz
+Sgf/+qEfyiZt7XQY2Ysgz4bhAmSluSyIs0KO68ie1wjLBu/Oy+oDtq1F3WoFVz5F
+MJIco5nwX/p+OGrNllMnOPIuLNdIoAACr4JkeurNIv7flxD0y8a4C6pYGgNqs5Yv
+biLVzYZ4fpejCbHwetFRj7FTIk+y8GKAoAx15UkhXCSbUKDG6Q5TpU91CX9gxrq4
+SpcWtf6+F8sZsHstQgcOXr484fG7sd3THR0mGNVHpY1bGW/s3jymtWcECecC3DI2
+Gd6p7lWegQQrHdP8hM1WPZdoQ4Iq5rgJR8DT21SUGTd2P7Y7lpRULCoUOit9IKIy
+LTYwVhZuZRnELERVKkg9Ovwofb0P1a5q5eYImOuf3+T1iLDIhFIG5Y83NkznIJxo
+vduCnyyDSbXSFNp46j1hQedFZDwZooGMvU0OyHIhJYTvZ99ajRkg1UqkZfnUxJZW
+nLywPHmk1isHoHhlxSVkBAHfz9cOxZKf4EpKEKgz7o87y7Sm1FMN0FvMIPTeoC/s
+YBML5ghQZ7yS9wPQu7n0gfIP/KS1uuRLy02kvO0mmuzqtUXJIozfyaCbrWoqt9Qe
+75yLpV/960W5MN2vzMF95g/f5JjLDz9ZGS4vBK+v+mqOLMUWG94IS7WHa2ngHdzc
+9xGToNXbd/N6CjyB0+aBacCFuya7YVBfGnR2W0DJmY8/EKifTma4P0uyecghfnTi
+-----END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/testcases/assets/certs/wrong.crt b/tests/dcaegen2/testcases/assets/certs/wrong.crt
new file mode 100644
index 00000000..5a82cd09
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/wrong.crt
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFkzCCA3ugAwIBAgIUdRPd83cfkwo+IApq1ZVxHiBwVTwwDQYJKoZIhvcNAQEL
+BQAwWTELMAkGA1UEBhMCUEwxCzAJBgNVBAgMAkRMMRAwDgYDVQQHDAdXcm9jbGF3
+MQ0wCwYDVQQKDARyb290MQ0wCwYDVQQLDARyb290MQ0wCwYDVQQDDARyb290MB4X
+DTE5MTEwNTExNDEyMloXDTIyMDgyNTExNDEyMlowWTELMAkGA1UEBhMCUEwxCzAJ
+BgNVBAgMAkRMMRAwDgYDVQQHDAdXcm9jbGF3MQ0wCwYDVQQKDARyb290MQ0wCwYD
+VQQLDARyb290MQ0wCwYDVQQDDARyb290MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEA3WLxGCL/jE4XFONHk7tUbYgCYegBw3cNNAWB0L07swHTVjRT9KIA
+rq+zH3z/xKP8L9Uib/ytZd0U/Z3lHmBHh0h2XYyj0nmCnDAO5YGTisKdC5zXGBN9
+Mbvixghqioz0lTbaL6cCWk0lfD/Da4lJiBdTU6gzqZJmrBdnxQapKxUjEKVdXdre
+kL9SCaQ/4AmiI1D18E+RtyZ6h0aCyK6utrCx0JZfaXNAJ2jMzSb5soORQyoIOKGo
+wRm1Qe1B0DDn67LQa/yN4cXADCehhdBNQKZbSSz834QRuN0qajhx9OFMUSLbNfU1
+atFzNB6TtjdpWkGZCGLUew6sMC2nh98dsKmQHBA4PK/fg9/cXGpVkyGfKn72UMU2
+mx5F90MzER1P6K8qa49yU60oyFPRPtZsWTsM3TNZzOJyIY0l1PBQzwAnp2futIW/
+joUD6gukeTQgCKI8O/0RFZbVrFHG3c5iYyNdRC6O90c68l8+XepznmWESgrq0KNB
+iD45DF+GnW+E/HK1bjhhucaXiySt21yscmUY9MdQc1GH4djyR4zYpFw7chtQ7bwh
+MjO3Tmlf7TSz7oo8BIS1pKGOt0TQnTUzK0JcTjnlWSAz29q2jCDwsavCAyKWonW3
+0QakoqBaKu09iyMykp1Ex9KqBW8akPd1nspM/dIj+t2tsbPNs15z5ckCAwEAAaNT
+MFEwHQYDVR0OBBYEFBzzwlUoL0DoI4Er6XnNFtN+Kr80MB8GA1UdIwQYMBaAFBzz
+wlUoL0DoI4Er6XnNFtN+Kr80MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEL
+BQADggIBAMfmKx6lgMkwDzX4sgfXicj0A7xN68YbabQo5e+3AlxDPkhZwArMnIWf
++Jb4VANAiP4fTNGbovuSGwgq2yiMPJxJM1dBEwv4hAXOFF1RK1JdjcTliXtB7Ubo
+dBi4fEyDfCWjZm4/P8qNWH3yUjoIaxSjszdv9Ebt1wUqsRU+NtM25nd06oaGwUtq
+OB9hV/qdGlJqmRToGhCAnxWRFxu4HywXGimM9vqxlcqSM6gjCvua+iUcd59Qlxk8
+KWktVNKcWgJlL8hVGULDbwJtZJvhTDqou/F5qQAAEa5YNU3zBgznv2aZQZQhQssB
+LQiTa9f+0e0ySGcBwEykTg3QpAUBaL40HlLGR4kpsRv9FyV/YrrTRI9kqAEM1FNh
+lBi2ll47qchSBH0KRSmnt8QzfhUDWReNp2gvYSu3HVGxUu7dKGDm4tBI1ts+RLAq
+9yu29Z+Db0ty7Q/PQ6jjeDCot+JNHWfBQ4S70W6CN1lo7uCwq7tnLLYL6/+Cqe9O
+9A+++vkeT0ai95u0+3PSzUkWgCQ+qd3XFlV7JeEWbHV+db/zdIRk07vbRUs+MVNY
+NN6BsxUsMMVm3cG5TpMeG7+kCEHwH0qXO8Ycj6EVB9GyLPGWQjDTenSUByP82Pbp
+3fZkv3l/vszkaqL3f3lLZkDYh9r1X/TYbTjLkYQUHiobryBplBTy
+-----END CERTIFICATE-----
diff --git a/tests/dcaegen2/testcases/assets/certs/wrong.key b/tests/dcaegen2/testcases/assets/certs/wrong.key
new file mode 100644
index 00000000..ba2a01e5
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/certs/wrong.key
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKQIBAAKCAgEA3WLxGCL/jE4XFONHk7tUbYgCYegBw3cNNAWB0L07swHTVjRT
+9KIArq+zH3z/xKP8L9Uib/ytZd0U/Z3lHmBHh0h2XYyj0nmCnDAO5YGTisKdC5zX
+GBN9Mbvixghqioz0lTbaL6cCWk0lfD/Da4lJiBdTU6gzqZJmrBdnxQapKxUjEKVd
+XdrekL9SCaQ/4AmiI1D18E+RtyZ6h0aCyK6utrCx0JZfaXNAJ2jMzSb5soORQyoI
+OKGowRm1Qe1B0DDn67LQa/yN4cXADCehhdBNQKZbSSz834QRuN0qajhx9OFMUSLb
+NfU1atFzNB6TtjdpWkGZCGLUew6sMC2nh98dsKmQHBA4PK/fg9/cXGpVkyGfKn72
+UMU2mx5F90MzER1P6K8qa49yU60oyFPRPtZsWTsM3TNZzOJyIY0l1PBQzwAnp2fu
+tIW/joUD6gukeTQgCKI8O/0RFZbVrFHG3c5iYyNdRC6O90c68l8+XepznmWESgrq
+0KNBiD45DF+GnW+E/HK1bjhhucaXiySt21yscmUY9MdQc1GH4djyR4zYpFw7chtQ
+7bwhMjO3Tmlf7TSz7oo8BIS1pKGOt0TQnTUzK0JcTjnlWSAz29q2jCDwsavCAyKW
+onW30QakoqBaKu09iyMykp1Ex9KqBW8akPd1nspM/dIj+t2tsbPNs15z5ckCAwEA
+AQKCAgAi8iBOiA/ArP71vB6rUjG0jHibzcyhdyRtZsUkFwraadpbTC1Ie14SNQfY
+W5ngB2aigklKVh9k6e4LTqZBEj+YOjb881tUuPuF/gwL7FVG3Qt/LsXBNipX9GmK
+iv+OWUuuVhdA2GMFsBHPuBz315b01YHAvddR2Bs+5P7rWe7QLyj20rOXQhpJzPl9
+LiErEzo1yuzXfyfoOjmzKs0wMmq/ycp3u5TaB2hEEEXryFA3/o6qhHMBxXrm6FD1
+VCdEXsPtL6+4rAgVcGqtQIA9qDDZmKjmNyS/f5BwlvDADaLnXbz3PcJOlSNWdjNy
+MbVtWPfXWG14pmkV9630ePBuASklU5CDbQ5w6lstEJFAzKBTXwSdGZMz599nSrQW
+RGWqKGQelp3f76du8xJkDFqvLVYOmiQskAPBvN6vMbcqN8mkFHcC0l5MrmTRZxmQ
+RpcLhAZ1fKFjTJBu1jLJFYBy4ThWBLbNvZPTLdtPJxOeupyhdhgrTHruxh3GEepx
+fFXzzcVKvI/IwWlpm+RSAEBydOhifFmVjQmcCWoaf9G4xYogQBIf+1agKansPNb+
+r74B+//tumApAToHjdtHgQn090aA/rRQh6a4+7ktIw2tEr0/UVyIfLIlIamHRVDK
+kZRo0lOd1DUKeWiCq+l+SC8exF+cAftvi6kTjpSE9iaUjhNeAQKCAQEA+adKjk1k
+rahCSS//k0BxTCSA3KXGroO47uQEUNWJM7r0kJCMx37l10aMgYMofaDecmVOwA5O
+emkd3JnAt0R95bAH5AYwF3nGiL09oSQ8rm/UwoyrI86SHhCxXkAbWBWOS75xUDX0
+qxCgRU2fd76G8f1m+xX8WNrv3N9iI/MiqbVGvsyU0z3K9MeA8KGt33EFOkWT9f0V
+ZgaKGY2SXyvFszkV3b3PYKYSp5reCY5N5zco12wtgMlHOV9i0X1xXOgzF6ccN65c
+x6E6/9l1FDUkQWL5IEP/GWTkfIkMyUyWnhVNncTbkC87xlyfIttAEj5oWfkChkEY
+n8tDDDjmxujFwQKCAQEA4wOxbBgt+27gGDyfzne+/SXUXbw5JE0ydZQPl0atJ3ci
+hnlwX/uUk1t8wxFldcqqHlTi9EO0b8uLCrBb0J9Wa9SpdDD/c7RT5x5tQoDHOSYU
+w/kdCZI2GW5129sV3XyV9fa2DfIMC9VEgY8ARHKfEUsdcmoqp2I15dqO6xcmpG0i
+BU/V06cpaULwelDbE0we08RCvE/mix14EXJNtTaJ0z3mBCX5psgcfBHb+j43MewW
+cB+cxx7znpsj8KDmLa44TdCoa5pThBj0V9Y7cPJwLNS8bIShPLs7KYWG4lZ/Igiv
+W7v+zdudNiTo8PkjB0HYF2deoCHCNC6c0IXcF3VyCQKCAQEAwQ3bupUgkKV3tM7Y
+LQ99TWtA9t9+937G6H0M1VF7SrR84LnXE4IOzF0y1AgPrK5UtlOfBSdLCp/0xp1j
+CJV/YbmxMGSUleLGYwEsAktaXW3/Mf7DbOoV1ggEkKS0QHZS1kHLsEI5FHvD5DO1
+aEy+X60cEHgc7r1HFR7s7m3a1S9oKK1dPMkhBA6up+Xu5cWpTDl3xJZUENRnwIDY
+up3HwOMZBKL+FXf3HwLERtFzbqQaAhQWT+vWFwirCuKdYkHxGI5SZMCB4KHOVQDc
+56Z8hc+6ZHgQcZuykJcOey+tnUtN/P246BOOfsMrEDJJppH58fF8QUNffloZW/84
+foKMQQKCAQBdT5VL8xxjbw2ZqMGfIkVU1InYBZgPPdPx1GwcKCbgQ+3jDGOOcGB/
+uWks3SexJR6L3SR0dqfiE+4Q9LCorfXd2MnWQpWdv4+FPlJ2tWwuJ2L9spWm63xl
+M6wqNIFmSuFw+nmWfdlJu92uy1K2z85mU1PFRbJGnu28jvuT0i5GA72qJUik+N7i
+r2sdO8LwyacaMF+l+8mtgO1rbmpWhBZex+CV7+4QCcz7inO7Bnu1f28xoyzUA/rr
+RKWfMOOr/yKRiaTQpdySPZehyyMfp+dH5iGVEWcdCXCl/oaU3izflmZN9JYlk5Gp
+Qb6l3iHxx7TE2e5hL78dp9M5OuxekB3RAoIBAQDOYRP9alUy+32g/jwJfaSg2BR9
+1uOSDaDRw9IHM5EUyWBF4ehgSVmy32WAIfCVXdrC8RUPf8n4aNk6k3N7Mhczm41m
+4KrUiDcpA+A7j51MU79yXdaGJ+e9bMR4QqadQYmHknbjDFJAQEnWZvWQxBP+CJDZ
+2mhV78swBGJK+W8zUIHBbo+SUCF6KUH/1fBvVxVlzwFsSrk2niyfyIGbPaEpriPL
+gCvxsZR3dH4wqVBythBMy+pdL0BWKtxNHR/UkXPpLqtD/p4XXReJjpW7ImuFMjti
+B//8aludyEJo+TAiTzDrSOD1pxPtQqTiLBhZlsjD9QNfE9wsRM0SnvzpmMCs
+-----END RSA PRIVATE KEY-----
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json
new file mode 100644
index 00000000..1db81eed
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json
@@ -0,0 +1,67 @@
+
+{
+ "eventList": [
+ {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "domain": "fault",
+ "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
+ "eventId": "fault0000250",
+ "sequence": 1,
+ "priority": "High",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName": "ibcx0001vm002oam0011234",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "sourceName": "scfx0001vm002cap001",
+ "nfVendorName": "Ericsson",
+ "nfNamingCode": "scfx",
+ "nfcNamingCode": "ssc",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "PilotNumberPoolExhaustion",
+ "eventSourceType": "other",
+ "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active",
+ "alarmAdditionalInformation": {
+ "PilotNumberPoolSize": "1000"
+ }
+ }
+ },
+ {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "domain": "fault",
+ "eventName": " Fault_Vscf:Acs-Ericcson_RecordingServerUnreachable",
+ "eventId": "fault0000251",
+ "sequence": 0,
+ "priority": "High",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName": "ibcx0001vm002oam0011234",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "sourceName": "scfx0001vm002cap001",
+ "nfVendorName": "Ericsson",
+ "nfNamingCode": "scfx",
+ "nfcNamingCode": "ssc",
+ "startEpochMicrosec": 1413378172000010,
+ "lastEpochMicrosec": 1413378172000010,
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "RecordingServerUnreachable",
+ "eventSourceType": "other",
+ "specificProblem": "Recording server unreachable",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active"
+ }
+ }
+ ]
+}
+
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json b/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
new file mode 100644
index 00000000..74c0a92f
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
@@ -0,0 +1,34 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "30.0.1",
+ "domain": "fault",
+ "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
+ "eventId": "fault0000245",
+ "sequence": 1,
+ "priority": "High",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "sourceName": "scfx0001vm002cap001",
+ "nfVendorName": "Ericsson",
+ "nfNamingCode": "scfx",
+ "nfcNamingCode": "ssc",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "PilotNumberPoolExhaustion",
+ "eventSourceType": "other",
+ "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active",
+ "alarmAdditionalInformation": {
+ "PilotNumberPoolSize": "1000"
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json b/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
new file mode 100644
index 00000000..51787555
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
@@ -0,0 +1,33 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
+ "eventId": "ab305d54-85b4-a31b-7db2-fb6b9e546015",
+ "sequence": 1,
+ "priority": "High",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "sourceName": "scfx0001vm002cap001",
+ "nfVendorName": "Ericsson",
+ "nfNamingCode": "scfx",
+ "nfcNamingCode": "ssc",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "PilotNumberPoolExhaustion",
+ "eventSourceType": "other",
+ "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active",
+ "alarmAdditionalInformation": {
+ "PilotNumberPoolSize": "1000"
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json b/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
new file mode 100644
index 00000000..aabefd5c
--- /dev/null
+++ b/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
@@ -0,0 +1,34 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.0.1",
+ "vesEventListenerVersion": "7.0.1",
+ "domain": "fault",
+ "eventName": "Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion",
+ "eventId": "ab305d54-85b4-a31b-7db2-fb6b9e546015",
+ "sequence": 1,
+ "priority": "High",
+ "reportingEntityId": "cc305d54-75b4-431b-adb2-eb6b9e541234",
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceId": "de305d54-75b4-431b-adb2-eb6b9e546014",
+ "sourceName": "scfx0001vm002cap001",
+ "nfVendorName": "Ericsson",
+ "nfNamingCode": "scfx",
+ "nfcNamingCode": "ssc",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "timeZoneOffset": "UTC-05:30"
+ },
+ "faultFields": {
+ "faultFieldsVersion": "4.0",
+ "alarmCondition": "PilotNumberPoolExhaustion",
+ "eventSourceType": "other",
+ "specificProblem": "Calls cannot complete - pilot numbers are unavailable",
+ "eventSeverity": "CRITICAL",
+ "vfStatus": "Active",
+ "alarmAdditionalInformation": {
+ "PilotNumberPoolSize": "1000"
+ }
+ }
+ }
+}
diff --git a/tests/dcaegen2/testcases/dcae_ves.robot b/tests/dcaegen2/testcases/dcae_ves.robot
index f457f2ce..e12097e2 100644
--- a/tests/dcaegen2/testcases/dcae_ves.robot
+++ b/tests/dcaegen2/testcases/dcae_ves.robot
@@ -1,171 +1,188 @@
*** Settings ***
-Documentation Testing DCAE VES Listener with various event feeds from VoLTE, vDNS, vFW and cCPE use scenarios
-Library RequestsLibrary
+Documentation Run healthchecks for DCAE VES
+... Testing /eventListener/v7 and /eventListener/v7/eventBatch endpoints for DCEA VES v7.
+... Testing /eventListener/v5 and /eventListener/v5/eventBatch for DCEA VES v5 with various event feeds from VoLTE, vFW and PNF
+Library RequestsLibrary
Library OperatingSystem
Library Collections
Library DcaeLibrary
-Resource resources/dcae_keywords.robot
-Resource ../../common.robot
-Test Setup Cleanup VES Events
-Suite Setup Run keywords VES Collector Suite Setup DMaaP Create sessions Create header
-Suite Teardown VES Collector Suite Shutdown DMaaP
-
-*** Variables ***
-${VESC_URL_HTTPS} https://%{VESC_IP}:8443
-${VESC_URL} http://%{VESC_IP}:8080
-${VES_ANY_EVENT_PATH} /eventListener/v5
-${VES_BATCH_EVENT_PATH} /eventListener/v5/eventBatch
-${VES_THROTTLE_STATE_EVENT_PATH} /eventListener/v5/clientThrottlingState
-${EVENT_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event.json
-${EVENT_MEASURE_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_vfirewall_measurement.json
-${EVENT_DATA_FILE_BAD} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event_bad.json
-${EVENT_BATCH_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_fault_eventlist_batch.json
-${EVENT_THROTTLING_STATE_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_fault_provide_throttle_state.json
-${EVENT_PNF_REGISTRATION} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_pnf_registration_event.json
-
-#DCAE Health Check
-${CONFIG_BINDING_URL} http://localhost:8443
-${CB_HEALTHCHECK_PATH} /healthcheck
-${CB_SERVICE_COMPONENT_PATH} /service_component/
-${VES_Service_Name1} dcae-controller-ves-collector
-${VES_Service_Name2} ves-collector-not-exist
+Resource ./resources/dcae_keywords.robot
+
+Test Teardown Cleanup VES Events
+Suite Setup Run keywords VES Collector Suite Setup DMaaP Generate Certs Create sessions Create header
+Suite Teardown Run keywords VES Collector Suite Shutdown DMaaP Remove Certs
*** Test Cases ***
-VES Collector Health Check
+
+#No authentication tests
+
+VES Collector HTTP Health Check
[Tags] DCAE-VESC-R1
- [Documentation] Ves Collector Health Check
- ${uuid}= Generate UUID
- ${headers}= Create Dictionary Accept=*/* X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
- ${resp}= Get Request ${suite_dcae_vesc_url_session} /healthcheck headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
+ [Documentation] Run healthcheck
+ Run Healthcheck
+
+Publish Single VES VNF Measurement Event API V7
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data to /eventListener/v7 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event with wrong JSON
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with invalid data to /eventListener/v7 endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_INVALID_JSON_V7} 400
+
+Publish Single VES VNF Measurement Event with missing mandatory parameter domain
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with lack of one of the mandatory parameters "domain" to /eventListener/v7 endpoint and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_MISSING_MANDATORY_DOMAIN_V7} 400
+
+Publish Single VES VNF Measurement Event with No Auth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event over HTTPS with authentication disabled and expect ConnectionError
+ @{err_content} Create List Errno 111
+ Send Request And Expect Error Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} ConnectionError:* @{err_content}
Publish Single VES VoLTE Fault Event
[Tags] DCAE-VESC-R1
- [Documentation] Post single event and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE}
- ${resp}= Publish Event To VES Collector No Auth ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 200
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546015
- Should Be Equal As Strings ${ret} true
-
-Publish Single VES VNF Measurement Event
- [Tags] DCAE-VESC-R1
- [Documentation] Post single event and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_MEASURE_FILE}
- ${resp}= Publish Event To VES Collector No Auth ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 200
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- ${ret}= DMaaP Message Receive 0b2b5790-3673-480a-a4bd-5a00b88e5af6
- Should Be Equal As Strings ${ret} true
+ [Documentation] Post single event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event API V5
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single measurement event with valid data to /eventListener/v5 endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_MEASURE_FILE} 202 0b2b5790-3673-480a-a4bd-5a00b88e5af6
Publish VES VoLTE Fault Batch Events
[Tags] DCAE-VESC-R1
- [Documentation] Post batched events and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_BATCH_DATA_FILE}
- ${resp}= Publish Event To VES Collector No Auth ${VES_BATCH_EVENT_PATH} ${evtdata}
- Should Be Equal As Strings ${resp.status_code} 200
- #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025
- Should Be Equal As Strings ${ret} true
-
-Publish Single VES VoLTE Fault Event With Bad Data
- [Tags] DCAE-VESC-R1
- [Documentation] Run with JSON Envent with missing comma to expect 400 response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE_BAD}
- Log Send HTTP Request with invalid Json Event Data
- ${resp}= Publish Event To VES Collector No Auth ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 400
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
-
+ [Documentation] Post single event with valid data to /eventListener/v5/eventBatch endpoint and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_BATCH_EVENT_PATH} ${EVENT_BATCH_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546025
+
Publish VES Event With Invalid Method
[Tags] DCAE-VESC-R1
- [Documentation] Use invalid Put instead of Post method to expect 405 response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE}
+ [Documentation] Use invalid Put instead of Post method to expect 405 Response Status Code
Log Send HTTP Request with invalid method Put instead of Post
- ${resp}= Publish Event To VES Collector With Put Method No Auth ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 404
-
+ Send Request And Validate Response Publish Event To VES Collector With Put Method ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 405
+
Publish VES Event With Invalid URL Path
[Tags] DCAE-VESC-R1
- [Documentation] Use invalid url path to expect 404 response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE}
+ [Documentation] Post single event to invalid url path and expect 404 Response Status Code
Log Send HTTP Request with invalid /listener/v5/ instead of /eventListener/v5 path
- ${resp}= Publish Event To VES Collector No Auth /listener/v5/ ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 404
-
-#Enable VESC HTTPS And Basic Auth
- #[Tags] DCAE-VESC-R1
- #[Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check
- #Enable VESC Https Auth
- #
- #${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD}
- #${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1
- #${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID}
- #${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers}
- #Should Be Equal As Strings ${resp.status_code} 200
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} /listener/v5/ ${EVENT_DATA_FILE} 404
+
+Publish PNF Registration Event
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post PNF registration event and expect 200 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_ANY_EVENT_PATH} ${EVENT_PNF_REGISTRATION} 202 QTFCOC540002E-reg
+
+# Auth by certificate and basic auth username / password
+
+Enable VESC HTTPS with certBasicAuth
+ [Tags] DCAE-VESC-R1
+ [Documentation] Enable VESC Https and Authentication and Run Health Check
+ Enable VESC with certBasicAuth
+ Run Healthcheck
+
+Healthcheck with Outdated Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Run healthcheck with outdated cert
+ ${uuid}= Generate UUID
+ ${headers}= Create Dictionary Accept=*/* X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${err_msg}= Run Keyword And Expect Error SSLError:* Get Request ${https_outdated_cert_session} /healthcheck headers=${headers}
+ Should Contain ${err_msg} certificate unknown
+ Log Recieved error message ${err_msg}
Publish Single VES Fault Event Over HTTPS
[Tags] DCAE-VESC-R1
- [Documentation] Post single event and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE}
+ [Documentation] Post single event with valid data to /eventListener/v5 endpoint over HTTPS and expect 202 Response Status Code
Log Login User=${VESC_HTTPS_USER}, Pd=${VESC_HTTPS_PD}
- ${resp}= Publish Event To VES Collector ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 200
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546015
- Should Be Equal As Strings ${ret} true
-
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_ANY_EVENT_PATH} ${EVENT_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
Publish Single VES Measurement Event Over HTTPS
[Tags] DCAE-VESC-R1
- [Documentation] Post single event and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_MEASURE_FILE}
- ${resp}= Publish Event To VES Collector ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 200
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- ${ret}= DMaaP Message Receive 0b2b5790-3673-480a-a4bd-5a00b88e5af6
- Should Be Equal As Strings ${ret} true
+ [Documentation] Post single measurement event with valid data to /eventListener/v5 endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_ANY_EVENT_PATH} ${EVENT_MEASURE_FILE} 202 0b2b5790-3673-480a-a4bd-5a00b88e5af6
Publish VES Fault Batch Events Over HTTPS
[Tags] DCAE-VESC-R1
- [Documentation] Post batched events and expect 202 Response
- ${evtdata}= Get Data From File ${EVENT_BATCH_DATA_FILE}
- ${resp}= Publish Event To VES Collector ${VES_BATCH_EVENT_PATH} ${evtdata}
- Should Be Equal As Strings ${resp.status_code} 200
- #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016
- ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025
- Should Be Equal As Strings ${ret} true
+ [Documentation] Post single event with valid data to /eventListener/v5/eventBatch endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_PATH} ${EVENT_BATCH_DATA_FILE} 202 ab305d54-85b4-a31b-7db2-fb6b9e546025
Publish VES Event With Invalid URL Path HTTPS
[Tags] DCAE-VESC-R1
- [Documentation] Use invalid url path to expect 404 response
- ${evtdata}= Get Data From File ${EVENT_DATA_FILE}
+ [Documentation] Post single event to invalid url path over HTTPS and expect 404 response Status Code
Log Send HTTP Request with invalid /eventlistener/v5/ instead of /eventListener/v5 path
- ${resp}= Publish Event To VES Collector /eventlistener/v5 ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 404
-
-Publish PNF Registration Event
- [Tags] DCAE-VESC-R1
- [Documentation] Post PNF registration event and expect 200 Response
- ${evtdata}= Get Data From File ${EVENT_PNF_REGISTRATION}
- ${resp}= Publish Event To VES Collector No Auth ${VES_ANY_EVENT_PATH} ${evtdata}
- Log Receive HTTP Status code ${resp.status_code}
- Should Be Equal As Strings ${resp.status_code} 200
- ${isEmpty}= Is Json Empty ${resp}
- Run Keyword If '${isEmpty}' == False Log ${resp.json()}
- ${ret}= DMaaP Message Receive QTFCOC540002E-reg
- Should Be Equal As Strings ${ret} true
- \ No newline at end of file
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} /eventlistener/v5 ${EVENT_DATA_FILE} 404
+
+Publish Single VES VNF Measurement Event over HTTP
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event over HTTP with authentication enabled and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${http_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 400
+
+Publish Single VES VNF Measurement Event with certBasicAuth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event over HTTPS with wrong JSON
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with invalid data and valid username/password to /eventListener/v7 endpoint over HTTPS and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_INVALID_JSON_V7} 400
+
+Publish Single VES VNF Measurement Event With Wrong Auth
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and invalid username/password to /eventListener/v7 endpoint over HTTPS and expect 401 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_wrong_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 401
+
+Publish Single VES VNF Measurement Event With Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and valid certificate to /eventListener/v7 endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_valid_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 202 ab305d54-85b4-a31b-7db2-fb6b9e546015
+
+Publish Single VES VNF Measurement Event With Wrong Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and invalid certificate to /eventListener/v7 endpoint over HTTPS and expect SSLError with certificate unknown
+ @{err_content} Create List certificate unknown
+ Send Request And Expect Error Publish Event To VES Collector ${https_invalid_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} SSLError:* @{err_content}
+
+Publish Single VES VNF Measurement Event With Outdated Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and outdated certificate to /eventListener/v7 endpoint over HTTPS and expect SSLError with certificate unknown
+ @{err_content} Create List certificate unknown
+ Send Request And Expect Error Publish Event To VES Collector ${https_outdated_cert_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} SSLError:* @{err_content}
+
+Publish Single VES VNF Measurement Event Without Auth And Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and without certificate or username/password to /eventListener/v7 endpoint over HTTPS and expect 401 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_no_cert_no_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7} 401
+
+Publish V7 Batch Event with certBasicAuth over HTTPS
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and valid username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 202 Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion
+
+Publish V7 Batch Event With Wrong Auth
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and invalid username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 401 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_wrong_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 401
+
+Publish V7 Batch Event With Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and valid certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect 202 Response
+ Send Request And Validate Response Publish Event To VES Collector ${https_valid_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 202 Fault_Vscf:Acs-Ericcson_PilotNumberPoolExhaustion
+
+Publish V7 Batch With Wrong Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and invalid certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect SSLError with certificate unknown
+ @{err_content} Create List certificate unknown
+ Send Request And Expect Error Publish Event To VES Collector ${https_invalid_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} SSLError:* @{err_content}
+
+Publish V7 Batch Event With Outdated Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and outdated certificate to /eventListener/v7/eventBatch endpoint over HTTPS and expect SSLError with certificate unknown
+ @{err_content} Create List certificate unknown
+ Send Request And Expect Error Publish Event To VES Collector ${https_outdated_cert_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} SSLError:* @{err_content}
+
+Publish V7 Batch Event Without Auth And Cert
+ [Tags] DCAE-VESC-R1
+ [Documentation] Post single event with valid data and without certificate or username/password to /eventListener/v7/eventBatch endpoint over HTTPS and expect 401 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_no_cert_no_auth_session} ${VES_BATCH_EVENT_ENDPOINT_V7} ${VES_VALID_BATCH_JSON_V7} 401
diff --git a/tests/dcaegen2/testcases/resources/CertsLibrary.py b/tests/dcaegen2/testcases/resources/CertsLibrary.py
new file mode 100644
index 00000000..b8189422
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/CertsLibrary.py
@@ -0,0 +1,42 @@
+
+import os
+import subprocess
+import time
+
+from robot.api import logger
+
+
+class CertsLibrary(object):
+
+ def __init__(self):
+ pass
+
+
+
+ @staticmethod
+ def generate_certs():
+ ws = os.environ['WORKSPACE']
+ script2run = ws + "/tests/dcaegen2/testcases/resources/gen-certs.sh"
+ logger.info("Running script: " + script2run)
+ logger.console("Running script: " + script2run)
+ subprocess.call([script2run, ws])
+ time.sleep(5)
+ return
+
+ @staticmethod
+ def remove_certs():
+ ws = os.environ['WORKSPACE']
+ script2run = ws + "/tests/dcaegen2/testcases/resources/rm-certs.sh"
+ logger.info("Running script: " + script2run)
+ logger.console("Running script: " + script2run)
+ subprocess.call([script2run, ws])
+ time.sleep(5)
+ return
+
+
+
+
+
+
+
+
diff --git a/tests/dcaegen2/testcases/resources/DMaaP.py b/tests/dcaegen2/testcases/resources/DMaaP.py
index 092b6081..779397e4 100644
--- a/tests/dcaegen2/testcases/resources/DMaaP.py
+++ b/tests/dcaegen2/testcases/resources/DMaaP.py
@@ -17,8 +17,6 @@ import jsonschema
import json
import DcaeVariables
import SimpleHTTPServer
-from robot.api import logger
-
try:
from cStringIO import StringIO
@@ -42,10 +40,6 @@ def enque_event(evt):
if DcaeVariables.VESEventQ is not None:
try:
DcaeVariables.VESEventQ.put(evt)
- if DcaeVariables.IsRobotRun:
- logger.console("DMaaP Event enqued - size=" + str(len(evt)))
- else:
- print ("DMaaP Event enqueued - size=" + str(len(evt)))
return True
except Exception as e:
print (str(e))
@@ -55,18 +49,14 @@ def enque_event(evt):
def deque_event(wait_sec=25):
if DcaeVariables.IsRobotRun:
- logger.console("Enter DequeEvent")
+ pass
try:
evt = DcaeVariables.VESEventQ.get(True, wait_sec)
- if DcaeVariables.IsRobotRun:
- logger.console("DMaaP Event dequeued - size=" + str(len(evt)))
- else:
- print("DMaaP Event dequeued - size=" + str(len(evt)))
return evt
except Exception as e:
if DcaeVariables.IsRobotRun:
- logger.console(str(e))
- logger.console("DMaaP Event dequeue timeout")
+ pass
+
else:
print("DMaaP Event dequeue timeout")
return None
@@ -79,7 +69,6 @@ class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
return
def do_POST(self):
-
resp_code = 0
# Parse the form data posted
'''
@@ -120,12 +109,6 @@ class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
content_len = int(self.headers.getheader('content-length', 0))
post_body = self.rfile.read(content_len)
- if DcaeVariables.IsRobotRun:
- logger.console("\n" + "DMaaP Receive Event:\n" + post_body)
- else:
- print("\n" + "DMaaP Receive Event:")
- print (post_body)
-
indx = post_body.index("{")
if indx != 0:
post_body = post_body[indx:]
@@ -168,7 +151,6 @@ class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
self.send_response(200)
self.send_header('Content-Type', 'application/json')
self.end_headers()
- # self.wfile.write("{'responses' : {'200' : {'description' : 'Success'}}}")
self.wfile.write("{'count': 1, 'serverTimeMs': 3}")
self.wfile.close()
else:
diff --git a/tests/dcaegen2/testcases/resources/DcaeLibrary.py b/tests/dcaegen2/testcases/resources/DcaeLibrary.py
index d4188e30..6b96826c 100644
--- a/tests/dcaegen2/testcases/resources/DcaeLibrary.py
+++ b/tests/dcaegen2/testcases/resources/DcaeLibrary.py
@@ -64,7 +64,7 @@ class DcaeLibrary(object):
return "false"
@staticmethod
- def enable_vesc_https_auth():
+ def enable_vesc_with_certBasicAuth():
global client
if 'Windows' in platform.system():
try:
@@ -85,14 +85,13 @@ class DcaeLibrary(object):
logger.console("Running script: " + script2run)
subprocess.call(script2run)
time.sleep(5)
- return
-
+ return
+
@staticmethod
def dmaap_message_receive(evtobj, action='contain'):
evt_str = DMaaP.deque_event()
while evt_str != None:
- logger.console("DMaaP receive VES Event:\n" + evt_str)
if action == 'contain':
if evtobj in evt_str:
logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
diff --git a/tests/dcaegen2/testcases/resources/collector.properties b/tests/dcaegen2/testcases/resources/collector.properties
index 1c5c8411..c555e485 100755
--- a/tests/dcaegen2/testcases/resources/collector.properties
+++ b/tests/dcaegen2/testcases/resources/collector.properties
@@ -11,64 +11,55 @@
## Normally:
##
## - 8080 is http service
-## - https is disabled by default (-1)
+## - https is disabled by default
##
## - At this time, the server always binds to 0.0.0.0
##
-## The default port when header.authflag is disabled (0)
-#collector.service.port=8080
+##
+collector.service.port=8080
-## The secure port is required if header.authflag is set to 1 (true)
## Authentication is only supported via secure port
## When enabled - require valid keystore defined
collector.service.secure.port=8443
+# auth.method flags:
+#
+# noAuth - default option - no security (http)
+# certOnly - auth by certificate (https)
+# basicAuth - auth by basic auth username and password (https)
+# certBasicAuth - auth by certificate and basic auth username / password (https)
+auth.method=certBasicAuth
+
+## Combination of userid,hashPassword encoded pwd list to be supported
+## userid and pwd comma separated; pipe delimitation between each pair
+## Password is generated by crypt-password library using BCrypt algorithm stored in dcaegen2/sdk package
+## or https://nexus.onap.org/#nexus-search;quick~crypt-password
+header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6
+
## The keystore must be setup per installation when secure port is configured
-collector.keystore.file.location=../etc/keystore
-collector.keystore.passwordfile=./etc/passwordfile
-collector.keystore.alias=tomcat
+collector.keystore.file.location=etc/keystore
+collector.keystore.passwordfile=etc/passwordfile
+collector.cert.subject.matcher=etc/certSubjectMatcher.properties
-###############################################################################
-## Processing
-##
-## If there's a problem that prevents the collector from processing alarms,
-## it's normally better to apply back pressure to the caller than to try to
-## buffer beyond a reasonable size limit. With a limit, the server won't crash
-## due to being out of memory, and the caller will get a 5xx reply saying the
-## server is in trouble.
-collector.inputQueue.maxPending=8096
+## The truststore must be setup per installation when mutual tls support is configured
+collector.truststore.file.location=etc/truststore
+collector.truststore.passwordfile=etc/trustpasswordfile
## Schema Validation checkflag
## default no validation checkflag (-1)
## If enabled (1) - schemafile location must be specified
collector.schema.checkflag=1
-collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.3.json\"}
+collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.0.1.json\"}
-## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
-collector.dmaap.streamid=fault=sec_fault|syslog=sec_syslog|heartbeat=sec_heartbeat|measurementsForVfScaling=sec_measurement|mobileFlow=sec_mobileflow|other=sec_other|stateChange=sec_statechange|thresholdCrossingAlert=sec_thresholdCrossingAlert|voiceQuality=ves_voicequality|sipSignaling=ves_sipsignaling
+## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
+collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration
collector.dmaapfile=./etc/DmaapConfig.json
-## Custom ExceptionConfiguration
-exceptionConfig=./etc/ExceptionConfig.json
-
-## authflag control authentication by the collector
-## If enabled (1) - then authlist has to be defined
-## When authflag is enabled, only secure port will be supported
-## To disable enter 0
-header.authflag=1
-## Combination of userid,base64 encoded pwd list to be supported
-## userid and pwd comma separated; pipe delimitation between each pair
-header.authlist=sample1,c2FtcGxlMQ==|vdnsagg,dmRuc2FnZw==
-
## Event transformation Flag - when set expects configurable transformation
## defined under ./etc/eventTransform.json
## Enabled by default; to disable set to 0
event.transform.flag=0
-###############################################################################
-##
-## Tomcat control
-##
-#tomcat.maxthreads=(tomcat default, which is usually 200)
-
+# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
+collector.dynamic.config.update.frequency=5
diff --git a/tests/dcaegen2/testcases/resources/dcae_keywords.robot b/tests/dcaegen2/testcases/resources/dcae_keywords.robot
index 013f6f03..0011ab88 100644
--- a/tests/dcaegen2/testcases/resources/dcae_keywords.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_keywords.robot
@@ -1,23 +1,36 @@
*** Settings ***
Documentation The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields
Library RequestsLibrary
-Library DcaeLibrary
+Library DcaeLibrary
Library OperatingSystem
Library Collections
+Library CertsLibrary
Variables ../resources/DcaeVariables.py
+Resource ../../../common.robot
Resource ../resources/dcae_properties.robot
-*** Variables ***
-${DCAE_HEALTH_CHECK_BODY} %{WORKSPACE}/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json
-
*** Keywords ***
Create sessions
[Documentation] Create all required sessions
- Create Session dcae_vesc_url ${VESC_URL}
- Set Suite Variable ${suite_dcae_vesc_url_session} dcae_vesc_url
${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD}
+ ${wrong_auth}= Create List ${VESC_HTTPS_WRONG_USER} ${VESC_HTTPS_WRONG_PD}
+ ${certs}= Create List ${VESC_CERT} ${VESC_KEY}
+ ${wrong_certs}= Create List ${VESC_WRONG_CERT} ${VESC_WRONG_KEY}
+ ${outdated_certs}= Create List ${VESC_OUTDATED_CERT} ${VESC_OUTDATED_KEY}
+ Create Session dcae_vesc_url ${VESC_URL}
+ Set Suite Variable ${http_session} dcae_vesc_url
Create Session dcae_vesc_url_https ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1
- Set Suite Variable ${suite_dcae_vesc_url_https_session} dcae_vesc_url_https
+ Set Suite Variable ${https_basic_auth_session} dcae_vesc_url_https
+ Create Session dcae_vesc_url_https_wrong_auth ${VESC_URL_HTTPS} auth=${wrong_auth} disable_warnings=1
+ Set Suite Variable ${https_wrong_auth_session} dcae_vesc_url_https_wrong_auth
+ Create Client Cert Session dcae_vesc_url_https_cert ${VESC_URL_HTTPS} client_certs=${certs} disable_warnings=1
+ Set Suite Variable ${https_valid_cert_session} dcae_vesc_url_https_cert
+ Create Client Cert Session dcae_vesc_url_https_wrong_cert ${VESC_URL_HTTPS} client_certs=${wrong_certs} disable_warnings=1 verify=${False}
+ Set Suite Variable ${https_invalid_cert_session} dcae_vesc_url_https_wrong_cert
+ Create Client Cert Session dcae_vesc_url_https_outdated_cert ${VESC_URL_HTTPS} client_certs=${outdated_certs} disable_warnings=1 verify=${False}
+ Set Suite Variable ${https_outdated_cert_session} dcae_vesc_url_https_outdated_cert
+ Create Session dcae_vesc_url_https_wo_auth ${VESC_URL_HTTPS} disable_warnings=1
+ Set Suite Variable ${https_no_cert_no_auth_session} dcae_vesc_url_https_wo_auth
Create header
${headers}= Create Dictionary Content-Type=application/json
@@ -25,7 +38,6 @@ Create header
Get DCAE Nodes
[Documentation] Get DCAE Nodes from Consul Catalog
- #Log Creating session ${GLOBAL_DCAE_CONSUL_URL}
${session}= Create Session dcae ${GLOBAL_DCAE_CONSUL_URL}
${uuid}= Generate UUID
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-Consul-Token=abcd1234 X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
@@ -33,8 +45,8 @@ Get DCAE Nodes
Log Received response from dcae consul: ${resp.json()}
Should Be Equal As Strings ${resp.status_code} 200
${NodeList}= Get Json Value List ${resp.text} Node
- ${NodeListLength}= Get Length ${NodeList}
- ${len}= Get Length ${NodeList}
+ ${NodeListLength}= Get Length ${NodeList}
+ ${len}= Get Length ${NodeList}
Should Not Be Equal As Integers ${len} 0
[Return] ${NodeList}
@@ -52,11 +64,10 @@ DCAE Node Health Check
${len}= Get Length ${StatusList}
Should Not Be Equal As Integers ${len} 0
DCAE Check Health Status ${NodeName} ${StatusList[0]} Serf Health Status
- #Run Keyword if ${len} > 1 DCAE Check Health Status ${NodeName} ${StatusList[1]} Serf Health Status
DCAE Check Health Status
[Arguments] ${NodeName} ${ItemStatus} ${CheckType}
- Should Be Equal As Strings ${ItemStatus} passing
+ Should Be Equal As Strings ${ItemStatus} passing
Log Node: ${NodeName} ${CheckType} check pass ok
VES Collector Suite Setup DMaaP
@@ -76,11 +87,11 @@ Check DCAE Results
@{headers}= Get From Dictionary ${json['returns']} columns
# Retrieve column names from headers
${columns}= Create List
- :for ${header} in @{headers}
+ :for ${header} IN @{headers}
\ ${colName}= Get From Dictionary ${header} colName
\ Append To List ${columns} ${colName}
# Process each row making sure status=GREEN
- :for ${row} in @{rows}
+ :for ${row} IN @{rows}
\ ${cells}= Get From Dictionary ${row} cells
\ ${dict}= Make A Dictionary ${cells} ${columns}
\ Dictionary Should Contain Item ${dict} healthTestStatus GREEN
@@ -91,15 +102,15 @@ Make A Dictionary
${dict}= Create Dictionary
${collength}= Get Length ${columns}
${namelength}= Get Length ${names}
- :for ${index} in range 0 ${collength}
+ :for ${index} IN RANGE 0 ${collength}
\ ${name}= Evaluate ${names}[${index}]
\ ${valued}= Evaluate ${columns}[${index}]
\ ${value}= Get From Dictionary ${valued} ${valueName}
- \ Set To Dictionary ${dict} ${name} ${value}
+ \ Set To Dictionary ${dict} ${name} ${value}
[Return] ${dict}
Json String To Dictionary
- [Arguments] ${json_string}
+ [Arguments] ${json_string}
${json_dict}= evaluate json.loads('''${json_string}''') json
[Return] ${json_dict}
@@ -110,36 +121,53 @@ Dictionary To Json String
Get DCAE Service Component Status
[Documentation] Get the status of a DCAE Service Component
- [Arguments] ${url} ${urlpath} ${usr} ${passwd}
+ [Arguments] ${url} ${urlpath} ${usr} ${passwd}
${auth}= Create List ${usr} ${passwd}
${session}= Create Session dcae-service-component ${url} auth=${auth}
${resp}= Get Request dcae-service-component ${urlpath}
[Return] ${resp}
-Publish Event To VES Collector No Auth
- [Documentation] Send an event to VES Collector
- [Arguments] ${evtpath} ${evtdata}
- ${resp}= Post Request ${suite_dcae_vesc_url_session} ${evtpath} data=${evtdata} headers=${suite_headers}
- #Log Received response from dcae ${resp.json()}
- [Return] ${resp}
-
Publish Event To VES Collector
[Documentation] Send an event to VES Collector
- [Arguments] ${evtpath} ${evtdata}
- ${resp}= Post Request ${suite_dcae_vesc_url_https_session} ${evtpath} data=${evtdata} headers=${suite_headers}
- #Log Received response from dcae ${resp.json()}
+ [Arguments] ${session} ${evtpath} ${evtdata}
+ ${resp}= Post Request ${session} ${evtpath} data=${evtdata} headers=${suite_headers}
[Return] ${resp}
Publish Event To VES Collector With Put Method
[Documentation] Send an event to VES Collector
- [Arguments] ${evtpath} ${evtdata}
- ${resp}= Put Request ${suite_dcae_vesc_url_https_session} ${evtpath} data=${evtdata} headers=${suite_headers}
- #Log Received response from dcae ${resp.json()}
+ [Arguments] ${session} ${evtpath} ${evtdata}
+ ${resp}= Put Request ${session} ${evtpath} data=${evtdata} headers=${suite_headers}
[Return] ${resp}
-Publish Event To VES Collector With Put Method No Auth
- [Documentation] Send an event to VES Collector
- [Arguments] ${evtpath} ${evtdata}
- ${resp}= Put Request ${suite_dcae_vesc_url_session} ${evtpath} data=${evtdata} headers=${suite_headers}
- #Log Received response from dcae ${resp.json()}
- [Return] ${resp}
+Send Request And Validate Response
+ [Documentation] Post singel event to passed url with passed data and validate received response
+ [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${resp_code} ${msg_code}=None
+ ${evtdata}= Get Data From File ${evtjson}
+ ${resp}= Run Keyword ${keyword} ${session} ${evtpath} ${evtdata}
+ Log Receive HTTPS Status code ${resp.status_code}
+ Should Be Equal As Strings ${resp.status_code} ${resp_code}
+ ${isEmpty}= Is Json Empty ${resp}
+ Run Keyword If '${isEmpty}' == False Log ${resp.json()}
+ Run Keyword If '${msg_code}' != 'None' Check Whether Message Received ${msg_code}
+
+Check Whether Message Received
+ [Documentation] Validare if message has been received
+ [Arguments] ${msg_code}
+ ${ret}= DMaaP Message Receive ${msg_code}
+ Should Be Equal As Strings ${ret} true
+
+Send Request And Expect Error
+ [Documentation] Post singel event to passed url with passed data and expect error
+ [Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${error_type} @{error_content}
+ ${evtdata}= Get Data From File ${evtjson}
+ ${err_msg}= Run Keyword And Expect Error ${error_type} ${keyword} ${session} ${evtpath} ${evtdata}
+ :FOR ${content} IN @{error_content}
+ \ Should Contain ${err_msg} ${content}
+ Log Recieved error message ${err_msg}
+
+Run Healthcheck
+ [Documentation] Run Healthcheck
+ ${uuid}= Generate UUID
+ ${headers}= Create Dictionary Accept=*/* X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Get Request ${http_session} /healthcheck headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 200
diff --git a/tests/dcaegen2/testcases/resources/dcae_properties.robot b/tests/dcaegen2/testcases/resources/dcae_properties.robot
index 135ff263..5262330b 100644
--- a/tests/dcaegen2/testcases/resources/dcae_properties.robot
+++ b/tests/dcaegen2/testcases/resources/dcae_properties.robot
@@ -4,11 +4,47 @@ Documentation store all properties that can change or are used in multipl
... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
*** Variables ***
-${GLOBAL_APPLICATION_ID} robot-dcaegen2
-${GLOBAL_DCAE_CONSUL_URL} http://135.205.228.129:8500
-${GLOBAL_DCAE_CONSUL_URL1} http://135.205.228.170:8500
-${GLOBAL_DCAE_VES_URL} http://localhost:8443/eventlistener/v5
-${GLOBAL_DCAE_USERNAME} console
-${GLOBAL_DCAE_PASSWORD} ZjJkYjllMjljMTI2M2Iz
-${VESC_HTTPS_USER} sample1
-${VESC_HTTPS_PD} sample1
+
+${GLOBAL_APPLICATION_ID} robot-dcaegen2
+${GLOBAL_DCAE_CONSUL_URL} http://135.205.228.129:8500
+${GLOBAL_DCAE_CONSUL_URL1} http://135.205.228.170:8500
+${GLOBAL_DCAE_VES_URL} http://localhost:8443/eventlistener/v5
+${GLOBAL_DCAE_USERNAME} console
+${GLOBAL_DCAE_PASSWORD} ZjJkYjllMjljMTI2M2Iz
+${VESC_HTTPS_USER} sample1
+${VESC_HTTPS_PD} sample1
+${VESC_HTTPS_WRONG_PD} sample
+${VESC_HTTPS_WRONG_USER} sample
+${VESC_CERT} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/temporary.crt
+${VESC_KEY} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/temporary.key
+${VESC_WRONG_CERT} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/wrong.crt
+${VESC_WRONG_KEY} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/wrong.key
+${VESC_OUTDATED_CERT} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/outdated.crt
+${VESC_OUTDATED_KEY} %{WORKSPACE}/tests/dcaegen2/testcases/assets/certs/outdated.key
+
+${VESC_URL_HTTPS} https://%{VESC_IP}:8443
+${VESC_URL} http://%{VESC_IP}:8080
+${VES_ANY_EVENT_PATH} /eventListener/v5
+${VES_BATCH_EVENT_PATH} /eventListener/v5/eventBatch
+${VES_THROTTLE_STATE_EVENT_PATH} /eventListener/v5/clientThrottlingState
+${VES_EVENTLISTENER_V7} /eventListener/v7
+${VES_BATCH_EVENT_ENDPOINT_V7} /eventListener/v7/eventBatch
+${VES_VALID_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid.json
+${VES_INVALID_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_invalid.json
+${VES_MISSING_MANDATORY_DOMAIN_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_missing_mandatory_domain.json
+${VES_VALID_BATCH_JSON_V7} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_batch_valid.json
+${EVENT_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event.json
+${EVENT_MEASURE_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_vfirewall_measurement.json
+${EVENT_DATA_FILE_BAD} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_single_fault_event_bad.json
+${EVENT_BATCH_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_fault_eventlist_batch.json
+${EVENT_THROTTLING_STATE_DATA_FILE} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_volte_fault_provide_throttle_state.json
+${EVENT_PNF_REGISTRATION} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_pnf_registration_event.json
+${DCAE_HEALTH_CHECK_BODY} %{WORKSPACE}/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json
+
+#DCAE Health Check
+${CONFIG_BINDING_URL} http://localhost:8443
+${CB_HEALTHCHECK_PATH} /healthcheck
+${CB_SERVICE_COMPONENT_PATH} /service_component/
+${VES_Service_Name1} dcae-controller-ves-collector
+${VES_Service_Name2} ves-collector-not-exist
+
diff --git a/tests/dcaegen2/testcases/resources/gen-certs.sh b/tests/dcaegen2/testcases/resources/gen-certs.sh
new file mode 100755
index 00000000..f3f358f9
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/gen-certs.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+WS=$1
+dir=$WS/tests/dcaegen2/testcases/assets/certs
+
+openssl genrsa -out "$dir/temporary.key" 2048
+
+openssl req -new -key "$dir/temporary.key" -subj "/C=PL/ST=DL/O=Nokia/CN=dcaegen2" -out "$dir/temporary.csr"
+
+openssl x509 -req -in "$dir/temporary.csr" -CA "$dir/rootCA.crt" -CAkey "$dir/rootCA.key" -passin pass:collector -CAcreateserial -out "$dir/temporary.crt" -days 1 -sha256
diff --git a/tests/dcaegen2/testcases/resources/rm-certs.sh b/tests/dcaegen2/testcases/resources/rm-certs.sh
new file mode 100755
index 00000000..827849c7
--- /dev/null
+++ b/tests/dcaegen2/testcases/resources/rm-certs.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+WS=$1
+dir=$WS/tests/dcaegen2/testcases/assets/certs
+
+rm "$dir/temporary.crt" "$dir/temporary.csr" "$dir/temporary.key" "$dir/rootCA.srl" \ No newline at end of file
diff --git a/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh b/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh
index 0755f077..29700bc5 100755
--- a/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh
+++ b/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh
@@ -14,10 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-docker exec -it vesc /opt/app/VESCollector/bin/VESrestfulCollector.sh stop
-sleep 2
+docker exec vesc /opt/app/VESCollector/bin/appController.sh stop
+sleep 2
docker cp ${WORKSPACE}/tests/dcaegen2/testcases/resources/collector.properties vesc:/opt/app/VESCollector/etc
-sleep 10
-docker exec -id vesc /opt/app/VESCollector/bin/VESrestfulCollector.sh start
+sleep 10
+docker exec vesc /opt/app/VESCollector/bin/appController.sh start
sleep 5
-echo "VES Collector Restarted"
+echo "VES Collector Restarted with certBasicAuth"
diff --git a/tests/policy/apex-pdp/apex-pdp-test.robot b/tests/policy/apex-pdp/apex-pdp-test.robot
index dcdf2d80..9956731d 100644
--- a/tests/policy/apex-pdp/apex-pdp-test.robot
+++ b/tests/policy/apex-pdp/apex-pdp-test.robot
@@ -60,7 +60,7 @@ DeployOperationalPolicy
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}= Post Request policy /policy/pap/v1/pdps data=${postjson} headers=${headers}
+ ${resp}= Post Request policy /policy/pap/v1/pdps/deployments/batch data=${postjson} headers=${headers}
Log Received response from policy5 ${resp.text}
${postjsonobject} To Json ${postjson}
Should Be Equal As Strings ${resp.status_code} 200
diff --git a/tests/policy/apex-pdp/data/pdp_update.json b/tests/policy/apex-pdp/data/pdp_update.json
index ee485998..e880d5ed 100644
--- a/tests/policy/apex-pdp/data/pdp_update.json
+++ b/tests/policy/apex-pdp/data/pdp_update.json
@@ -2,110 +2,14 @@
"groups": [
{
"name": "defaultGroup",
- "description": "The default group that registers all supported policy types and pdps.",
- "pdpGroupState": "ACTIVE",
- "properties": {},
- "pdpSubgroups": [
+ "deploymentSubgroups": [
{
"pdpType": "apex",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.operational.Apex",
- "version": "1.0.0"
- }
- ],
+ "action": "POST",
"policies": [{
"name": "onap.policies.controlloop.Operational.apex.sampledomain",
"version": "1.0.0"
- }],
- "currentInstanceCount": 1,
- "desiredInstanceCount": 1,
- "properties": {},
- "pdpInstances": []
- },
- {
- "pdpType": "drools",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.Operational",
- "version": "1.0.0"
- }
- ],
- "policies": [],
- "currentInstanceCount": 0,
- "desiredInstanceCount": 1,
- "properties": {},
- "pdpInstances": []
- },
- {
- "pdpType": "xacml",
- "supportedPolicyTypes": [
- {
- "name": "onap.policies.controlloop.guard.FrequencyLimiter",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.MinMax",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.Blacklist",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.controlloop.guard.coordination.FirstBlocksSecond",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.monitoring.cdap.tca.hi.lo.app",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.AffinityPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.DistancePolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.HpaPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.OptimizationPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.PciPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.QueryPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.SubscriberPolicy",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.Vim_fit",
- "version": "1.0.0"
- },
- {
- "name": "onap.policies.optimization.VnfPolicy",
- "version": "1.0.0"
- }
- ],
- "policies": [],
- "currentInstanceCount": 0,
- "desiredInstanceCount": 1,
- "properties": {},
- "pdpInstances": []
+ }]
}
]
}
diff --git a/tests/policy/api/api-test.robot b/tests/policy/api/api-test.robot
index 7f108d01..19aa18ab 100644
--- a/tests/policy/api/api-test.robot
+++ b/tests/policy/api/api-test.robot
@@ -7,7 +7,7 @@ Library json
*** Test Cases ***
Healthcheck
[Documentation] Runs Policy Api Health check
- ${auth}= Create List healthcheck zb!XztG34
+ ${auth}= Create List healthcheck zb!XztG34
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -18,7 +18,7 @@ Healthcheck
Statistics
[Documentation] Runs Policy Api Statistics
- ${auth}= Create List healthcheck zb!XztG34
+ ${auth}= Create List healthcheck zb!XztG34
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -29,7 +29,7 @@ Statistics
RetrievePolicyTypes
[Documentation] Gets Policy Types
- ${auth}= Create List healthcheck zb!XztG34
+ ${auth}= Create List healthcheck zb!XztG34
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -38,10 +38,21 @@ RetrievePolicyTypes
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['version']} 1.0.0
-CreateTCAPolicyType
- [Documentation] Create TCA Policy Type
- ${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.json
+CreateTCAPolicyTypeV1
+ [Documentation] Create TCA Policy Type Version 1
+ ${auth}= Create List healthcheck zb!XztG34
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy /policy/api/v1/policytypes data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 406
+
+CreateTCAPolicyTypeV2
+ [Documentation] Create TCA Policy Type Version 2
+ ${auth}= Create List healthcheck zb!XztG34
+ ${postjson}= Get file ${CURDIR}/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -49,12 +60,12 @@ CreateTCAPolicyType
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
${postjsonobject} To Json ${postjson}
- Dictionary Should Contain Key ${resp.json()} tosca_definitions_version
- Dictionary Should Contain Key ${postjsonobject} tosca_definitions_version
+ Dictionary Should Contain Key ${resp.json()} tosca_definitions_version
+ Dictionary Should Contain Key ${postjsonobject} tosca_definitions_version
RetrieveMonitoringPolicyTypes
[Documentation] Retrieve Monitoring related Policy Types
- ${auth}= Create List healthcheck zb!XztG34
+ ${auth}= Create List healthcheck zb!XztG34
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -64,10 +75,10 @@ RetrieveMonitoringPolicyTypes
List Should Contain Value ${resp.json()['policy_types']} onap.policies.Monitoring
-CreateNewMonitoringPolicy
- [Documentation] Create a new Monitoring TCA policy
- ${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
+CreateNewMonitoringPolicyV1
+ [Documentation] Create a new Monitoring TCA policy version 1
+ ${auth}= Create List healthcheck zb!XztG34
+ ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -78,10 +89,21 @@ CreateNewMonitoringPolicy
Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} onap.restart.tca
Dictionary Should Contain Key ${postjsonobject['topology_template']['policies'][0]} onap.restart.tca
-SimpleCreateNewMonitoringPolicy
- [Documentation] Create a new Monitoring TCA policiy using simple endpoint
- ${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
+SimpleCreateNewMonitoringPolicyV1
+ [Documentation] Create a new Monitoring TCA policiy version 1 using simple endpoint
+ ${auth}= Create List healthcheck zb!XztG34
+ ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy /policy/api/v1/policies data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 406
+
+SimpleCreateNewMonitoringPolicyV2
+ [Documentation] Create a new Monitoring TCA policiy version 2 using simple endpoint
+ ${auth}= Create List healthcheck zb!XztG34
+ ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v2.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -95,7 +117,7 @@ SimpleCreateNewMonitoringPolicy
RetrievePoliciesOfType
[Documentation] Retrieve all Policies Created for a specific Policy Type
${auth}= Create List healthcheck zb!XztG34
- ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
+ ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
@@ -106,8 +128,8 @@ RetrievePoliciesOfType
Dictionary Should Contain Key ${resp.json()['topology_template']['policies'][0]} onap.restart.tca
Dictionary Should Contain Key ${expjsonobject['topology_template']['policies'][0]} onap.restart.tca
-DeleteSpecificPolicy
- [Documentation] Delete Policy of a Type
+DeleteSpecificPolicyV1
+ [Documentation] Delete the Monitoring Policy Version 1 of the TCA Policy Type
${auth}= Create List healthcheck zb!XztG34
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
@@ -117,3 +139,39 @@ DeleteSpecificPolicy
Should Be Equal As Strings ${resp.status_code} 200
${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/1.0.0 headers=${headers}
Should Be Equal As Strings ${resp.status_code} 404
+
+DeleteSpecificPolicyV2
+ [Documentation] Delete the Monitoring Policy Version 2 of the TCA Policy Type
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0 headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies/onap.restart.tca/versions/2.0.0 headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 404
+
+DeleteSpecificPolicyTypeV1
+ [Documentation] Delete the TCA Policy Type Version 1
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0 headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0 headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 404
+
+DeleteSpecificPolicyTypeV2
+ [Documentation] Delete the TCA Policy Type Version 2
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_API_IP}:6969
+ ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0 headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Delete Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/2.0.0 headers=${headers}
+ Should Be Equal As Strings ${resp.status_code} 404
diff --git a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.json b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
index f06247d7..f06247d7 100644
--- a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.json
+++ b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v1.json
diff --git a/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
new file mode 100644
index 00000000..0076e829
--- /dev/null
+++ b/tests/policy/api/data/onap.policy.monitoring.cdap.tca.hi.lo.app.v2.json
@@ -0,0 +1,209 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "policy_types": {
+ "onap.policies.monitoring.cdap.tca.hi.lo.app": {
+ "derived_from": "onap.policies.Monitoring",
+ "version": "2.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"
+ }
+ }
+ }
+ }
+}
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
index a8ffe520..56bb18dd 100644
--- a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.json
+++ b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v1.json
@@ -6,7 +6,7 @@
"onap.restart.tca": {
"type": "onap.policies.monitoring.cdap.tca.hi.lo.app",
"version": "1.0.0",
- "type_version": "1.0.0",
+ "type_version": "1.0.0",
"metadata": {
"policy-id": "onap.restart.tca"
},
diff --git a/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.json
new file mode 100644
index 00000000..371b9801
--- /dev/null
+++ b/tests/policy/api/data/vCPE.policy.monitoring.input.tosca.v2.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": "2.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/tests/policy/pap/data/create.group.request.json b/tests/policy/pap/data/create.group.request.json
index b0937f7f..ea04c0e5 100644
--- a/tests/policy/pap/data/create.group.request.json
+++ b/tests/policy/pap/data/create.group.request.json
@@ -17,12 +17,7 @@
"version": "1.0.0"
}
],
- "policies": [
- {
- "name": "onap.restart.tca",
- "version": "1.0.0"
- }
- ]
+ "policies": []
},
{
"pdpType": "pdpTypeB",
diff --git a/tests/policy/pap/data/deploy.group.request.json b/tests/policy/pap/data/deploy.group.request.json
new file mode 100644
index 00000000..7f3694de
--- /dev/null
+++ b/tests/policy/pap/data/deploy.group.request.json
@@ -0,0 +1,19 @@
+{
+ "groups": [
+ {
+ "name": "create.group.request",
+ "deploymentSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "action": "POST",
+ "policies": [
+ {
+ "name": "onap.restart.tca",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
index f2dd61da..36b593c7 100644
--- a/tests/policy/pap/pap-test.robot
+++ b/tests/policy/pap/pap-test.robot
@@ -34,7 +34,7 @@ CreatePdpGroups
${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}
+ ${resp}= Post Request policy /policy/pap/v1/pdps/groups/batch data=${postjson} headers=${headers}
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
@@ -61,6 +61,17 @@ QueryPdpGroups
Should Be Equal As Strings ${resp.json()['groups'][0]['pdpGroupState']} ACTIVE
Should Be Equal As Strings ${resp.json()['groups'][1]['name']} defaultGroup
+DeployPdpGroups
+ [Documentation] Runs Policy PAP Deploy Policies to PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${postjson}= Get file ${CURDIR}/data/deploy.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/deployments/batch data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
UndeployPolicy
[Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
${auth}= Create List healthcheck zb!XztG34
diff --git a/tests/policy/xacml-pdp/xacml-pdp-test.robot b/tests/policy/xacml-pdp/xacml-pdp-test.robot
index 8227996f..0305af8e 100644
--- a/tests/policy/xacml-pdp/xacml-pdp-test.robot
+++ b/tests/policy/xacml-pdp/xacml-pdp-test.robot
@@ -28,7 +28,6 @@ Statistics
Should Be Equal As Strings ${resp.json()['code']} 200
ExecuteXacmlPolicy
- Wait Until Keyword Succeeds 2 min 5 sec CreateMonitorPolicyType
Wait Until Keyword Succeeds 2 min 5 sec CreateNewMonitorPolicy
Wait Until Keyword Succeeds 2 min 5 sec DeployMonitorPolicy
Wait Until Keyword Succeeds 2 min 10 sec GetAbbreviatedDecisionResult
@@ -36,20 +35,6 @@ ExecuteXacmlPolicy
*** Keywords ***
-CreateMonitorPolicyType
- [Documentation] Create Monitoring Policy Type
- ${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/onap.policies.monitoring.cdap.tca.hi.lo.app.json
- Log Creating session https://${POLICY_API_IP}:6969
- ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Post Request policy /policy/api/v1/policytypes data=${postjson} headers=${headers}
- Log Received response from policy2 ${resp.text}
- Should Be Equal As Strings ${resp.status_code} 200
- ${postjsonobject} To Json ${postjson}
- Dictionary Should Contain Key ${resp.json()} tosca_definitions_version
- Dictionary Should Contain Key ${postjsonobject} tosca_definitions_version
-
CreateNewMonitorPolicy
[Documentation] Create a new Monitoring policy
${auth}= Create List healthcheck zb!XztG34