aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plans/dcaegen2/prh-testsuites/setup.sh2
-rw-r--r--plans/sdc/dcaed/setup.sh18
-rw-r--r--plans/sdc/dcaed/teardown.sh18
-rw-r--r--plans/sdc/dcaed/testplan.txt3
-rwxr-xr-xrun-csit.sh2
-rw-r--r--scripts/policy/policy-apex-pdp/config/apex-pdp/OnapPfConfig.json17
-rw-r--r--scripts/policy/policy-apex-pdp/config/apex-pdp/topic.properties23
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/defaultConfig.json30
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/logback.xml102
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/s3pConfig.json11
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/ssl/policy-keystorebin4407 -> 0 bytes
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/ssl/policy-truststorebin124176 -> 0 bytes
-rw-r--r--scripts/policy/policy-apex-pdp/config/pap/topic.properties23
-rw-r--r--scripts/policy/policy-apex-pdp/docker-compose-apex.yml20
-rw-r--r--scripts/sdc/cleanup_sdc_dcaed.sh (renamed from scripts/sdc/kill_dcae_containers.sh)15
-rw-r--r--scripts/sdc/setup_sdc_dcaed.sh57
-rw-r--r--scripts/sdc/start_sdc_containers.sh116
-rw-r--r--scripts/sdc/start_sdc_sanity.sh71
-rw-r--r--tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json70
-rw-r--r--tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json70
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json25
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json66
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/expected-logical-link.json22
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/expected-pnf-update-event.json8
-rw-r--r--tests/dcaegen2/prh-testcases/assets/re-registration/ves-event.json40
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json30
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-logical-link.json12
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json74
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json72
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json74
-rw-r--r--tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json70
-rw-r--r--tests/dcaegen2/prh-testcases/prh_config_tests.robot33
-rw-r--r--tests/dcaegen2/prh-testcases/prh_tests.robot18
-rw-r--r--tests/dcaegen2/prh-testcases/resources/.env3
-rw-r--r--tests/dcaegen2/prh-testcases/resources/PrhLibrary.py14
-rw-r--r--tests/dcaegen2/prh-testcases/resources/docker-compose.yml11
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_config_library.robot43
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_library.robot97
-rw-r--r--tests/dcaegen2/prh-testcases/resources/prh_sessions.robot25
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/AAI.py16
-rw-r--r--tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py65
-rw-r--r--tests/integration/vCPE/test1.robot4
-rw-r--r--tests/portal/testsuites/portal_VID.robot4
-rw-r--r--tests/portal/testsuites/test1.robot4
-rw-r--r--tests/sdc/dcaed/__init__.robot2
-rw-r--r--tests/sdc/dcaed/asdc_interface.robot161
-rwxr-xr-xtests/sdc/dcaed/assets/artifact_upload.template8
-rwxr-xr-xtests/sdc/dcaed/assets/catalog_service.template42
-rw-r--r--tests/sdc/dcaed/assets/component_catalog_resource.template41
-rw-r--r--tests/sdc/dcaed/assets/create_vfcmt.template4
-rw-r--r--tests/sdc/dcaed/assets/dcae_composition.template849
-rwxr-xr-xtests/sdc/dcaed/assets/dcae_monitoring_configuration.template11
-rw-r--r--tests/sdc/dcaed/assets/resource_instance.template10
-rwxr-xr-xtests/sdc/dcaed/assets/schema.yaml551
-rwxr-xr-xtests/sdc/dcaed/assets/template.yaml117
-rwxr-xr-xtests/sdc/dcaed/assets/translate.yaml147
-rw-r--r--tests/sdc/dcaed/assets/user_remarks.template1
-rw-r--r--tests/sdc/dcaed/common.robot11
-rw-r--r--tests/sdc/dcaed/dcaed_interface.robot76
-rw-r--r--tests/sdc/dcaed/json_templater.robot20
-rw-r--r--tests/sdc/dcaed/monitoring_configuration_service_test.robot78
-rw-r--r--tests/usecases/5G-bulkpm/BulkpmE2E.robot4
-rw-r--r--tests/vid/resources/docker-compose.yml2
63 files changed, 2904 insertions, 729 deletions
diff --git a/plans/dcaegen2/prh-testsuites/setup.sh b/plans/dcaegen2/prh-testsuites/setup.sh
index 28882c84..9dc8de9a 100644
--- a/plans/dcaegen2/prh-testsuites/setup.sh
+++ b/plans/dcaegen2/prh-testsuites/setup.sh
@@ -46,4 +46,4 @@ echo CBS_IP=${CBS_IP}
wait_for_service_init localhost:8100/heartbeat
# #Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500" \ No newline at end of file
+ROBOT_VARIABLES="-v DMAAP_SIMULATOR_SETUP:${DMAAP_SIMULATOR_IP}:2224 -v AAI_SIMULATOR_SETUP:${AAI_SIMULATOR_IP}:3335 -v CONSUL_SETUP:${CONSUL_IP}:8500 -v PRH_SETUP:${PRH_IP}:8100" \ No newline at end of file
diff --git a/plans/sdc/dcaed/setup.sh b/plans/sdc/dcaed/setup.sh
new file mode 100644
index 00000000..074b8c05
--- /dev/null
+++ b/plans/sdc/dcaed/setup.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Copyright 2019 © Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source ${WORKSPACE}/scripts/sdc/setup_sdc_dcaed.sh
diff --git a/plans/sdc/dcaed/teardown.sh b/plans/sdc/dcaed/teardown.sh
new file mode 100644
index 00000000..911273c2
--- /dev/null
+++ b/plans/sdc/dcaed/teardown.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+#
+# Copyright 2019 © Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source ${WORKSPACE}/scripts/sdc/cleanup_sdc_dcaed.sh
diff --git a/plans/sdc/dcaed/testplan.txt b/plans/sdc/dcaed/testplan.txt
new file mode 100644
index 00000000..a1313f18
--- /dev/null
+++ b/plans/sdc/dcaed/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+sdc/dcaed
diff --git a/run-csit.sh b/run-csit.sh
index eeb8d59f..0aa48632 100755
--- a/run-csit.sh
+++ b/run-csit.sh
@@ -97,7 +97,7 @@ pip install robotframework-selenium2library==1.8.0 robotframework-extendedseleni
# install eteutils
mkdir -p ${ROBOT_VENV}/src/onap
rm -rf ${ROBOT_VENV}/src/onap/testsuite
-pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.4'
+pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5'
pip freeze
diff --git a/scripts/policy/policy-apex-pdp/config/apex-pdp/OnapPfConfig.json b/scripts/policy/policy-apex-pdp/config/apex-pdp/OnapPfConfig.json
deleted file mode 100644
index 6944c9bd..00000000
--- a/scripts/policy/policy-apex-pdp/config/apex-pdp/OnapPfConfig.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "name":"OnapPfParameterGroup",
- "restServerParameters": {
- "host": "0.0.0.0",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "https": true,
- "aaf": false
- },
- "pdpStatusParameters":{
- "timeIntervalMs": 10000,
- "pdpType":"apex",
- "description":"Pdp Heartbeat",
- "supportedPolicyTypes":[{"name":"onap.policies.controlloop.operational.Apex","version":"1.0.0"}]
- }
-}
diff --git a/scripts/policy/policy-apex-pdp/config/apex-pdp/topic.properties b/scripts/policy/policy-apex-pdp/config/apex-pdp/topic.properties
deleted file mode 100644
index b7df11a8..00000000
--- a/scripts/policy/policy-apex-pdp/config/apex-pdp/topic.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# 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=========================================================
-
-dmaap.source.topics=POLICY-PDP-PAP
-dmaap.sink.topics=POLICY-PDP-PAP
-
-dmaap.source.topics.POLICY-PDP-PAP.servers= dmaap:3904
-dmaap.sink.topics.POLICY-PDP-PAP.servers= dmaap:3904
diff --git a/scripts/policy/policy-apex-pdp/config/pap/defaultConfig.json b/scripts/policy/policy-apex-pdp/config/pap/defaultConfig.json
deleted file mode 100644
index 32b6c30f..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/defaultConfig.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "PapGroup",
- "restServerParameters": {
- "host": "0.0.0.0",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "https": true,
- "aaf": false
- },
- "pdpParameters": {
- "updateParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- },
- "stateChangeParameters": {
- "maxRetryCount": 1,
- "maxWaitMs": 30000
- }
- },
- "databaseProviderParameters": {
- "name": "PolicyProviderParameterGroup",
- "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
- "databaseDriver": "org.mariadb.jdbc.Driver",
- "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
- "databaseUser": "policy_user",
- "databasePassword": "cG9saWN5X3VzZXI=",
- "persistenceUnit": "PolicyMariaDb"
- }
-}
diff --git a/scripts/policy/policy-apex-pdp/config/pap/logback.xml b/scripts/policy/policy-apex-pdp/config/pap/logback.xml
deleted file mode 100644
index a34956c5..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/logback.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
- ============LICENSE_START=======================================================
- Copyright (C) 2019 Nordix Foundation.
- Modifications Copyright (C) 2019 AT&T Intellectual Property.
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- SPDX-License-Identifier: Apache-2.0
- ============LICENSE_END=========================================================
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
- <property name="logDir" value="${POLICY_LOGS}" />
-
- <property name="errorLog" value="error" />
- <property name="debugLog" value="debug" />
- <property name="networkLog" value="network" />
-
- <property name="debugPattern"
- value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
- <property name="errorPattern" value="${debugPattern}" />
- <property name="networkPattern" value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
-
- <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${errorLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>WARN</level>
- </filter>
- <encoder>
- <pattern>${errorPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="ErrorOut" />
- </appender>
-
- <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${debugLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${debugPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="DebugOut" />
- </appender>
-
- <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
- <file>${logDir}/${networkLog}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
- <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
- </fileNamePattern>
- <maxFileSize>50MB</maxFileSize>
- <maxHistory>30</maxHistory>
- <totalSizeCap>10GB</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${networkPattern}</pattern>
- </encoder>
- </appender>
-
- <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
- <appender-ref ref="NetworkOut" />
- </appender>
-
- <logger name="network" level="INFO" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- </logger>
-
- <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
- <appender-ref ref="AsyncNetworkOut" />
- </logger>
-
- <root level="INFO">
- <appender-ref ref="AsyncDebugOut" />
- <appender-ref ref="AsyncErrorOut" />
- </root>
-
-</configuration>
diff --git a/scripts/policy/policy-apex-pdp/config/pap/s3pConfig.json b/scripts/policy/policy-apex-pdp/config/pap/s3pConfig.json
deleted file mode 100644
index 3085f45d..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/s3pConfig.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "PapGroup",
- "restServerParameters": {
- "host": "0.0.0.0",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "https": true,
- "aaf": false
- }
-}
diff --git a/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-keystore b/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-keystore
deleted file mode 100644
index bf876b8a..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-truststore b/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-truststore
deleted file mode 100644
index b7d52ad1..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/ssl/policy-truststore
+++ /dev/null
Binary files differ
diff --git a/scripts/policy/policy-apex-pdp/config/pap/topic.properties b/scripts/policy/policy-apex-pdp/config/pap/topic.properties
deleted file mode 100644
index b7df11a8..00000000
--- a/scripts/policy/policy-apex-pdp/config/pap/topic.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019 Nordix Foundation.
-# ================================================================================
-# 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=========================================================
-
-dmaap.source.topics=POLICY-PDP-PAP
-dmaap.sink.topics=POLICY-PDP-PAP
-
-dmaap.source.topics.POLICY-PDP-PAP.servers= dmaap:3904
-dmaap.sink.topics.POLICY-PDP-PAP.servers= dmaap:3904
diff --git a/scripts/policy/policy-apex-pdp/docker-compose-apex.yml b/scripts/policy/policy-apex-pdp/docker-compose-apex.yml
index e836a589..c6578dda 100644
--- a/scripts/policy/policy-apex-pdp/docker-compose-apex.yml
+++ b/scripts/policy/policy-apex-pdp/docker-compose-apex.yml
@@ -27,7 +27,7 @@ services:
- ./config/db:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
- dmaap:
+ message-router:
image: dmaap/simulator
container_name: dmaap-simulator
hostname: dmaap-simulator
@@ -38,10 +38,9 @@ services:
container_name: policy-pap
depends_on:
- mariadb
- - dmaap
+ - message-router
hostname: policy-pap
- volumes:
- - ./config/pap/:/opt/app/policy/pap/etc/
+
api:
image: nexus3.onap.org:10001/onap/policy-api
container_name: policy-api
@@ -53,12 +52,11 @@ services:
container_name: policy-apex-pdp
depends_on:
- mariadb
- - dmaap
+ - message-router
- pap
hostname: policy-apex-pdp
command: ['/opt/app/policy/apex-pdp/bin/apexOnapPf.sh', '-c', '/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json', '-p', '/opt/app/policy/apex-pdp/etc/onappf/config/topic.properties']
- volumes:
- - ./config/apex-pdp/:/opt/app/policy/apex-pdp/etc/onappf/config/
+
ports:
- "6969:6969"
- "23324:23324"
@@ -69,11 +67,11 @@ services:
container_name: policy-wait
depends_on:
- mariadb
- - dmaap
+ - message-router
hostname: policy-wait
command:
mariadb:3306
- dmaap:3904
+ message-router:3904
start_all:
image: dadarek/wait-for-dependencies
environment:
@@ -81,14 +79,14 @@ services:
container_name: policy-wait-all
depends_on:
- mariadb
- - dmaap
+ - message-router
- api
- pap
- apex
hostname: policy-wait-all
command:
mariadb:3306
- dmaap:3904
+ message-router:3904
api:6969
pap:6969
apex:6969
diff --git a/scripts/sdc/kill_dcae_containers.sh b/scripts/sdc/cleanup_sdc_dcaed.sh
index 5e11372d..35cbc7be 100644
--- a/scripts/sdc/kill_dcae_containers.sh
+++ b/scripts/sdc/cleanup_sdc_dcaed.sh
@@ -18,14 +18,25 @@
#
# Note! This is only temporary solution for killing SDC DCAE plugin's
# docker containers that must be currently used whenever docker_run.sh is used
-# with -dcae option - See SDC-2338 for related image naming issue
+# with -dcae option - See SDC-2338 for related image naming issue
#
# DCAE plugin-related parts will also have to be refactored under dedicated
# directories in the future
#
-echo "This is ${WORKSPACE}/scripts/sdc/kill_dcae_containers.sh"
+echo "This is ${WORKSPACE}/scripts/sdc/cleanup_sdc_dcaed.sh"
+cp -rf ${WORKSPACE}/data/logs/ ${WORKSPACE}/archives/
+
+ls -Rt ${WORKSPACE}/archives/
+
+#kill and remove all sdc dockers
+docker stop $(docker ps -a -q --filter="name=sdc")
+docker rm $(docker ps -a -q --filter="name=sdc")
# kill and remove all sdc dcae dockers
docker stop $(docker ps -a -q --filter="name=dcae")
docker rm $(docker ps -a -q --filter="name=dcae")
+
+#delete data folder
+
+sudo rm -rf ${WORKSPACE}/data/*
diff --git a/scripts/sdc/setup_sdc_dcaed.sh b/scripts/sdc/setup_sdc_dcaed.sh
new file mode 100644
index 00000000..e0d0cc28
--- /dev/null
+++ b/scripts/sdc/setup_sdc_dcaed.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# Copyright 2019 © Samsung Electronics Co., Ltd.
+#
+# 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.
+#
+
+set -x
+
+echo "This is ${WORKSPACE}/scripts/sdc/setup_sdc_dcaed.sh"
+
+# Clone sdc enviroment template
+mkdir -p ${WORKSPACE}/data/environments/
+mkdir -p ${WORKSPACE}/data/clone/
+cd ${WORKSPACE}/data/clone
+git clone --depth 1 http://gerrit.onap.org/r/sdc/dcae-d/dt-be-main
+git clone --depth 1 http://gerrit.onap.org/r/sdc
+
+chmod -R 777 ${WORKSPACE}/data/clone
+
+# set enviroment variables
+
+export ENV_NAME='CSIT'
+export MR_IP_ADDR='10.0.0.1'
+export TEST_SUITE=$1
+
+ifconfig
+IP_ADDRESS=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+export HOST_IP=$IP_ADDRESS
+
+# setup enviroment json
+
+cat ${WORKSPACE}/data/clone/sdc/sdc-os-chef/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > ${WORKSPACE}/data/environments/$ENV_NAME.json
+
+source ${WORKSPACE}/data/clone/sdc/version.properties
+export RELEASE=$major.$minor-STAGING-latest
+source ${WORKSPACE}/data/clone/dt-be-main/version.properties
+export DCAE_RELEASE=$major.$minor-STAGING-latest
+export DEP_ENV=$ENV_NAME
+
+cp ${WORKSPACE}/data/clone/sdc/sdc-os-chef/scripts/docker_run.sh ${WORKSPACE}/scripts/sdc/
+cp ${WORKSPACE}/data/clone/dt-be-main/docker/scripts/docker_run.sh ${WORKSPACE}/scripts/sdc/dcaed_docker_run.sh
+
+${WORKSPACE}/scripts/sdc/docker_run.sh -r ${RELEASE} -e ${ENV_NAME} -p 10001
+${WORKSPACE}/scripts/sdc/dcaed_docker_run.sh -r ${DCAE_RELEASE} -e ${ENV_NAME} -p 10001
+
+
diff --git a/scripts/sdc/start_sdc_containers.sh b/scripts/sdc/start_sdc_containers.sh
deleted file mode 100644
index 2aa43314..00000000
--- a/scripts/sdc/start_sdc_containers.sh
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP CLAMP
-# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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.
-#
-
-echo "This is ${WORKSPACE}/scripts/sdc/start_sdc_containers.sh"
-
-source ${WORKSPACE}/data/clone/sdc/version.properties
-export RELEASE=$major.$minor-STAGING-latest
-export DEP_ENV=$ENV_NAME
-#[ -f /opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) || NEXUS_USERNAME=release
-#[ -f /opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
-#[ -f /opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=ecomp-nexus:${PORT}
-#[ -f /opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
-export IP=$HOST_IP
-#export PREFIX=${NEXUS_DOCKER_REPO}'/openecomp'
-export PREFIX='nexus3.onap.org:10001/openecomp'
-
-
-function monitor_docker {
-
-echo monitor $1 Docker
-sleep 5
-TIME_OUT=800
-INTERVAL=20
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
-
-MATCH=`docker logs --tail 30 $1 | grep "DOCKER STARTED"`
-echo MATCH is -- $MATCH
-
-if [ -n "$MATCH" ]
- then
- echo DOCKER start finished in $TIME seconds
- break
- fi
-
- echo Sleep: $INTERVAL seconds before testing if $1 DOCKER is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]
- then
- echo -e "\e[1;31mTIME OUT: DOCKER was NOT fully started in $TIME_OUT seconds... Could cause problems ...\e[0m"
-fi
-
-
-}
-
-#start Elastic-Search
-docker run --detach --name sdc-es --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --memory 1g --memory-swap=1g --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro -e ES_HEAP_SIZE=1024M --volume ${WORKSPACE}/data/ES:/usr/share/elasticsearch/data --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9200:9200 --publish 9300:9300 ${PREFIX}/sdc-elasticsearch:${RELEASE}
-
-#start cassandra
-docker run --detach --name sdc-cs --env RELEASE="${RELEASE}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9042:9042 --publish 9160:9160 ${PREFIX}/sdc-cassandra:${RELEASE}
-
-echo "please wait while CS is starting..."
-monitor_docker sdc-cs
-
-
-#start kibana
-#docker run --detach --name sdc-kbn --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5601:5601 ${PREFIX}/sdc-kibana:${RELEASE}
-
-#start sdc-backend
-docker run --detach --name sdc-BE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 4g --memory-swap=4g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/BE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${PREFIX}/sdc-backend:${RELEASE}
-
-echo "please wait while BE is starting..."
-monitor_docker sdc-BE
-
-#start Front-End
-docker run --detach --name sdc-FE --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/FE/:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9443:9443 --publish 8181:8181 ${PREFIX}/sdc-frontend:${RELEASE}
-
-echo "docker run sdc-frontend..."
-monitor_docker sdc-FE
-
-echo " WAIT 1 minutes maximum and test every 5 seconds if SDC up using HealthCheck API...."
-
-TIME_OUT=60
-INTERVAL=5
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null http://localhost:8080/sdc2/rest/healthCheck); echo $response
-
- if [ "$response" == "200" ]; then
- echo SDC well started in $TIME seconds
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if SDC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: Docker containers not started in $TIME_OUT seconds... Could cause problems for tests...
-fi
-
diff --git a/scripts/sdc/start_sdc_sanity.sh b/scripts/sdc/start_sdc_sanity.sh
deleted file mode 100644
index 2b553136..00000000
--- a/scripts/sdc/start_sdc_sanity.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP CLAMP
-# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights
-# reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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.
-#
-
-
-
-#start Sanity docker
-
-docker run --detach --name sdc-sanity --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env http_proxy=${http_proxy} --env https_proxy=${https_proxy} --env no_proxy=${no_proxy} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --memory 2g --memory-swap=2g --ulimit nofile=4096:100000 --volume /etc/localtime:/etc/localtime:ro --volume ${WORKSPACE}/data/logs/sdc-sanity/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 9560:9560 ${PREFIX}/sdc-sanity:${RELEASE}
-
-#echo "please wait while Sanity Docker is starting..."
-echo ""
-c=60 # seconds to wait
-REWRITE="\e[45D\e[1A\e[K"
-while [ $c -gt 0 ]; do
- c=$((c-1))
- sleep 1
- echo -e "${REWRITE}$c"
-done
-echo -e ""
-
-
-#monitor sanity process
-
-TIME_OUT=1200
-INTERVAL=20
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
-
-PID=`docker exec -i sdc-sanity ps -ef | grep java | awk '{print $2}'`
-echo sanity PID is -- $PID
-
-if [ -z "$PID" ]
- then
- echo SDC sanity finished in $TIME seconds
- break
- fi
-
- echo Sleep: $INTERVAL seconds before testing if SDC sanity completed. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
- sleep $INTERVAL
- TIME=$(($TIME+$INTERVAL))
-done
-
-if [ "$TIME" -ge "$TIME_OUT" ]
- then
- echo TIME OUT: Sany was NOT completed in $TIME_OUT seconds... Could cause problems for tests...
-fi
-cp -rf ${WORKSPACE}/data/logs/sdc-sanity/ExtentReport/* ${WORKSPACE}/archives/
-cp -rf ${WORKSPACE}/data/logs/ ${WORKSPACE}/archives/
-cp -rf ${WORKSPACE}/data/logs/sdc-sanity/target/*.xml ${WORKSPACE}/archives/
-
diff --git a/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json b/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json
index 10ce41c5..3a768df2 100644
--- a/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/aai-missing-entry/ves-event.json
@@ -1,39 +1,37 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW8",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW8",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7"
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW8",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW8",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7"
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json b/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json
index 10ce41c5..3a768df2 100644
--- a/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/aai-not-responding/ves-event.json
@@ -1,39 +1,37 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW8",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW8",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7"
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW8",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW8",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7"
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json
new file mode 100644
index 00000000..6119ea8b
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry-service-instance.json
@@ -0,0 +1,25 @@
+{
+ "service-instance-id": "bbs_service",
+ "service-instance-name": "bbs_service",
+ "environment-context": "General_Revenue-Bearing",
+ "workload-context": "Production",
+ "model-invariant-id": "c71827e7-42fc-46ab-b059-22584c58108b",
+ "model-version-id": "8efe4a8a-6646-43e2-8807-a376ff22d2e0",
+ "resource-version": "1554127221722",
+ "orchestration-status": "Active",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "pnf",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/network/pnfs/pnf/NOK6061ZW9",
+ "relationship-data": [
+ {
+ "relationship-key": "pnf.pnf-name",
+ "relationship-value": "NOK6061ZW9"
+ }
+ ]
+ }
+ ]
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json
new file mode 100644
index 00000000..e01e26e6
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/aai-entry.json
@@ -0,0 +1,66 @@
+{
+ "pnf-name": "NOK6061ZW9",
+ "pnf-name2": "example-pnf-name2-val-58071",
+ "pnf-name2-source": "example-pnf-name2-source-val-22408",
+ "pnf-id": "example-pnf-id-val-55834",
+ "equip-type": "example-equip-type-val-5497",
+ "equip-vendor": "example-equip-vendor-val-85730",
+ "equip-model": "example-equip-model-val-38526",
+ "management-option": "example-management-option-val-15776",
+ "ipaddress-v4-oam": "example-ipaddress-v4-oam-val-33556",
+ "sw-version": "example-sw-version-val-64239",
+ "in-maint": true,
+ "frame-id": "example-frame-id-val-76733",
+ "serial-number": "example-serial-number-val-79366",
+ "ipaddress-v4-loopback-0": "example-ipaddress-v4-loopback0-val-34781",
+ "ipaddress-v6-loopback-0": "example-ipaddress-v6-loopback0-val-29979",
+ "ipaddress-v4-aim": "example-ipaddress-v4-aim-val-53703",
+ "ipaddress-v6-aim": "example-ipaddress-v6-aim-val-93386",
+ "ipaddress-v6-oam": "example-ipaddress-v6-oam-val-92665",
+ "inv-status": "example-inv-status-val-8477",
+ "prov-status": "example-prov-status-val-68268",
+ "nf-role": "example-nf-role-val-68489",
+ "relationship-list": {
+ "relationship": [
+ {
+ "related-to": "service-instance",
+ "relationship-label": "org.onap.relationships.inventory.ComposedOf",
+ "related-link": "/aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service",
+ "relationship-data": [
+ {
+ "relationship-key": "customer.global-customer-id",
+ "relationship-value": "Demonstration"
+ },
+ {
+ "relationship-key": "service-subscription.service-type",
+ "relationship-value": "vFW"
+ },
+ {
+ "relationship-key": "service-instance.service-instance-id",
+ "relationship-value": "bbs_service"
+ }
+ ],
+ "related-to-property": [
+ {
+ "property-key": "service-instance.service-instance-name",
+ "property-value": "bbs_service"
+ }
+ ]
+ },
+ {
+ "related-to": "logical-link",
+ "relationship-label": "org.onap.relationships.inventory.BridgedTo",
+ "related-link": "/aai/v12/network/logical-links/logical-link/bbs-link",
+ "relationship-data": [
+ {
+ "relationship-key": "logical-link.link-name",
+ "relationship-value": "bbs-link"
+ }
+ ]
+ }
+ ]
+ }
+
+
+
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/expected-logical-link.json b/tests/dcaegen2/prh-testcases/assets/re-registration/expected-logical-link.json
new file mode 100644
index 00000000..0e4f6ab1
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/expected-logical-link.json
@@ -0,0 +1,22 @@
+{
+ "link-name": "bbs-link",
+ "in-maint": false,
+ "link-type": "attachment-point",
+ "relationship-list":
+ {
+ "relationship": [
+ {
+ "related-to": "pnf",
+ "relationship-label": "org.onap.relationships.inventory.BridgedTo",
+ "related-link": "/network/pnfs/pnf/NOK6061ZW9",
+ "relationship-data": [
+ {
+ "relationship-key": "pnf.pnf-name",
+ "relationship-value": "NOK6061ZW9"
+ }
+ ]
+ }
+ ]
+ }
+}
+
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/expected-pnf-update-event.json b/tests/dcaegen2/prh-testcases/assets/re-registration/expected-pnf-update-event.json
new file mode 100644
index 00000000..5c77e125
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/expected-pnf-update-event.json
@@ -0,0 +1,8 @@
+[
+ {
+ "additionalFields": {
+ "attachment-point": "bbs-link"
+ },
+ "correlationId": "NOK6061ZW9"
+ }
+] \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/re-registration/ves-event.json b/tests/dcaegen2/prh-testcases/assets/re-registration/ves-event.json
new file mode 100644
index 00000000..5de986c5
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/assets/re-registration/ves-event.json
@@ -0,0 +1,40 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
+ },
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW9",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW9",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7",
+ "additionalFields": {
+ "attachment-point": "bbs-link"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json
index 2bdc0570..dd135f4d 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-missing-field/invalid-ves-event.json
@@ -1,18 +1,16 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "sourceName": ""
- },
- "pnfRegistrationFields": {
- "oamV4IpAddress": "10.18.123.236",
- "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334",
- "serialNumber": "",
- "vendorName": "",
- "modelNumber": "",
- "unitType": "",
- "additionalFields": {}
- }
+{
+ "event": {
+ "commonEventHeader": {
+ "sourceName": ""
+ },
+ "pnfRegistrationFields": {
+ "oamV4IpAddress": "10.18.123.236",
+ "oamV6IpAddress": "2001:0db8:85a3:0000:0000:8a2a:0370:7334",
+ "serialNumber": "",
+ "vendorName": "",
+ "modelNumber": "",
+ "unitType": "",
+ "additionalFields": {}
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-logical-link.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-logical-link.json
index 95c5570a..9b4c7e2c 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-logical-link.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/expected-logical-link.json
@@ -1,11 +1,13 @@
{
"link-name": "bbs-link",
"link-type": "attachment-point",
- "relationship-list": [
+ "relationship-list":
{
- "relationship": {
- "related-link": "/network/pnfs/pnf/NOK6061ZW9"
- }
+ "relationship": [
+ {
+ "related-link": "/network/pnfs/pnf/NOK6061ZW9",
+ "relationship-data": []
+ }
+ ]
}
- ]
}
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json
index 84e52233..5de986c5 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-attachment-point/ves-event.json
@@ -1,42 +1,40 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW9",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW9",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7",
- "additionalFields": {
- "attachment-point": "bbs-link"
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW9",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW9",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7",
+ "additionalFields": {
+ "attachment-point": "bbs-link"
}
}
}
-]
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json
index b7e5af5e..ba91f286 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-additional-fields/ves-event.json
@@ -1,41 +1,39 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW8",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW8",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7",
- "additionalFields": {
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW8",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW8",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7",
+ "additionalFields": {
}
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json
index fda6ef10..b56341f3 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-with-empty-attachment-point/ves-event.json
@@ -1,42 +1,40 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW8",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW8",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7",
- "additionalFields": {
- "attachment-point": ""
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW8",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW8",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7",
+ "additionalFields": {
+ "attachment-point": ""
}
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json
index 10ce41c5..3a768df2 100644
--- a/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json
+++ b/tests/dcaegen2/prh-testcases/assets/ves-event-without-additional-fields/ves-event.json
@@ -1,39 +1,37 @@
-[
- {
- "event": {
- "commonEventHeader": {
- "startEpochMicrosec": 1540212137393,
- "sourceId": "val13",
- "eventId": "registration_40212137",
- "nfcNamingCode": "oam",
- "internalHeaderFields": {
- "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
- },
- "eventType": "pnfRegistration",
- "priority": "Normal",
- "version": "4.0.1",
- "reportingEntityName": "NOK6061ZW8",
- "sequence": 0,
- "domain": "pnfRegistration",
- "lastEpochMicrosec": 1540212137393,
- "eventName": "pnfRegistration_Nokia_5gDu",
- "vesEventListenerVersion": "7.0.1",
- "sourceName": "NOK6061ZW8",
- "nfNamingCode": "gNB"
+{
+ "event": {
+ "commonEventHeader": {
+ "startEpochMicrosec": 1540212137393,
+ "sourceId": "val13",
+ "eventId": "registration_40212137",
+ "nfcNamingCode": "oam",
+ "internalHeaderFields": {
+ "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC"
},
- "pnfRegistrationFields": {
- "unitType": "val8",
- "serialNumber": "6061ZW9",
- "pnfRegistrationFieldsVersion": "2.0",
- "manufactureDate": "1540212137393",
- "modelNumber": "val6",
- "lastServiceDate": "1540212137393",
- "unitFamily": "BBU",
- "vendorName": "Nokia",
- "oamV4IpAddress": "val3",
- "oamV6IpAddress": "val4",
- "softwareVersion": "val7"
- }
+ "eventType": "pnfRegistration",
+ "priority": "Normal",
+ "version": "4.0.1",
+ "reportingEntityName": "NOK6061ZW8",
+ "sequence": 0,
+ "domain": "pnfRegistration",
+ "lastEpochMicrosec": 1540212137393,
+ "eventName": "pnfRegistration_Nokia_5gDu",
+ "vesEventListenerVersion": "7.0.1",
+ "sourceName": "NOK6061ZW8",
+ "nfNamingCode": "gNB"
+ },
+ "pnfRegistrationFields": {
+ "unitType": "val8",
+ "serialNumber": "6061ZW9",
+ "pnfRegistrationFieldsVersion": "2.0",
+ "manufactureDate": "1540212137393",
+ "modelNumber": "val6",
+ "lastServiceDate": "1540212137393",
+ "unitFamily": "BBU",
+ "vendorName": "Nokia",
+ "oamV4IpAddress": "val3",
+ "oamV6IpAddress": "val4",
+ "softwareVersion": "val7"
}
}
-] \ No newline at end of file
+} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/prh_config_tests.robot b/tests/dcaegen2/prh-testcases/prh_config_tests.robot
new file mode 100644
index 00000000..144504d1
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/prh_config_tests.robot
@@ -0,0 +1,33 @@
+*** Settings ***
+Documentation Tests related to updating PRH app config based on CBS config
+Suite Setup Run keywords Create sessions
+Resource resources/prh_sessions.robot
+Resource resources/prh_config_library.robot
+Resource resources/prh_library.robot
+Test Timeout 15 seconds
+
+*** Test Cases ***
+CBS configuration forced refresh
+ [Documentation] It should be possible to force refresh PRH configuration from CBS
+ [Tags] PRH coniguration
+ ${some_random_value}= Generate random value
+ Put key-value to consul foo_${some_random_value} bar_${some_random_value}
+ Force PRH config refresh
+ Check key-value in PRH app environment foo_${some_random_value} bar_${some_random_value}
+
+CBS configuration scheduled refresh
+ [Documentation] PRH should pull for CBS configuration updates according to schedule
+ [Tags] PRH coniguration
+ Set scheduled CBS updates interval 1s
+ ${some_random_value}= Generate random value
+ Put key-value to consul spam_${some_random_value} ham_${some_random_value}
+ wait until keyword succeeds 20x 500ms
+ ... Check key-value in PRH app environment spam_${some_random_value} ham_${some_random_value}
+ [Teardown] Set scheduled CBS updates interval 0
+
+PRH log level change based on CBS config
+ [Documentation] It should be possible to change logging levels in PRH based on entries in CBS
+ [Tags] PRH coniguration logging
+ Set logging level in CBS org.onap.dcaegen2.services.prh.foo WARN
+ Force PRH config refresh
+ Verify logging level org.onap.dcaegen2.services.prh.foo WARN \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/prh_tests.robot b/tests/dcaegen2/prh-testcases/prh_tests.robot
index acaf78fd..4e387b91 100644
--- a/tests/dcaegen2/prh-testcases/prh_tests.robot
+++ b/tests/dcaegen2/prh-testcases/prh_tests.robot
@@ -6,18 +6,14 @@ Test Teardown Reset Simulators
Test Timeout 2 minutes
Library resources/PrhLibrary.py
+Resource resources/prh_sessions.robot
Resource resources/prh_library.robot
-Resource ../../common.robot
*** Variables ***
${TEST_CASES_DIR} %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
-${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
-${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
-${CONSUL_SETUP_URL} http://${CONSUL_SETUP}
-
*** Test Cases ***
-Simple BBS case event
+BBS case event - attachment point
[Documentation] PRH get from DMaaP valid event with valid attachment point
[Tags] PRH Valid event Attachment point
[Template] Verify PNF ready sent and logical link created
@@ -52,3 +48,13 @@ Should not sent PNF ready when AAI is not responding
[Tags] PRH AAI not responding
Verify AAI not responding is logged ${TEST_CASES_DIR}/aai-not-responding
+BBS case event - Re-registration
+ [Documentation] After regitered PNF, PRH reads another one PRH event with registration event
+ [Tags] PRH Valid event Re registraiton
+ [Template] Verify PNF re registration
+ ${TEST_CASES_DIR}/re-registration
+
+PRH logging level change
+ [Documentation] ad-hoc PRH logging level change using rest endpoint
+ [Tags] PRH logging level
+ Verify change logging level
diff --git a/tests/dcaegen2/prh-testcases/resources/.env b/tests/dcaegen2/prh-testcases/resources/.env
index a558a2e8..b1de55a9 100644
--- a/tests/dcaegen2/prh-testcases/resources/.env
+++ b/tests/dcaegen2/prh-testcases/resources/.env
@@ -1,5 +1,4 @@
-LOG_LEVEL=INFO
-PRH_LOG_LEVEL=TRACE
HOSTNAME=dcae-prh
CONSUL_HOST=consul
CONFIG_BINDING_SERVICE=cbs
+CONFIG_BINDING_SERVICE_SERVICE_PORT=10000 \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index 7453eb0f..b3f5f8d9 100644
--- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -10,15 +10,16 @@ class PrhLibrary(object):
pass
@staticmethod
- def find_log_entry(search_for):
- print(type(search_for))
+ def find_one_of_log_entryies(searched_entries):
+ print(type(searched_entries))
client = docker.from_env()
container = client.containers.get('prh')
- print("Check for log searches for pattern: ", search_for )
+ print("Check for log searches for pattern: ", searched_entries)
for line in container.logs(stream=True):
print("Check for log analysis line: ", line )
- if search_for in line.strip():
- return True
+ for searched_entry in searched_entries:
+ if searched_entry in line.strip():
+ return True
else:
return False
@@ -45,8 +46,7 @@ class PrhLibrary(object):
@staticmethod
def create_invalid_notification(json_file):
output = {}
- input = json.loads(json_file)[0]
-
+ input = json.loads(json_file)
output["correlationId"] = PrhLibrary.__extract_correlation_id_value(input)
output["oamV4IpAddress"] = PrhLibrary.__extract_value_from_pnfRegistrationFields(input, "oamV4IpAddress")
output["oamV6IpAddress"] = PrhLibrary.__extract_value_from_pnfRegistrationFields(input, "oamV6IpAddress")
diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
index aba658b0..ca94dfb2 100644
--- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
+++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml
@@ -8,11 +8,10 @@ services:
volumes:
- ./simulator/certs:/tmp/certs
environment:
- - LOG_LEVEL
- - PRH_LOG_LEVEL
- - HOSTNAME
- - CONSUL_HOST
+ - HOSTNAME=dcae-prh
+ - CONSUL_HOST # not in use, but still required by SDK - should be removed later on
- CONFIG_BINDING_SERVICE
+ - CONFIG_BINDING_SERVICE_SERVICE_PORT
container_name: prh
depends_on:
cbs:
@@ -55,6 +54,10 @@ services:
image: consul:1.0.6
restart: on-failure
command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{
+ "cbs.updates-interval": 0,
+ "logging.level.org.onap.dcaegen2.services.prh": "debug",
+ "logging.level.org.onap.dcaegen2.services.sdk": "debug",
+ "logging.level.org.onap.dcaegen2.services.prh.controllers.AppInfoController": "off",
"dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin",
"dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin",
"dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json",
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_config_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_config_library.robot
new file mode 100644
index 00000000..26a62704
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/prh_config_library.robot
@@ -0,0 +1,43 @@
+*** Settings ***
+Documentation Keywords related to checking and updating PRH app config based on CBS config
+Library RequestsLibrary
+Library Collections
+
+*** Keywords ***
+
+Put key-value to consul
+ [Arguments] ${key} ${value}
+ ${prh_config}= Get PRH config from consul
+ set to dictionary ${prh_config} ${key} ${value}
+ put request consul_session /v1/kv/dcae-prh json=${prh_config}
+ Get PRH config from consul prh config in consul after update
+
+Get PRH config from consul
+ [Arguments] ${logMessage}=prh config in consul
+ ${phr_config_response}= get request consul_session /v1/kv/dcae-prh?raw
+ log ${logMessage}: ${phr_config_response.content}
+ [Return] ${phr_config_response.json()}
+
+Force PRH config refresh
+ ${refresh_response}= post request prh_session /actuator/refresh
+ should be equal as integers ${refresh_response.status_code} 200
+
+Check key-value in PRH app environment
+ [Arguments] ${key} ${expected_value}
+ ${env_response}= get request prh_session /actuator/env/${key}
+ should be equal as integers ${env_response.status_code} 200
+ log ${env_response.content}
+ should be equal ${env_response.json()["property"]["value"]} ${expected_value}
+
+Set scheduled CBS updates interval
+ [Arguments] ${cbs_updates_interval}
+ Put key-value to consul cbs.updates-interval ${cbs_updates_interval}
+ Force PRH config refresh
+
+Set logging level in CBS
+ [Arguments] ${logger} ${level}
+ Put key-value to consul logging.level.${logger} ${level}
+
+Generate random value
+ ${some_random_value} evaluate random.randint(sys.maxint/10, sys.maxint) modules=random,sys
+ [Return] ${some_random_value} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
index 6302ef76..3ed377c7 100644
--- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot
+++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot
@@ -13,18 +13,19 @@ Verify PNF ready sent
Add PNF entry in AAI ${pnf_entry}
Set VES event in DMaaP ${ves_event}
Wait Until Keyword Succeeds 10x 3000ms Check CBS ready
- Wait Until Keyword Succeeds 10x 3000ms Check recorded PNF_READY notification ${expected_pnf_ready_event}
+ Wait Until Keyword Succeeds 10x 3000ms Check created PNF_READY notification ${expected_pnf_ready_event}
Verify PNF ready sent and logical link created
[Arguments] ${test_case_directory}
${expected_logical_link}= Get Data From File ${test_case_directory}/expected-logical-link.json
Verify PNF ready sent ${test_case_directory}
- Check recorded Logical Link ${expected_logical_link}
+ Check created Logical Link ${expected_logical_link}
Verify event with missing required field is logged
[Arguments] ${test_case_directory}
${invalid_ves_event}= Get Data From File ${test_case_directory}/invalid-ves-event.json
Set VES event in DMaaP ${invalid_ves_event}
+ Log Invalid ves event: ${invalid_ves_event}
${notification}= Create invalid notification ${invalid_ves_event}
${error_msg}= Set Variable Incorrect json, consumerDmaapModel can not be created:
Wait Until Keyword Succeeds 10x 3000ms Check PRH json log ${error_msg} ${notification}
@@ -34,7 +35,7 @@ Verify incorrect JSON event is logged
[Arguments] ${test_case_directory}
${invalid_ves_event}= Get Data From File ${test_case_directory}/invalid-ves-event.json
Set VES event in DMaaP ${invalid_ves_event}
- Wait Until Keyword Succeeds 10x 3000ms Check PRH log |com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonArray
+ Check PRH log |WARN |Incorrect json, consumerDmaapModel can not be created:
Verify missing AAI record is logged
[Timeout] 100s
@@ -43,8 +44,7 @@ Verify missing AAI record is logged
${ves_event}= Get Data From File ${test_case_directory}/ves-event.json
Add PNF entry in AAI ${incorrect_aai_entry}
Set VES event in DMaaP ${ves_event}
- Wait Until Keyword Succeeds 10x 3000ms Check PRH log |AAIProducerTask exception has been registered
- Wait Until Keyword Succeeds 10x 3000ms Check PRH log |Chain of tasks have been aborted due to errors in PRH workflow
+ Check PRH log Request failed for URL 'https://aai:3334/aai/v12/network/pnfs/pnf/NOK6061ZW8'. Response code: 404 Not Found
Verify AAI not responding is logged
[Timeout] 100s
@@ -52,30 +52,51 @@ 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 Until Keyword Succeeds 10x 3000ms Check PRH log java.net.UnknownHostException: aai
+ Check PRH log connection timed out: aai Host is unreachable: aai
Ensure Container Is Running aai_simulator
+Verify PNF re registration
+ [Timeout] 500s
+ [Arguments] ${test_case_directory}
+ ${aai_entry}= Get Data From File ${test_case_directory}/aai-entry.json
+ Log PNF Re-registration: AAI entry for AAI Simulator ${aai_entry}
+ Add PNF entry in AAI ${aai_entry}
+ ${service_instance}= Get Data From File ${test_case_directory}/aai-entry-service-instance.json
+ Add service instance entry in AAI ${service_instance}
+
+ ${ves_event}= Get Data From File ${test_case_directory}/ves-event.json
+ Set VES event in DMaaP ${ves_event}
+ ${expected_pnf_update_event}= Get Data From File ${test_case_directory}/expected-pnf-update-event.json
+ Wait Until Keyword Succeeds 10x 3000ms Check created PNF_UPDATE notification ${expected_pnf_update_event}
+
Check CBS ready
- ${resp}= Get Request ${consul_setup_session} /v1/catalog/services
+ ${resp}= Get Request ${consul_session} /v1/catalog/services
Should Be Equal As Strings ${resp.status_code} 200
Log Service Catalog response: ${resp.content}
Dictionary Should Contain Key ${resp.json()} cbs |Consul service catalog should contain CBS entry
-Check recorded PNF_READY notification
+Check created PNF_READY notification
[Arguments] ${expected_event_pnf_ready_in_dpaap}
- ${resp}= Get Request ${dmaap_setup_session} /setup/pnf_ready headers=${suite_headers}
+ ${resp}= Get Request ${dmaap_session} /verify/pnf_ready headers=${suite_headers}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As JSON ${resp.content} ${expected_event_pnf_ready_in_dpaap}
-Check recorded Logical Link
+Check created PNF_UPDATE notification
+ [Arguments] ${expected_event_pnf_update_in_dpaap}
+ ${resp}= Get Request ${dmaap_session} /verify/pnf_update headers=${suite_headers}
+ Log Response from DMaaP: ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} 200
+ #Should Be Equal As JSON ${resp.content} ${expected_event_pnf_ready_in_dpaap}
+
+Check created Logical Link
[Arguments] ${expected_logical_link_in_aai}
- ${resp}= Get Request ${aai_setup_session} /setup/created_logical_link headers=${suite_headers}
+ ${resp}= Get Request ${aai_session} /verify/created_logical_link headers=${suite_headers}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As JSON ${resp.content} ${expected_logical_link_in_aai}
Check PRH log
- [Arguments] ${log_entry}
- ${found}= Find log entry ${log_entry}
+ [Arguments] @{log_entries}
+ ${found}= Find one of log entryies ${log_entries}
Should Be True ${found}
Check PRH json log
@@ -93,12 +114,19 @@ Add PNF entry in AAI
[Arguments] ${pnf_entry}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
Log AAI url ${AAI_SIMULATOR_SETUP_URL}
- ${resp}= Put Request ${aai_setup_session} /setup/add_pnf_entry headers=${suite_headers} data=${pnf_entry}
+ ${resp}= Put Request ${aai_session} /setup/add_pnf_entry headers=${suite_headers} data=${pnf_entry}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Add service instance entry in AAI
+ [Arguments] ${aai_service_instance}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ Log AAI url ${AAI_SIMULATOR_SETUP_URL}
+ ${resp}= Put Request ${aai_session} /setup/add_service_instace headers=${suite_headers} data=${aai_service_instance}
Should Be Equal As Strings ${resp.status_code} 200
Set VES event in DMaaP
[Arguments] ${ves_event}
- ${resp}= Put Request ${dmaap_setup_session} /setup/ves_event headers=${suite_headers} data=${ves_event}
+ ${resp}= Put Request ${dmaap_session} /setup/ves_event headers=${suite_headers} data=${ves_event}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As JSON
@@ -109,26 +137,39 @@ Should Be Equal As JSON
${actual_json}= Evaluate json.loads("""${actual}""") json
Should Be Equal ${actual_json} ${expected_json}
-Create sessions
- Create Session dmaap_setup_session ${DMAAP_SIMULATOR_SETUP_URL}
- Set Suite Variable ${dmaap_setup_session} dmaap_setup_session
- Create Session aai_setup_session ${AAI_SIMULATOR_SETUP_URL}
- Set Suite Variable ${aai_setup_session} aai_setup_session
- Create Session consul_setup_session ${CONSUL_SETUP_URL}
- Set Suite Variable ${consul_setup_session} consul_setup_session
-
Reset Simulators
Reset AAI simulator
Reset DMaaP simulator
Reset AAI simulator
- ${resp}= Post Request ${aai_setup_session} /reset
+ ${resp}= Post Request ${aai_session} /reset
Should Be Equal As Strings ${resp.status_code} 200
Reset DMaaP simulator
- ${resp}= Post Request ${dmaap_setup_session} /reset
+ ${resp}= Post Request ${dmaap_session} /reset
Should Be Equal As Strings ${resp.status_code} 200
-Create headers
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- Set Suite Variable ${suite_headers} ${headers}
+
+Verify change logging level
+ ${logger}= Set Variable org.onap.dcaegen2.services.prh.controllers.AppInfoController
+ Change logging level ${logger} TRACE
+ Verify logging level ${logger} TRACE
+ Verify logs with heartbeat
+ [Teardown] Change logging level ${logger} INFO
+
+Change logging level
+ [Arguments] ${logger} ${log_level}
+ ${request_body}= Create Dictionary configuredLevel=${log_level}
+ ${resp}= Post Request prh_session /actuator/loggers/${logger} json=${request_body}
+ Should Be Equal As Integers ${resp.status_code} 204
+
+Verify logging level
+ [Arguments] ${logger} ${expected_log_level}
+ ${resp}= Get Request prh_session /actuator/loggers/${logger}
+ Should Be Equal As Integers ${resp.status_code} 200
+ Log ${resp.content}
+ Should Be Equal As Strings ${resp.json()["configuredLevel"]} ${expected_log_level} ignore_case=true
+
+Verify logs with heartbeat
+ Get Request prh_session /heartbeat
+ Check PRH log Heartbeat request received \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/prh_sessions.robot b/tests/dcaegen2/prh-testcases/resources/prh_sessions.robot
new file mode 100644
index 00000000..2fadbbae
--- /dev/null
+++ b/tests/dcaegen2/prh-testcases/resources/prh_sessions.robot
@@ -0,0 +1,25 @@
+*** Settings ***
+Library RequestsLibrary
+Library Collections
+
+*** Variables ***
+${DMAAP_SIMULATOR_SETUP_URL} http://${DMAAP_SIMULATOR_SETUP}
+${AAI_SIMULATOR_SETUP_URL} http://${AAI_SIMULATOR_SETUP}
+${CONSUL_SETUP_URL} http://${CONSUL_SETUP}
+${PRH_SETUP_URL} http://${PRH_SETUP}
+
+*** Keywords ***
+Create sessions
+ Create Session dmaap_session ${DMAAP_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${dmaap_session} dmaap_session
+ Create Session aai_session ${AAI_SIMULATOR_SETUP_URL}
+ Set Suite Variable ${aai_session} aai_session
+ Create Session consul_session ${CONSUL_SETUP_URL}
+ Set Suite Variable ${consul_session} consul_session
+ Create Session prh_session ${PRH_SETUP_URL}
+ Set Suite Variable ${prh_session} prh_session
+
+
+Create headers
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ Set Suite Variable ${suite_headers} ${headers} \ No newline at end of file
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index ff368034..f6d3b1f6 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -22,6 +22,7 @@ AAI_RESOURCE_NOT_FOUND = b'{}'
pnf_entries = {}
patched_pnf = AAI_RESOURCE_NOT_FOUND
created_logical_link = AAI_RESOURCE_NOT_FOUND
+service_instance = AAI_RESOURCE_NOT_FOUND
class AAISetup(BaseHTTPRequestHandler):
@@ -30,7 +31,7 @@ class AAISetup(BaseHTTPRequestHandler):
if re.search('/setup/patched_pnf', self.path):
httpServerLib.set_response_200_ok(self, payload = patched_pnf)
logger.debug('AAISetup GET /setup/patched_pnf -> 200 OK')
- elif re.search('/setup/created_logical_link', self.path):
+ elif re.search('/verify/created_logical_link', self.path):
httpServerLib.set_response_200_ok(self, payload = created_logical_link)
logger.debug('AAISetup GET /setup/created_logical_link -> 200 OK')
else:
@@ -53,6 +54,13 @@ class AAISetup(BaseHTTPRequestHandler):
httpServerLib.set_response_200_ok(self)
logger.debug('AAISetup PUT /setup/add_pnf_entry [' + pnf_name + '] -> 200 OK')
+ elif re.search('/setup/add_service_instace', self.path):
+ service_instance_payload = httpServerLib.get_payload(self)
+ global service_instance
+ service_instance = json.loads(service_instance_payload)
+ httpServerLib.set_response_200_ok(self)
+ logger.debug('AAISetup PUT /setup/add_service_instace -> 200 OK')
+
elif re.search('/set_pnf', self.path):
pnf_name = httpServerLib.get_payload(self).decode()
pnf_entries[pnf_name] = AAI_RESOURCE_NOT_FOUND
@@ -70,9 +78,11 @@ class AAISetup(BaseHTTPRequestHandler):
global pnf_entries
global patched_pnf
global created_logical_link
+ global service_instance
pnf_entries = {}
patched_pnf = AAI_RESOURCE_NOT_FOUND
created_logical_link = AAI_RESOURCE_NOT_FOUND
+ service_instance = AAI_RESOURCE_NOT_FOUND
httpServerLib.set_response_200_ok(self)
logger.debug('AAISetup POST /reset -> 200 OK')
@@ -95,6 +105,9 @@ class AAIHandler(BaseHTTPRequestHandler):
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys()))
+ elif re.search('aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service', self.path):
+ httpServerLib.set_response_200_ok(self, payload = service_instance)
+ logger.debug('AAIHandler GET aai/v12/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vFW/service-instances/service-instance/bbs_service -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('AAIHandler GET ' + self.path + ' -> 404 Not found')
@@ -142,7 +155,6 @@ class AAIHandler(BaseHTTPRequestHandler):
def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
- httpServerLib.start_http_endpoint(3333, AAIHandler)
httpServerLib.start_https_endpoint(3334, AAIHandler, keyfile="certs/aai.key", certfile="certs/aai.crt", ca_certs="certs/root.crt")
httpServerLib.start_http_endpoint(3335, AAISetup)
while 1:
diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index ce9858d6..5ec601f6 100644
--- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -2,6 +2,7 @@ import logging
import re
import sys
import time
+import json
from http.server import BaseHTTPRequestHandler
import httpServerLib
@@ -17,17 +18,22 @@ logger = logging.getLogger('DMaaP-simulator-logger')
DMAAP_EMPTY = b'[]'
-ves_event = DMAAP_EMPTY
-captured_prh_event = DMAAP_EMPTY
+event_ves = DMAAP_EMPTY
+event_pnf_ready = DMAAP_EMPTY
+event_pnf_update = DMAAP_EMPTY
class DmaapSetup(BaseHTTPRequestHandler):
def do_GET(self):
try:
- if re.search('/setup/pnf_ready', self.path):
- global captured_prh_event
- httpServerLib.set_response_200_ok(self, payload = captured_prh_event)
- logger.debug('DmaapSetup GET /setup/pnf_ready -> 200 OK')
+ if re.search('/verify/pnf_ready', self.path):
+ global event_pnf_ready
+ httpServerLib.set_response_200_ok(self, payload = event_pnf_ready)
+ logger.debug('DmaapSetup GET /verify/pnf_ready -> 200 OK')
+ elif re.search('/verify/pnf_update', self.path):
+ global event_pnf_update
+ httpServerLib.set_response_200_ok(self, payload = event_pnf_update)
+ logger.debug('DmaapSetup GET /verify/pnf_ready -> 200 OK')
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DmaapSetup GET ' + self.path + ' -> 404 Not found')
@@ -38,10 +44,10 @@ class DmaapSetup(BaseHTTPRequestHandler):
def do_PUT(self):
try:
if re.search('/setup/ves_event', self.path):
- global ves_event
- ves_event = httpServerLib.get_payload(self)
+ global event_ves
+ event_ves = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
- logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK, content: ' + ves_event.decode("utf-8"))
+ logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK, content: ' + event_ves.decode("utf-8"))
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found')
@@ -52,10 +58,12 @@ class DmaapSetup(BaseHTTPRequestHandler):
def do_POST(self):
try:
if re.search('/reset', self.path):
- global ves_event
- global captured_prh_event
- ves_event = DMAAP_EMPTY
- captured_prh_event = DMAAP_EMPTY
+ global event_ves
+ global event_pnf_ready
+ global event_pnf_update
+ event_ves = DMAAP_EMPTY
+ event_pnf_ready = DMAAP_EMPTY
+ event_pnf_update = DMAAP_EMPTY
httpServerLib.set_response_200_ok(self)
logger.debug('DmaapSetup POST /reset -> 200 OK')
else:
@@ -70,11 +78,17 @@ class DMaaPHandler(BaseHTTPRequestHandler):
def do_POST(self):
try:
if re.search('/events/unauthenticated.PNF_READY', self.path):
- global captured_prh_event
- captured_prh_event = httpServerLib.get_payload(self)
+ global event_pnf_ready
+ event_pnf_ready = httpServerLib.get_payload(self)
httpServerLib.set_response_200_ok(self)
logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200, content: '
- + captured_prh_event.decode("utf-8"))
+ + event_pnf_ready.decode("utf-8"))
+ elif re.search('/events/unauthenticated.PNF_UPDATE', self.path):
+ global event_pnf_update
+ event_pnf_update = httpServerLib.get_payload(self)
+ httpServerLib.set_response_200_ok(self)
+ logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200, content: '
+ + event_pnf_update.decode("utf-8"))
else:
httpServerLib.set_response_404_not_found(self)
logger.info('DMaaPHandler POST ' + self.path + ' -> 404 Not found')
@@ -85,12 +99,12 @@ class DMaaPHandler(BaseHTTPRequestHandler):
def do_GET(self):
try:
if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDCAE-c12/c12', self.path):
- global ves_event
- httpServerLib.set_response_200_ok(self, payload = ves_event)
+ global event_ves
+ httpServerLib.set_response_200_ok(self, payload=self.pack_event_json_as_quoted_string_into_array(event_ves))
logger.debug(
'DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200, content: '
- + ves_event.decode("utf-8"))
- ves_event = DMAAP_EMPTY
+ + event_ves.decode("utf-8"))
+ event_ves = DMAAP_EMPTY
logger.debug('DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200')
else:
httpServerLib.set_response_404_not_found(self)
@@ -99,9 +113,18 @@ class DMaaPHandler(BaseHTTPRequestHandler):
logger.error(e)
httpServerLib.set_response_500_server_error(self)
+ def pack_event_json_as_quoted_string_into_array(self, event):
+ if event == DMAAP_EMPTY:
+ return DMAAP_EMPTY
+ else:
+ decoded = event_ves.decode("utf-8")
+ packed = '[' + json.dumps(decoded) + ']'
+ logger.info("prepared response: " + packed)
+ return packed.encode()
+
+
def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"):
handler_class.protocol_version = protocol
- httpServerLib.start_http_endpoint(2222, DMaaPHandler)
httpServerLib.start_https_endpoint(2223, DMaaPHandler, keyfile="certs/dmaap-mr.key", certfile="certs/dmaap-mr.crt", ca_certs="certs/root.crt")
httpServerLib.start_http_endpoint(2224, DmaapSetup)
while 1:
diff --git a/tests/integration/vCPE/test1.robot b/tests/integration/vCPE/test1.robot
index 1dd7c1bb..d07bf6e4 100644
--- a/tests/integration/vCPE/test1.robot
+++ b/tests/integration/vCPE/test1.robot
@@ -4,7 +4,7 @@ Suite Teardown Suite Teardown
Library OperatingSystem
Library RequestsLibrary
Library Process
-Library eteutils/UUID.py
+Library ONAPLibrary.Utilities
*** Variables ***
${GLOBAL_APPLICATION_ID} csit-vCPE
@@ -15,7 +15,7 @@ ${GLOBAL_MSO_PASSWORD} password1$
SO ServiceInstance health check
${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
${session}= Create Session so http://${SO_IP}:8080
- ${uuid}= Generate UUID
+ ${uuid}= Generate UUID4
${headers}= Create Dictionary Accept=text/html Content-Type=text/html X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Get Request so /ecomp/mso/infra/globalhealthcheck headers=${headers}
&{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json
diff --git a/tests/portal/testsuites/portal_VID.robot b/tests/portal/testsuites/portal_VID.robot
index 473a0464..fdfa4e79 100644
--- a/tests/portal/testsuites/portal_VID.robot
+++ b/tests/portal/testsuites/portal_VID.robot
@@ -3,7 +3,7 @@ Documentation The main interface for interacting with Portal. It handles low
Library ExtendedSelenium2Library
Library RequestsClientCert
Library RequestsLibrary
-Library UUID
+Library ONAPLibrary.Utilities
Library DateTime
Resource ../global_properties.robot
Resource ../browser_setup.robot
@@ -50,7 +50,7 @@ Run Portal Get Request
[Documentation] Runs Portal Get request
[Arguments] ${data_path}
${session}= Create Session portal ${GLOBAL_PORTAL_URL}
- ${uuid}= Generate UUID
+ ${uuid}= Generate UUID4
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Get Request portal ${data_path} headers=${headers}
Log Received response from portal ${resp.text}
diff --git a/tests/portal/testsuites/test1.robot b/tests/portal/testsuites/test1.robot
index 516fb0d4..d3196f83 100644
--- a/tests/portal/testsuites/test1.robot
+++ b/tests/portal/testsuites/test1.robot
@@ -4,7 +4,7 @@ Library ExtendedSelenium2Library
Library OperatingSystem
Library eteutils/RequestsClientCert.py
Library RequestsLibrary
-Library eteutils/UUID.py
+Library ONAPLibrary.Utilities
Library DateTime
Library Collections
Library eteutils/StringTemplater.py
@@ -259,7 +259,7 @@ Run Portal Get Request
[Documentation] Runs Portal Get request
[Arguments] ${data_path}
${session}= Create Session portal ${PORTAL_URL}
- ${uuid}= Generate UUID
+ ${uuid}= Generate UUID4
${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
${resp}= Get Request portal ${data_path} headers=${headers}
Log Received response from portal ${resp.text}
diff --git a/tests/sdc/dcaed/__init__.robot b/tests/sdc/dcaed/__init__.robot
new file mode 100644
index 00000000..fc9392d3
--- /dev/null
+++ b/tests/sdc/dcaed/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Sdc - dcaed
diff --git a/tests/sdc/dcaed/asdc_interface.robot b/tests/sdc/dcaed/asdc_interface.robot
new file mode 100644
index 00000000..88053e88
--- /dev/null
+++ b/tests/sdc/dcaed/asdc_interface.robot
@@ -0,0 +1,161 @@
+*** Settings ***
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Library ONAPLibrary.Utilities
+
+Resource common.robot
+
+***Variables ***
+${ASDC_CATALOG_SERVICES_PATH} /sdc2/rest/v1/catalog/services
+${ASDC_CATALOG_RESOURCES_PATH} /sdc2/rest/v1/catalog/resources
+${ASDC_CATALOG_LIFECYCLE_PATH} /lifecycleState
+${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} /resourceInstance
+${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH} /distribution-state
+${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} /approve
+
+${ASDC_CATALOG_RESOURCE_TEMPLATE} ${ASSETS_DIR}component_catalog_resource.template
+${ASDC_CATALOG_SERVICE_TEMPLATE} ${ASSETS_DIR}catalog_service.template
+${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${ASSETS_DIR}artifact_upload.template
+${ASDC_USER_REMARKS_TEMPLATE} ${ASSETS_DIR}user_remarks.template
+${DCAE_VFCMT_TEMPLATE} ${ASSETS_DIR}create_vfcmt.template
+${DCAE_COMPOSITION_TEMPLATE} ${ASSETS_DIR}dcae_composition.template
+${DCAE_MONITORING_CONFIGURATION_TEMPLATE} ${ASSETS_DIR}dcae_monitoring_configuration.template
+${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${ASSETS_DIR}resource_instance.template
+
+${ASDC_BE_ENDPOINT} http://localhost:8080
+
+*** Keywords ***
+
+Create Catalog Resource Data
+ [Documentation] Creates and returns data for ASDC Catalog Resource
+ [Arguments] ${resource_name} ${vendor_name}
+ ${map}= Create Dictionary resource_name=${resource_name} vendor_name=${vendor_name}
+ ${data}= json_templater.Fill JSON Template File ${ASDC_CATALOG_RESOURCE_TEMPLATE} ${map}
+ [Return] ${data}
+
+# Based on testsuite/robot/resources/asdc_interface.robot's 'Post ASDC Resource Request' keyword
+Post ASDC Resource Request Unauthenticated
+ [Documentation] Makes unauthenticated Post request for ASDC Catalog resource and returns its unique id
+ [Arguments] ${data}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_RESOURCES_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 201
+ [Return] ${resp.json()['uniqueId']}
+
+# Based on testsuite/robot/resources/asdc_interface.robot's 'Run ASDC Post Request' keyword
+Run ASDC Post Request Unauthenticated
+ [Documentation] Runs an ASDC Post request without authentication and returns the HTTP response
+ [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
+ Log Creating session ${MY_ASDC_BE_ENDPOINT}
+ ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
+ Log Received response from asdc ${resp.text}
+ [Return] ${resp}
+
+# Based on testsuite/robot/resources/asdc_interface.robot's 'Run ASDC MD5 Post Request' keyword
+Run ASDC MD5 Post Request Unauthenticated
+ [Documentation] Runs an ASDC post request with MD5 Checksum header without authentication and returns the HTTP response
+ [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_ASDC_BE_ENDPOINT}=${ASDC_BE_ENDPOINT}
+ Log Creating session ${MY_ASDC_BE_ENDPOINT}
+ ${session}= Create Session asdc ${MY_ASDC_BE_ENDPOINT}
+ ${uuid}= Generate UUID4
+ ${data_string}= Evaluate json.dumps(${data}) json
+ ${md5checksum}= Evaluate md5.new('''${data_string}''').hexdigest() modules=md5
+ ${base64md5checksum}= Evaluate base64.b64encode("${md5checksum}") modules=base64
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Content-MD5=${base64md5checksum}
+ ${resp}= Post Request asdc ${data_path} data=${data} headers=${headers}
+ Log Received response from asdc: ${resp.text}
+ [Return] ${resp}
+
+# Based on testsuite/robot/resources/asdc_interface.robot's 'Setup SDC Catalog Resource Deployment Artifact Properties' keyword
+Add Tosca Artifact To Resource
+ [Documentation] Add Tosca artifacts to given resource id
+ [Arguments] ${artifact} ${vf_id}
+ ${blueprint_data} OperatingSystem.Get File ${ASSETS_DIR}${artifact}.yaml
+ ${payloadData}= Evaluate base64.b64encode('''${blueprint_data}'''.encode('utf-8')) modules=base64
+ ${dict}= Create Dictionary artifactLabel=${artifact} artifactName=${artifact}.yaml artifactType=DCAE_TOSCA artifactGroupType=DEPLOYMENT description=${artifact}.yaml payloadData=${payloadData}
+ ${data}= Fill JSON Template File ${ASDC_ARTIFACT_UPLOAD_TEMPLATE} ${dict}
+ # POST artifactUpload to resource
+ ${resp}= Run ASDC MD5 Post Request Unauthenticated ${ASDC_CATALOG_RESOURCES_PATH}/${vf_id}/artifacts ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp}
+
+# Directly copied from testsuite/robot/resources/asdc_interface.robot
+Certify ASDC Catalog Resource
+ [Documentation] Certifies an ASDC Catalog Resource by its id and returns the new id
+ [Arguments] ${catalog_resource_id} ${user_id}=${ASDC_TESTER_USER_ID}
+ ${map}= Create Dictionary user_remarks=Robot remarks
+ ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${user_id}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
+
+Add Catalog Service For Monitoring Template
+ [Documentation] Creates an ASDC Catalog Service for Monitoring Template with given name
+ [Arguments] ${service_name}
+ ${map}= Create Dictionary service_name=${service_name}
+ ${data}= Fill JSON Template File ${ASDC_CATALOG_SERVICE_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH} ${data}
+ Should Be Equal As Strings ${resp.status_code} 201
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['uuid']}
+
+# Based on testsuite/robot/resources/asdc_interface.robot's 'Add ASDC Resource Instance' keyword
+Add ASDC Resource Instance
+ [Documentation] Creates an ASDC Resource Instance and returns its id
+ [Arguments] ${catalog_service_id} ${catalog_resource_id} ${catalog_resource_name} ${xoffset}=${0} ${yoffset}=${0} ${resourceType}=VF
+ ${milli_timestamp}= Generate Timestamp
+ ${xoffset}= Set Variable ${xoffset+306}
+ ${yoffset}= Set Variable ${yoffset+248}
+ ${map}= Create Dictionary catalog_resource_id=${catalog_resource_id} catalog_resource_name=${catalog_resource_name} milli_timestamp=${milli_timestamp} posX=${xoffset} posY=${yoffset} originType=${resourceType}
+ ${data}= Fill JSON Template File ${ASDC_RESOURCE_INSTANCE_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_RESOURCE_INSTANCE_PATH} ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 201
+ [Return] ${resp.json()['uniqueId']} ${resp.json()['name']}
+
+# Adjusted from asdc_interface.robot
+
+Checkin ASDC Catalog Service
+ [Documentation] Checks in an ASDC Catalog Service by its id
+ [Arguments] ${catalog_service_id}
+ ${map}= Create Dictionary user_remarks=Robot remarks
+ ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/checkin ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()}
+
+Request Certify ASDC Catalog Service
+ [Documentation] Requests certification of an ASDC Catalog Service by its id
+ [Arguments] ${catalog_service_id}
+ ${map}= Create Dictionary user_remarks=Robot remarks
+ ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certificationRequest ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()}
+
+Start Certify ASDC Catalog Service
+ [Documentation] Start certification of an ASDC Catalog Service by its id
+ [Arguments] ${catalog_service_id}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/startCertification ${None} ${ASDC_TESTER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()}
+
+Certify ASDC Catalog Service
+ [Documentation] Certifies an ASDC Catalog Service by its id and returns the new id
+ [Arguments] ${catalog_service_id}
+ ${map}= Create Dictionary user_remarks=Robot remarks
+ ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uniqueId']}
+
+Approve ASDC Catalog Service
+ [Documentation] Approves an ASDC Catalog Service by its id
+ [Arguments] ${catalog_service_id}
+ ${map}= Create Dictionary user_remarks=Robot remarks
+ ${data}= Fill JSON Template File ${ASDC_USER_REMARKS_TEMPLATE} ${map}
+ ${resp}= Run ASDC Post Request Unauthenticated ${ASDC_CATALOG_SERVICES_PATH}/${catalog_service_id}${ASDC_CATALOG_SERVICE_DISTRIBUTION_STATE_PATH}${ASDC_DISTRIBUTION_STATE_APPROVE_PATH} ${data} ${ASDC_GOVERNOR_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()}
+
diff --git a/tests/sdc/dcaed/assets/artifact_upload.template b/tests/sdc/dcaed/assets/artifact_upload.template
new file mode 100755
index 00000000..9be6ca04
--- /dev/null
+++ b/tests/sdc/dcaed/assets/artifact_upload.template
@@ -0,0 +1,8 @@
+{
+ "artifactLabel":"${artifactLabel}",
+ "artifactName": "${artifactName}",
+ "artifactType": "${artifactType}",
+ "artifactGroupType": "${artifactGroupType}",
+ "description": "${description}",
+ "payloadData": "${payloadData}"
+}
diff --git a/tests/sdc/dcaed/assets/catalog_service.template b/tests/sdc/dcaed/assets/catalog_service.template
new file mode 100755
index 00000000..56085025
--- /dev/null
+++ b/tests/sdc/dcaed/assets/catalog_service.template
@@ -0,0 +1,42 @@
+{
+ "artifacts": {},
+ "toscaArtifacts": {},
+ "contactId": "cs0008",
+ "categories": [
+ {
+ "name": "Network L4+",
+ "normalizedName": "network l4+",
+ "uniqueId": "serviceNewCategory.network l4+",
+ "icons": [
+ "network_l_4"
+ ],
+ "subcategories": null,
+ "version": null,
+ "ownerId": null,
+ "empty": false,
+ "type": null
+ }
+ ],
+ "description": "Created by robot for monitoring template",
+ "icon": "defaulticon",
+ "componentInstancesProperties": {},
+ "componentInstancesAttributes": {},
+ "name": "${service_name}",
+ "tags": [
+ "robot-ete",
+ "${service_name}"
+ ],
+ "capabilities": {},
+ "requirements": {},
+ "deploymentArtifacts": {},
+ "componentType": "SERVICE",
+ "projectCode": "123456",
+ "componentInstances": [],
+ "properties": [],
+ "attributes": [],
+ "forwardingPaths": {},
+ "ecompGeneratedNaming": true,
+ "serviceApiArtifacts": {},
+ "instantiationType": "A-la-carte",
+ "environmentContext": "General_Revenue-Bearing"
+}
diff --git a/tests/sdc/dcaed/assets/component_catalog_resource.template b/tests/sdc/dcaed/assets/component_catalog_resource.template
new file mode 100644
index 00000000..cb6c402c
--- /dev/null
+++ b/tests/sdc/dcaed/assets/component_catalog_resource.template
@@ -0,0 +1,41 @@
+{
+ "artifacts": {},
+ "toscaArtifacts": {},
+ "contactId": "cs0008",
+ "categories": [
+ {
+ "name": "DCAE Component",
+ "normalizedName": "dcaecomponent",
+ "uniqueId": "resourceNewCategory.dcaecomponent",
+ "subcategories": [
+ {
+ "name": "Microservice",
+ "normalizedName": "microservice",
+ "uniqueId": "resourceNewCategory.dcaecomponent.microservice",
+ "icons": [
+ "dcae_microservice"
+ ]
+ }
+ ]
+ }
+ ],
+ "description": "virtual function",
+ "icon": "defaulticon",
+ "componentInstancesProperties": {},
+ "componentInstancesAttributes": {},
+ "name": "${resource_name}",
+ "tags": [
+ "${resource_name}"
+ ],
+ "capabilities": {},
+ "requirements": {},
+ "deploymentArtifacts": {},
+ "componentType": "RESOURCE",
+ "vendorName": "${vendor_name}",
+ "vendorRelease": "1.0",
+ "componentInstances": [],
+ "properties": [],
+ "attributes": [],
+ "groups": [],
+ "resourceType": "VF"
+}
diff --git a/tests/sdc/dcaed/assets/create_vfcmt.template b/tests/sdc/dcaed/assets/create_vfcmt.template
new file mode 100644
index 00000000..19ce2117
--- /dev/null
+++ b/tests/sdc/dcaed/assets/create_vfcmt.template
@@ -0,0 +1,4 @@
+{
+"name":"${vfcmtName}",
+"description":"${description}"
+}
diff --git a/tests/sdc/dcaed/assets/dcae_composition.template b/tests/sdc/dcaed/assets/dcae_composition.template
new file mode 100644
index 00000000..81be7893
--- /dev/null
+++ b/tests/sdc/dcaed/assets/dcae_composition.template
@@ -0,0 +1,849 @@
+{
+ "cid": "${cid}",
+ "flowType": "TCA Hi Lo",
+ "inputs": [],
+ "nodes": [
+ {
+ "capabilities": [
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/${vf_id}/toscaModel/",
+ "id": "${vf_id}",
+ "name": "tca-docker",
+ "ndata": {
+ "label": "tca-docker",
+ "name": "n.1559041944060.0",
+ "ports": [],
+ "px": 364,
+ "py": 437,
+ "radius": 30,
+ "x": 365,
+ "y": 438
+ },
+ "nid": "n.1559041944060.0",
+ "properties": [
+ {
+ "default": 10000,
+ "name": "cpu_period",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "default": 30000,
+ "name": "cpu_quota",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "default": 256,
+ "name": "cpu_shares",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "image",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location_id",
+ "required": true,
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "default": "500m",
+ "name": "mem_limit",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "default": "on-failure",
+ "name": "restart_policy.Name",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "default": 3,
+ "name": "restart_policy.max_retry_counts",
+ "required": true,
+ "type": "integer"
+ },
+ {
+ "name": "service_component_type",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "name": "stream_subscribe_0",
+ "node": "topic0",
+ "relationship": {
+ "type": "dcae.relationships.subscribe_to_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "name": "stream_publish_0",
+ "node": "topic1",
+ "relationship": {
+ "type": "dcae.relationships.publish_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "name": "host",
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dockerApp.tca-docker"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "feature",
+ "type": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "${vf_id}/tosca.dcae.nodes.dockerApp",
+ "name": "tosca.dcae.nodes.dockerApp"
+ },
+ {
+ "id": "${vf_id}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "${vf_id}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "${vf_id}/tosca.dcae.nodes.dockerApp.tca-docker",
+ "itemId": "${vf_id}/tosca.dcae.nodes.dockerApp.tca-docker",
+ "name": "tosca.dcae.nodes.dockerApp.tca-docker",
+ "requirements": [
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "id": "${vf_id}/stream_subscribe_0",
+ "name": "stream_subscribe_0",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "relationship": {
+ "type": "dcae.relationships.subscribe_to_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "id": "${vf_id}/stream_publish_0",
+ "name": "stream_publish_0",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ },
+ "relationship": {
+ "type": "dcae.relationships.publish_events"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "id": "${vf_id}/host",
+ "name": "host",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.dockerHost",
+ "name": "dcae.capabilities.dockerHost"
+ },
+ "relationship": {
+ "type": "dcae.relationships.component_contained_in"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "${vf_id}/composition",
+ "name": "composition",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "${vf_id}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "capabilities": [
+ {
+ "name": "topic",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_password"
+ ]
+ }
+ },
+ "name": "aaf_password",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_username"
+ ]
+ }
+ },
+ "name": "aaf_username",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "client_role"
+ ]
+ }
+ },
+ "name": "client_role",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "location"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "node_name"
+ ]
+ }
+ },
+ "name": "node_name",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "topic_name"
+ ]
+ }
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "type": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/${vf_id}/toscaModel/",
+ "id": "${vf_id}",
+ "name": "topic0",
+ "ndata": {
+ "label": "topic0",
+ "name": "n.1559041944077.1",
+ "ports": [],
+ "px": 414,
+ "py": 430.9243296300162,
+ "radius": 30,
+ "x": 415,
+ "y": 431.9243296300162
+ },
+ "nid": "n.1559041944077.1",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_aaf_password"
+ }
+ },
+ "name": "aaf_password",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_aaf_password"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_aaf_username"
+ }
+ },
+ "name": "aaf_username",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_aaf_username"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic0_client_role"
+ }
+ },
+ "name": "client_role",
+ "type": "string",
+ "value": {
+ "get_input": "topic0_client_role"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "assignment": {
+ "value": "__GET_NODE_NAME__"
+ },
+ "name": "node_name",
+ "type": "string",
+ "value": "__GET_NODE_NAME__"
+ },
+ {
+ "assignment": {
+ "value": ""
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dmaap.topic"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "topic",
+ "type": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "${vf_id}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "${vf_id}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "${vf_id}/tosca.dcae.nodes.dmaap.topic",
+ "itemId": "${vf_id}/tosca.dcae.nodes.dmaap.topic",
+ "name": "tosca.dcae.nodes.dmaap.topic",
+ "requirements": [
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "${vf_id}/composition",
+ "name": "composition",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "${vf_id}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "capabilities": [
+ {
+ "name": "topic",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_password"
+ ]
+ }
+ },
+ "name": "aaf_password",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "aaf_username"
+ ]
+ }
+ },
+ "name": "aaf_username",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "client_role"
+ ]
+ }
+ },
+ "name": "client_role",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "location"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "node_name"
+ ]
+ }
+ },
+ "name": "node_name",
+ "type": "string"
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "topic_name"
+ ]
+ }
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "type": {
+ "id": "template.yaml/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "description": "/sdc/v1/catalog/resources/${vf_id}/toscaModel/",
+ "id": "${vf_id}",
+ "name": "topic1",
+ "ndata": {
+ "label": "topic1",
+ "name": "n.1559041944083.2",
+ "ports": [],
+ "px": 464,
+ "py": 451.6297431929615,
+ "radius": 30,
+ "x": 465,
+ "y": 452.6297431929615
+ },
+ "nid": "n.1559041944083.2",
+ "properties": [
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_aaf_password"
+ }
+ },
+ "name": "aaf_password",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_aaf_password"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_aaf_username"
+ }
+ },
+ "name": "aaf_username",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_aaf_username"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_input": "topic1_client_role"
+ }
+ },
+ "name": "client_role",
+ "type": "string",
+ "value": {
+ "get_input": "topic1_client_role"
+ }
+ },
+ {
+ "assignment": {
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ "name": "location",
+ "type": "string",
+ "value": {
+ "get_property": [
+ "SELF",
+ "composition",
+ "location_id"
+ ]
+ }
+ },
+ {
+ "assignment": {
+ "value": "__GET_NODE_NAME__"
+ },
+ "name": "node_name",
+ "type": "string",
+ "value": "__GET_NODE_NAME__"
+ },
+ {
+ "assignment": {
+ "value": ""
+ },
+ "name": "topic_name",
+ "type": "string"
+ }
+ ],
+ "requirements": [
+ {
+ "capability": {
+ "id": "template.yaml/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "name": "composition"
+ },
+ {
+ "capability": {
+ "id": "template.yaml/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "name": "dependency",
+ "node": "tosca.nodes.Root",
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ],
+ "type": {
+ "name": "tosca.dcae.nodes.dmaap.topic"
+ },
+ "typeinfo": {
+ "capabilities": [
+ {
+ "name": "topic",
+ "type": {
+ "id": "${vf_id}/dcae.capabilities.dmmap.topic",
+ "name": "dcae.capabilities.dmmap.topic"
+ }
+ },
+ {
+ "name": "feature",
+ "type": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ }
+ }
+ ],
+ "hierarchy": [
+ {
+ "id": "${vf_id}/tosca.dcae.nodes.Root",
+ "name": "tosca.dcae.nodes.Root"
+ },
+ {
+ "description": "The TOSCA Node Type all other TOSCA base Node Types derive from",
+ "id": "${vf_id}/tosca.nodes.Root",
+ "name": "tosca.nodes.Root"
+ }
+ ],
+ "id": "${vf_id}/tosca.dcae.nodes.dmaap.topic",
+ "itemId": "${vf_id}/tosca.dcae.nodes.dmaap.topic",
+ "name": "tosca.dcae.nodes.dmaap.topic",
+ "requirements": [
+ {
+ "capability": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ },
+ "id": "${vf_id}/composition",
+ "name": "composition",
+ "node": {
+ "id": "${vf_id}/dcae.capabilities.composition.host",
+ "name": "dcae.capabilities.composition.host"
+ }
+ },
+ {
+ "capability": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "id": "${vf_id}/dependency",
+ "name": "dependency",
+ "node": {
+ "id": "${vf_id}/tosca.capabilities.Node",
+ "name": "tosca.capabilities.Node"
+ },
+ "occurrences": [
+ 0,
+ "UNBOUNDED"
+ ],
+ "relationship": {
+ "type": "tosca.relationships.DependsOn"
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "outputs": [],
+ "relations": [
+ {
+ "meta": {
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944077.1",
+ "p1": "stream_subscribe_0",
+ "p2": "topic",
+ "relationship": [
+ "tca-docker",
+ null,
+ "stream_subscribe_0"
+ ]
+ },
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944077.1",
+ "name1": "tca-docker",
+ "name2": "topic0",
+ "rid": "lnk.1559041944098.3"
+ },
+ {
+ "meta": {
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944083.2",
+ "p1": "stream_publish_0",
+ "p2": "topic",
+ "relationship": [
+ "tca-docker",
+ null,
+ "stream_publish_0"
+ ]
+ },
+ "n1": "n.1559041944060.0",
+ "n2": "n.1559041944083.2",
+ "name1": "tca-docker",
+ "name2": "topic1",
+ "rid": "lnk.1559041944104.4"
+ }
+ ],
+ "version": 0
+}
diff --git a/tests/sdc/dcaed/assets/dcae_monitoring_configuration.template b/tests/sdc/dcaed/assets/dcae_monitoring_configuration.template
new file mode 100755
index 00000000..f42e4685
--- /dev/null
+++ b/tests/sdc/dcaed/assets/dcae_monitoring_configuration.template
@@ -0,0 +1,11 @@
+{
+ "name": "${name}",
+ "description": "Created by robot",
+ "templateUuid": "${template_uuid}",
+ "vfiName": "${vfi_name}",
+ "serviceUuid": "${service_uuid}",
+ "contextType": "SERVICE",
+ "flowType": "TCA Hi Lo",
+ "cloneVFCMT": true,
+ "updateFlowType": false
+}
diff --git a/tests/sdc/dcaed/assets/resource_instance.template b/tests/sdc/dcaed/assets/resource_instance.template
new file mode 100644
index 00000000..18cf34c7
--- /dev/null
+++ b/tests/sdc/dcaed/assets/resource_instance.template
@@ -0,0 +1,10 @@
+{
+ "uniqueId": "${catalog_resource_id}${milli_timestamp}",
+ "posX": ${posX},
+ "posY": ${posY},
+ "name": "${catalog_resource_name}",
+ "componentVersion": "1.0",
+ "originType": "${originType}",
+ "icon": "defaulticon",
+ "componentUid": "${catalog_resource_id}"
+}
diff --git a/tests/sdc/dcaed/assets/schema.yaml b/tests/sdc/dcaed/assets/schema.yaml
new file mode 100755
index 00000000..7024a35c
--- /dev/null
+++ b/tests/sdc/dcaed/assets/schema.yaml
@@ -0,0 +1,551 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+capability_types:
+ dcae.capabilities.cdapHost:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.composition.host:
+ derived_from: tosca.capabilities.Root
+ properties:
+ location_id:
+ type: string
+ service_id:
+ type: string
+ dcae.capabilities.dmmap.feed:
+ derived_from: tosca.capabilities.Root
+ properties:
+ feed_name:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ dcae.capabilities.dmmap.topic:
+ derived_from: tosca.capabilities.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ topic_name:
+ type: string
+ dcae.capabilities.dockerHost:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.policy:
+ derived_from: tosca.capabilities.Root
+ dcae.capabilities.service.provide:
+ derived_from: tosca.capabilities.Root
+ properties:
+ request_format:
+ type: string
+ request_version:
+ type: string
+ response_format:
+ type: string
+ response_version:
+ type: string
+ service_endpoint:
+ type: string
+ service_name:
+ type: string
+ verb:
+ type: string
+ dcae.capabilities.stream.subscribe:
+ derived_from: tosca.capabilities.Root
+ properties:
+ format:
+ type: string
+ route:
+ type: string
+ version:
+ type: string
+relationship_types:
+ cloudify.relationships.depends_on:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.component_contained_in:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.publish_events:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.publish_files:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.rework_connected_to:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.subscribe_to_events:
+ derived_from: tosca.relationships.Root
+ dcae.relationships.subscribe_to_files:
+ derived_from: tosca.relationships.Root
+node_types:
+ cloudify.dcae.nodes.Root:
+ derived_from: tosca.nodes.Root
+ dcae.nodes.ContainerizedComponent:
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ dcae.nodes.ContainerizedServiceComponent:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: dcae.nodes.ContainerizedComponent
+ properties:
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ dcae.nodes.ContainerizedServiceComponentUsingDmaap:
+ derived_from: dcae.nodes.ContainerizedServiceComponent
+ properties:
+ streams_publishes:
+ type: list
+ streams_subscribes:
+ type: list
+ dcae.nodes.DockerContainerForComponents:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: cloudify.dcae.nodes.Root
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ host_config:
+ type: map
+ stop:
+ inputs:
+ cleanup_image:
+ type: boolean
+ type: tosca.interfaces.Root
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ dcae.nodes.DockerContainerForComponentsUsingDmaap:
+ derived_from: dcae.nodes.DockerContainerForComponents
+ properties:
+ application_config:
+ required: true
+ type: map
+ docker_config:
+ type: map
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ streams_publishes:
+ type: list
+ streams_subscribes:
+ type: list
+ attributes:
+ service_component_name:
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ - stream_subscribe_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.subscribe_to_events
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ host_config:
+ type: map
+ stop:
+ inputs:
+ cleanup_image:
+ type: boolean
+ type: tosca.interfaces.Root
+ dcae.nodes.ExistingFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ feed_id:
+ type: string
+ dcae.nodes.ExistingTopic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ fqtn:
+ type: string
+ dcae.nodes.ExternalTargetFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ url:
+ type: string
+ username:
+ type: string
+ userpw:
+ type: string
+ dcae.nodes.Feed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ feed_name:
+ type: string
+ dcae.nodes.MicroService.cdap:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: cloudify.dcae.nodes.Root
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ create:
+ inputs:
+ connected_broker_dns_name:
+ type: string
+ type: tosca.interfaces.Root
+ properties:
+ app_config:
+ required: false
+ type: map
+ app_preferences:
+ required: false
+ type: map
+ artifact_name:
+ required: false
+ type: string
+ artifact_version:
+ required: false
+ type: string
+ connections:
+ required: false
+ type: map
+ jar_url:
+ type: string
+ namespace:
+ required: false
+ type: string
+ program_preferences:
+ required: false
+ type: list
+ programs:
+ required: false
+ type: list
+ service_component_type:
+ type: string
+ service_endpoints:
+ required: false
+ type: list
+ streamname:
+ required: false
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.cdapHost
+ relationship: dcae.relationships.component_contained_in
+ dcae.nodes.SelectedDockerHost:
+ capabilities:
+ host:
+ type: dcae.capabilities.dockerHost
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ docker_host_override:
+ type: string
+ location_id:
+ required: true
+ type: string
+ dcae.nodes.Topic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ topic_name:
+ type: string
+ dcae.nodes.composition.virtual:
+ capabilities:
+ host:
+ type: dcae.capabilities.composition.host
+ derived_from: tosca.nodes.Root
+ properties:
+ location_id:
+ required: true
+ type: string
+ service_id:
+ required: true
+ type: string
+ dcae.nodes.policies:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ policy_filter:
+ type: map
+ dcae.nodes.policy:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: cloudify.dcae.nodes.Root
+ properties:
+ policy_id:
+ required: true
+ type: string
+ policy.nodes.Root:
+ derived_from: tosca.nodes.Root
+ properties:
+ policyDescription:
+ required: false
+ type: string
+ policyName:
+ required: true
+ type: string
+ policyScope:
+ required: true
+ type: string
+ policyVersion:
+ required: true
+ type: string
+ tosca.dcae.nodes.Root:
+ derived_from: tosca.nodes.Root
+ tosca.dcae.nodes.cdapApp:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ connected_broker_dns_name:
+ default: cdap_broker
+ required: true
+ type: string
+ jar_url:
+ required: true
+ type: string
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.cdapHost
+ relationship: dcae.relationships.component_contained_in
+ tosca.dcae.nodes.dmaap.existingFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ feed_id:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.existingTopic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ fqtn:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.externalTargetFeed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ location:
+ type: string
+ node_name:
+ type: string
+ url:
+ type: string
+ username:
+ type: string
+ userpw:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.feed:
+ capabilities:
+ feed:
+ type: dcae.capabilities.dmmap.feed
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ feed_name:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dmaap.topic:
+ capabilities:
+ topic:
+ type: dcae.capabilities.dmmap.topic
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ aaf_password:
+ type: string
+ aaf_username:
+ type: string
+ client_role:
+ type: string
+ location:
+ type: string
+ node_name:
+ type: string
+ topic_name:
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dockerApp:
+ attributes:
+ service_component_name:
+ type: string
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ cpu_period:
+ default: 10000
+ required: true
+ type: integer
+ cpu_quota:
+ default: 30000
+ required: true
+ type: integer
+ cpu_shares:
+ default: 256
+ required: true
+ type: integer
+ image:
+ required: true
+ type: string
+ location_id:
+ required: true
+ type: string
+ mem_limit:
+ default: 500m
+ required: true
+ type: string
+ restart_policy.Name:
+ default: on-failure
+ required: true
+ type: string
+ restart_policy.max_retry_counts:
+ default: 3
+ required: true
+ type: integer
+ service_component_type:
+ required: true
+ type: string
+ requirements:
+ - host:
+ capability: dcae.capabilities.dockerHost
+ relationship: dcae.relationships.component_contained_in
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.dockerApp.tca-docker:
+ derived_from: tosca.dcae.nodes.dockerApp
+ requirements:
+ - stream_subscribe_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.subscribe_to_events
+ - stream_publish_0:
+ capability: dcae.capabilities.dmmap.topic
+ relationship: dcae.relationships.publish_events
+ tosca.dcae.nodes.dockerHost:
+ capabilities:
+ host:
+ type: dcae.capabilities.dockerHost
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ docker_host_override:
+ type: string
+ location_id:
+ required: true
+ type: string
+ requirements:
+ - composition:
+ capability: dcae.capabilities.composition.host
+ tosca.dcae.nodes.policies:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ configAttributes:
+ type: string
+ configName:
+ type: string
+ onapName:
+ type: string
+ policyName:
+ type: string
+ unique:
+ type: boolean
+ tosca.dcae.nodes.policy:
+ capabilities:
+ policy:
+ type: dcae.capabilities.policy
+ derived_from: tosca.dcae.nodes.Root
+ properties:
+ policy_id:
+ required: true
+ type: string
+ policy_name:
+ type: string
diff --git a/tests/sdc/dcaed/assets/template.yaml b/tests/sdc/dcaed/assets/template.yaml
new file mode 100755
index 00000000..5a03da76
--- /dev/null
+++ b/tests/sdc/dcaed/assets/template.yaml
@@ -0,0 +1,117 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: tca-docker
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ topic0_aaf_password:
+ type: string
+ topic0_aaf_username:
+ type: string
+ topic0_client_role:
+ type: string
+ topic1_aaf_password:
+ type: string
+ topic1_aaf_username:
+ type: string
+ topic1_client_role:
+ type: string
+ node_templates:
+ tca-docker:
+ type: tosca.dcae.nodes.dockerApp.tca-docker
+ properties:
+ location_id:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ requirements:
+ - stream_subscribe_0: topic0
+ - stream_publish_0: topic1
+ topic0:
+ type: tosca.dcae.nodes.dmaap.topic
+ properties:
+ aaf_password:
+ get_input: topic0_aaf_password
+ aaf_username:
+ get_input: topic0_aaf_username
+ client_role:
+ get_input: topic0_client_role
+ location:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ node_name: __GET_NODE_NAME__
+ topic_name: ''
+ capabilities:
+ topic:
+ properties:
+ aaf_password:
+ get_property:
+ - SELF
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - aaf_username
+ client_role:
+ get_property:
+ - SELF
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - location
+ node_name:
+ get_property:
+ - SELF
+ - node_name
+ topic_name:
+ get_property:
+ - SELF
+ - topic_name
+ topic1:
+ type: tosca.dcae.nodes.dmaap.topic
+ properties:
+ aaf_password:
+ get_input: topic1_aaf_password
+ aaf_username:
+ get_input: topic1_aaf_username
+ client_role:
+ get_input: topic1_client_role
+ location:
+ get_property:
+ - SELF
+ - composition
+ - location_id
+ node_name: __GET_NODE_NAME__
+ topic_name: ''
+ capabilities:
+ topic:
+ properties:
+ aaf_password:
+ get_property:
+ - SELF
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - aaf_username
+ client_role:
+ get_property:
+ - SELF
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - location
+ node_name:
+ get_property:
+ - SELF
+ - node_name
+ topic_name:
+ get_property:
+ - SELF
+ - topic_name
diff --git a/tests/sdc/dcaed/assets/translate.yaml b/tests/sdc/dcaed/assets/translate.yaml
new file mode 100755
index 00000000..5515dc2c
--- /dev/null
+++ b/tests/sdc/dcaed/assets/translate.yaml
@@ -0,0 +1,147 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: tca-docker_translate
+imports:
+- schema: schema.yaml
+topology_template:
+ inputs:
+ cpu_period:
+ type: integer
+ default: 10000
+ cpu_quota:
+ type: integer
+ default: 30000
+ cpu_shares:
+ type: integer
+ default: 256
+ image:
+ type: string
+ location_id:
+ type: string
+ mem_limit:
+ type: string
+ default: 500m
+ restart_policy.Name:
+ type: string
+ default: on-failure
+ restart_policy.max_retry_counts:
+ type: integer
+ default: 3
+ service_component_type:
+ type: string
+ substitution_mappings:
+ node_type: tosca.dcae.nodes.dockerApp.tca-docker
+ capabilities: {}
+ requirements:
+ host:
+ - tca-docker
+ - host
+ stream_publish_0:
+ - tca-docker
+ - stream_publish_0
+ stream_subscribe_0:
+ - tca-docker
+ - stream_subscribe_0
+ node_templates:
+ tca-docker:
+ type: dcae.nodes.DockerContainerForComponentsUsingDmaap
+ properties:
+ application_config:
+ services_calls: {}
+ streams_publishes:
+ tca_handle_out:
+ aaf_password:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - aaf_username
+ dmaap_info:
+ concat:
+ - '<<'
+ - get_property:
+ - SELF
+ - stream_publish_0
+ - node_name
+ - '>>'
+ type: message_router
+ streams_subscribes:
+ tca_handle_in:
+ aaf_password:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - aaf_password
+ aaf_username:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - aaf_username
+ dmaap_info:
+ concat:
+ - '<<'
+ - get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ - '>>'
+ type: message_router
+ docker_config:
+ healthcheck:
+ endpoint: /
+ interval: 15s
+ timeout: 1s
+ type: https
+ ports:
+ - 11011:11011
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.1.0
+ location_id:
+ get_input: location_id
+ service_component_type: tca-docker
+ streams_publishes:
+ - client_role:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - location
+ name:
+ get_property:
+ - SELF
+ - stream_publish_0
+ - node_name
+ type: message_router
+ streams_subscribes:
+ - client_role:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - client_role
+ location:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - location
+ name:
+ get_property:
+ - SELF
+ - stream_subscribe_0
+ - node_name
+ type: message_router
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ type: tosca.interfaces.Root
+ start:
+ inputs:
+ host_config: null
+ stop:
+ inputs:
+ cleanup_image: null
diff --git a/tests/sdc/dcaed/assets/user_remarks.template b/tests/sdc/dcaed/assets/user_remarks.template
new file mode 100644
index 00000000..465115e6
--- /dev/null
+++ b/tests/sdc/dcaed/assets/user_remarks.template
@@ -0,0 +1 @@
+{"userRemarks":"${user_remarks}"} \ No newline at end of file
diff --git a/tests/sdc/dcaed/common.robot b/tests/sdc/dcaed/common.robot
new file mode 100644
index 00000000..3cb73ff4
--- /dev/null
+++ b/tests/sdc/dcaed/common.robot
@@ -0,0 +1,11 @@
+*** Variables ***
+
+${ASDC_DESIGNER_USER_ID} cs0008
+${ASDC_TESTER_USER_ID} jm0007
+${ASDC_GOVERNOR_USER_ID} gv0001
+${ASDC_OPS_USER_ID} op0001
+
+${GLOBAL_APPLICATION_ID} robot
+
+${ASSETS_DIR} %{WORKSPACE}/tests/sdc/dcaed/assets/
+
diff --git a/tests/sdc/dcaed/dcaed_interface.robot b/tests/sdc/dcaed/dcaed_interface.robot
new file mode 100644
index 00000000..76401a86
--- /dev/null
+++ b/tests/sdc/dcaed/dcaed_interface.robot
@@ -0,0 +1,76 @@
+*** Settings ***
+Library json
+Library eteutils/HTTPUtils.py
+Library ONAPLibrary.Utilities
+
+Resource json_templater.robot
+Resource common.robot
+
+*** Variables ***
+${DCAE_PATH} /dcae
+${DCAE_CREATE_BLUEPRINT_PATH} /SERVICE/createBluePrint
+${DCAE_VFCMT_TEMPLATE} ${ASSETS_DIR}create_vfcmt.template
+${DCAE_COMPOSITION_TEMPLATE} ${ASSETS_DIR}dcae_composition.template
+${DCAE_MONITORING_CONFIGURATION_TEMPLATE} ${ASSETS_DIR}dcae_monitoring_configuration.template
+${DCAE_BE_ENDPOINT} http://localhost:8082
+
+*** Keywords ***
+
+Add VFCMT To DCAE-DS
+ [Documentation] Create VFCMT with the given name and return its uuid
+ [Arguments] ${vfcmt_name}
+ ${map}= Create Dictionary vfcmtName=${vfcmt_name} description=VFCMT created by robot
+ ${data}= Fill JSON Template File ${DCAE_VFCMT_TEMPLATE} ${map}
+ ${resp}= Run DCAE-DS Post Request ${DCAE_PATH}/createVFCMT ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uuid']}
+
+Run DCAE-DS Post Request
+ [Documentation] Runs a DCAE-DS post request
+ [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_DCAE_BE_ENDPOINT}=${DCAE_BE_ENDPOINT}
+ Log Creating session ${MY_DCAE_BE_ENDPOINT}
+ ${session}= Create Session sdc_dcae_ds ${MY_DCAE_BE_ENDPOINT}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Post Request sdc_dcae_ds ${data_path} data=${data} headers=${headers}
+ Log Received response from DCAE-BE: ${resp.text}
+ [Return] ${resp}
+
+Run DCAE-DS Put Request
+ [Documentation] Runs a DCAE-DS put request
+ [Arguments] ${data_path} ${user}=${ASDC_DESIGNER_USER_ID} ${MY_DCAE_BE_ENDPOINT}=${DCAE_BE_ENDPOINT}
+ Log Creating session ${MY_DCAE_BE_ENDPOINT}
+ ${session}= Create Session sdc_dcae_ds ${MY_DCAE_BE_ENDPOINT}
+ ${uuid}= Generate UUID4
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json USER_ID=${user} X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID}
+ ${resp}= Put Request sdc_dcae_ds ${data_path} headers=${headers}
+ Log Received response from DCAE-BE: ${resp.text}
+ [Return] ${resp}
+
+Save Composition
+ [Arguments] ${vfcmt_uuid} ${vf_uuid}
+ ${map}= Create Dictionary cid=${vfcmt_uuid} vf_id=${vf_uuid}
+ ${data}= Fill JSON Template File ${DCAE_COMPOSITION_TEMPLATE} ${map}
+ ${resp}= Run DCAE-DS Post Request ${DCAE_PATH}/saveComposition/${vfcmt_uuid} ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+
+Certify VFCMT
+ [Arguments] ${vfcmt_uuid}
+ ${resp}= Run DCAE-DS Put Request ${DCAE_PATH}/certify/vfcmt/${vfcmt_uuid}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['uuid']}
+
+Add Monitoring Configuration To DCAE-DS
+ [Arguments] ${vfcmt_uuid} ${cs_uuid} ${vfi_name} ${mc_name}
+ ${map}= Create Dictionary template_uuid=${vfcmt_uuid} service_uuid=${cs_uuid} vfi_name=${vfi_name} name=${mc_name}
+ ${data}= Fill JSON Template File ${DCAE_MONITORING_CONFIGURATION_TEMPLATE} ${map}
+ ${resp}= Run DCAE-DS Post Request ${DCAE_PATH}/importMC ${data} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+ [Return] ${resp.json()['vfcmt']['uuid']}
+
+Submit Monitoring Configuration To DCAE-DS
+ [Arguments] ${mc_uuid} ${cs_uuid} ${vfi_name}
+ ${url_vfi_name} HTTPUtils.url_encode_string ${vfi_name}
+ ${resp}= Run DCAE-DS Post Request ${DCAE_PATH}${DCAE_CREATE_BLUEPRINT_PATH}/${mc_uuid}/${cs_uuid}/${url_vfi_name} ${None} ${ASDC_DESIGNER_USER_ID}
+ Should Be Equal As Strings ${resp.status_code} 200
+
diff --git a/tests/sdc/dcaed/json_templater.robot b/tests/sdc/dcaed/json_templater.robot
new file mode 100644
index 00000000..884c8f97
--- /dev/null
+++ b/tests/sdc/dcaed/json_templater.robot
@@ -0,0 +1,20 @@
+*** Settings ***
+Documentation This resource is filling out json string templates and returning the json back
+Library RequestsLibrary
+Library eteutils/StringTemplater.py
+Library OperatingSystem
+
+*** Keywords ***
+Fill JSON Template
+ [Documentation] Runs substitution on template to return a filled in json
+ [Arguments] ${json} ${arguments}
+ ${returned_string}= Template String ${json} ${arguments}
+ ${returned_json}= To Json ${returned_string}
+ [Return] ${returned_json}
+
+Fill JSON Template File
+ [Documentation] Runs substitution on template to return a filled in json
+ [Arguments] ${json_file} ${arguments}
+ ${json}= OperatingSystem.Get File ${json_file}
+ ${returned_json}= Fill JSON Template ${json} ${arguments}
+ [Return] ${returned_json}
diff --git a/tests/sdc/dcaed/monitoring_configuration_service_test.robot b/tests/sdc/dcaed/monitoring_configuration_service_test.robot
new file mode 100644
index 00000000..9a4bbc60
--- /dev/null
+++ b/tests/sdc/dcaed/monitoring_configuration_service_test.robot
@@ -0,0 +1,78 @@
+*** Settings ***
+Library ONAPLibrary.Utilities
+
+Resource asdc_interface.robot
+Resource dcaed_interface.robot
+
+*** Test Cases ***
+Create Service With Monitoring Configuration Test
+ [Tags] dcaed
+ [Documentation] Create a service with a monitoring configuration -
+ ... this test case implements the steps described in
+ ... https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC
+ ... excluding distribution of the service
+
+ ${unique_postfix}= Generate Unique Postfix
+ ${test_vf_name}= Set Variable TestVF_${unique_postfix}
+ ${test_cs_name}= Set Variable TestService_${unique_postfix}
+ ${test_vfcmt_name}= Set Variable TestVFCMT_${unique_postfix}
+ ${test_mc_name}= Set Variable TestMC_${unique_postfix}
+
+ ${cert_vf_unique_id} ${cert_vf_uuid} Onboard DCAE Microservice ${test_vf_name}
+ ${cert_vfcmt_uuid} Create Monitoring Template ${test_vfcmt_name} ${cert_vf_uuid}
+ ${cs_unique_id} Create Monitoring Configuration ${test_cs_name} ${cert_vf_unique_id} ${test_vf_name} ${cert_vfcmt_uuid} ${test_mc_name}
+ Approve Service ${cs_unique_id}
+
+*** Keywords ***
+Generate Unique Postfix
+ [Documentation] Create and return unique postfix to be used in various unique names
+ ${tmp_id} = Generate Timestamp
+ ${tmp_str} = Convert To String ${tmp_id}
+ [return] ${tmp_str}
+
+Onboard DCAE Microservice
+ [Documentation] Create DCAE Microservice with a given name, add Tosca artifacts to it and certify it
+ ... Return the unique_id and uuid of the certified VF
+ [Arguments] ${test_vf_name}
+ ${data}= asdc_interface.Create Catalog Resource Data ${test_vf_name} TestVendor
+ ${vf_unique_id}= asdc_interface.Post ASDC Resource Request Unauthenticated ${data}
+
+ asdc_interface.Add Tosca Artifact to Resource template ${vf_unique_id}
+ asdc_interface.Add Tosca Artifact to Resource translate ${vf_unique_id}
+ asdc_interface.Add Tosca Artifact to Resource schema ${vf_unique_id}
+
+ ${cert_vf_unique_id} ${cert_vf_uuid} asdc_interface.Certify ASDC Catalog Resource ${vf_unique_id} ${ASDC_DESIGNER_USER_ID}
+ [return] ${cert_vf_unique_id} ${cert_vf_uuid}
+
+Create Monitoring Template
+ [Documentation] Create a new monitoring template containing the DCAE VF, certify it and return the uuid
+ [Arguments] ${vfcmt_name} ${vf_uuid}
+ ${vfcmt_uuid} dcaed_interface.Add VFCMT To DCAE-DS ${vfcmt_name}
+ dcaed_interface.Save Composition ${vfcmt_uuid} ${vf_uuid}
+
+ # Note that certification is not instructed in
+ # https://wiki.onap.org/display/DW/How+to+Create+a+Service+with+a+Monitoring+Configuration+using+SDC
+ # due to limitations of GUI so this test case goes beyond the instructions at this certification step
+
+ ${cert_vfcmt_uuid} dcaed_interface.Certify VFCMT ${vfcmt_uuid}
+ [return] ${cert_vfcmt_uuid}
+
+Create Monitoring Configuration
+ [Documentation] Create a monitoring configuration for a given service based on a previously created VFCMT
+ ... Return the unique_id of the created catalog service for the monitoring configuration
+ [Arguments] ${service_name} ${vf_unique_id} ${vf_name} ${vfcmt_uuid} ${mc_name}
+ ${cs_unique_id} ${cs_uuid} asdc_interface.Add Catalog Service For Monitoring Template ${service_name}
+ ${vfi_uuid} ${vfi_name} asdc_interface.Add ASDC Resource Instance ${cs_unique_id} ${vf_unique_id} ${vf_name}
+ ${mc_uuid} dcaed_interface.Add Monitoring Configuration To DCAE-DS ${vfcmt_uuid} ${cs_uuid} ${vfi_name} ${mc_name}
+ dcaed_interface.Submit Monitoring Configuration To DCAE-DS ${mc_uuid} ${cs_uuid} ${vfi_name}
+ [return] ${cs_unique_id}
+
+Approve Service
+ [Documentation] Perform the required steps to certify and approve the given ASDC catalog service
+ [Arguments] ${cs_unique_id}
+ asdc_interface.Checkin ASDC Catalog Service ${cs_unique_id}
+ asdc_interface.Request Certify ASDC Catalog Service ${cs_unique_id}
+ asdc_interface.Start Certify ASDC Catalog Service ${cs_unique_id}
+ ${cert_cs_unique_id}= asdc_interface.Certify ASDC Catalog Service ${cs_unique_id}
+ asdc_interface.Approve ASDC Catalog Service ${cert_cs_unique_id}
+
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
index 84243cba..cac93f7f 100644
--- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot
@@ -19,7 +19,7 @@ ${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unaut
${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov
${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml"
${CLI_EXEC_CLI_DFC_LOG} docker exec dfc /bin/sh -c "cat /var/log/ONAP/application.log" > /tmp/dfc_docker.log.robot
-${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Publish to DR successful!" /tmp/dfc_docker.log.robot
+${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" /tmp/dfc_docker.log.robot
${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}
${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/metadata.json
${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper_docker.log.robot
@@ -71,7 +71,7 @@ Verify Data File Collector successfully publishes the PM XML file to the Data Ro
${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} Publish to DR successful!
+ Should Contain ${cli_cmd_output.stdout} Datafile file published
Verify Default Feed And File Consumer Subscription On Datarouter
diff --git a/tests/vid/resources/docker-compose.yml b/tests/vid/resources/docker-compose.yml
index 6bd0c138..6aaa5a7e 100644
--- a/tests/vid/resources/docker-compose.yml
+++ b/tests/vid/resources/docker-compose.yml
@@ -1,7 +1,7 @@
version: '3'
services:
vid-server:
- image: nexus3.onap.org:10001/onap/vid:4.3-STAGING-latest
+ image: nexus3.onap.org:10001/onap/vid:5.0-STAGING-latest
environment:
- VID_MYSQL_DBNAME=vid_openecomp_epsdk
- VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U