--- /dev/null
+streams_publishes:
+ perf3gpp:
+ aaf_credentials:
+ password: admin_secret
+ username: admin
+ kafka_info:
+ bootstrap_servers: kafka:9092
+ topic_name: TEST_HV_VES_PERF3GPP
+ type: kafka
+ ves-3gpp-heartbeat:
+ aaf_credentials:
+ password: admin_secret
+ username: admin
+ kafka_info:
+ bootstrap_servers: kafka:9092
+ topic_name: TEST_SEC_3GPP_HEARTBEAT_OUTPUT
+ type: kafka
networks:
- hv-ves-default
- #
- # Consul / CBS
- #
-
- consul-server:
- image: docker.io/consul:1.0.6
- ports:
- - "8500:8500"
- volumes:
- - ./consul/:/consul/config
- networks:
- - hv-ves-default
-
- config-binding-service:
- image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.5.2
- ports:
- - "10000:10000"
- environment:
- - CONSUL_HOST
- depends_on:
- - consul-server
- networks:
- - hv-ves-default
-
#
# DCAE HV VES Collector
#
- CONSUL_HOST
- CONFIG_BINDING_SERVICE
- CONFIG_BINDING_SERVICE_SERVICE_PORT
+ - CBS_CLIENT_CONFIG_PATH
healthcheck:
interval: 10s
timeout: 5s
volumes:
- ./collector/:/etc/ves-hv/
depends_on:
- - config-binding-service
- kafka
networks:
- hv-ves-default
- CONSUL_HOST
- CONFIG_BINDING_SERVICE
- CONFIG_BINDING_SERVICE_SERVICE_PORT
+ - CBS_CLIENT_CONFIG_PATH
healthcheck:
interval: 10s
timeout: 5s
volumes:
- ./collector/:/etc/ves-hv/
depends_on:
- - config-binding-service
- kafka
networks:
- hv-ves-default
export CONSUL_HOST="consul-server"
export CONFIG_BINDING_SERVICE="config-binding-service"
export CONFIG_BINDING_SERVICE_SERVICE_PORT="10000"
+export CBS_CLIENT_CONFIG_PATH=/etc/ves-hv/configuration/hv-ves-configuration.yaml
export ONAP_NEXUS_REGISTRY="nexus3.onap.org:10001"
export DOCKER_REGISTRY=${ONAP_NEXUS_REGISTRY}
export CONSUL_HOST="consul-server"
export CONFIG_BINDING_SERVICE="config-binding-service"
export CONFIG_BINDING_SERVICE_SERVICE_PORT="10000"
+export CBS_CLIENT_CONFIG_PATH=/etc/ves-hv/configuration/hv-ves-configuration.yaml
export ONAP_NEXUS_REGISTRY="nexus3.onap.org:10001"
export DOCKER_REGISTRY=${ONAP_NEXUS_REGISTRY}
*** Settings ***
Library DcaeAppSimulatorLibrary
-Library ConsulLibrary
Library VesHvContainersUtilsLibrary
+Resource resources/common-keywords.robot
+
Suite Setup HV-VES Collector Suites Setup
*** Keywords ***
Configure collector
- ${CONSUL_API_ACCESS}= Get Consul Api Access Url ${HTTP_METHOD_URL} ${CONSUL_CONTAINER_HOST} ${CONSUL_CONTAINER_PORT}
- ${CONSUL_API_URL}= Catenate SEPARATOR= ${CONSUL_API_ACCESS} ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH}
- Set Suite Variable ${CONSUL_API_URL} children=True
- Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${HV_VES_CONFIGURATION_JSON_FILEPATH}
+ Set New Mounted Configuration ${HV_VES_CONFIGURATION_JSON_FILEPATH}
Configure Dcae App
Wait until keyword succeeds 10 sec 5 sec
${DEFAULT_STNDDEFINED_3GPP_HEARTBEAT_TOPIC} TEST_SEC_3GPP_HEARTBEAT_OUTPUT
${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
-${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json
+${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.yaml
*** Settings ***
Library DcaeAppSimulatorLibrary
-Library ConsulLibrary
Library BuiltIn
Resource resources/common-keywords.robot
Change Configuration
[Arguments] ${CONFIGURATION_JSON_FILEPATH} ${MESSAGES_TOPIC}
- Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${CONFIGURATION_JSON_FILEPATH}
+ Set New Mounted Configuration ${CONFIGURATION_JSON_FILEPATH}
# Assure configuration fetch in hv-ves
Sleep 10
${XNF_VALID_MESSAGES_REQUEST} ${HV_VES_SCENARIOS}/configuration-change/xnf-valid-messages-request.json
${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources
-${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json
-${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration-with-different-topic.json
+${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.yaml
+${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration-with-different-topic.yaml
+++ /dev/null
-# ============LICENSE_START=======================================================
-# csit-dcaegen2-collectors-hv-ves
-# ================================================================================
-# Copyright (C) 2018 NOKIA
-# ================================================================================
-# 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=========================================================
-from robot.api import logger
-import HttpRequests
-
-CONSUL_NAME = "Consul"
-
-class ConsulLibrary:
-
- def publish_hv_ves_configuration_in_consul(self, consul_url, consul_configuration_filepath):
- logger.info("Reading consul configuration file from: " + consul_configuration_filepath)
- file = open(consul_configuration_filepath, "rb")
- data = file.read()
- file.close()
-
- logger.info("PUT at: " + consul_url)
- resp = HttpRequests.session_without_env().put(consul_url, data=data, timeout=5)
- HttpRequests.checkStatusCode(resp.status_code, CONSUL_NAME)
\ No newline at end of file
Library KafkaLibrary
Library Collections
+Library OperatingSystem
+
*** Keywords ***
Configure Single xNF Simulator
${XNF_PORTS_LIST}= Create List 7000
Log Kafka Status
Stop And Remove All Xnf Simulators ${SUITE NAME}
+Set New Mounted Configuration
+ [Arguments] ${NEW_CONFIGURATION_FILE_PATH}
+ Copy File ${NEW_CONFIGURATION_FILE_PATH} ${HV_VES_MOUNTED_CONFIGURATION_FILE_PATH}
+
*** Variables ***
${HTTP_METHOD_URL} http://
${XNF_SIM_API_PATH} /simulator/async
+${HV_VES_MOUNTED_CONFIGURATION_FILE_PATH} %{WORKSPACE}/plans/dcaegen2-collectors-hv-ves/testsuites/collector/configuration/hv-ves-configuration.yaml
+++ /dev/null
-{
- "streams_publishes": {
- "perf3gpp": {
- "type": "kafka",
- "aaf_credentials": {
- "username": "admin",
- "password": "admin_secret"
- },
- "kafka_info": {
- "bootstrap_servers": "kafka:9092",
- "topic_name": "TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS"
- }
- }
- }
-}
-
--- /dev/null
+streams_publishes:
+ perf3gpp:
+ aaf_credentials:
+ password: admin_secret
+ username: admin
+ kafka_info:
+ bootstrap_servers: kafka:9092
+ topic_name: TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS
+ type: kafka
+++ /dev/null
-{
- "streams_publishes": {
- "perf3gpp": {
- "type": "kafka",
- "aaf_credentials": {
- "username": "admin",
- "password": "admin_secret"
- },
- "kafka_info": {
- "bootstrap_servers": "kafka:9092",
- "topic_name": "TEST_HV_VES_PERF3GPP"
- }
- },
- "ves-3gpp-heartbeat": {
- "type": "kafka",
- "aaf_credentials": {
- "username": "admin",
- "password": "admin_secret"
- },
- "kafka_info": {
- "bootstrap_servers": "kafka:9092",
- "topic_name": "TEST_SEC_3GPP_HEARTBEAT_OUTPUT"
- }
- }
- }
-}
-
--- /dev/null
+streams_publishes:
+ perf3gpp:
+ aaf_credentials:
+ password: admin_secret
+ username: admin
+ kafka_info:
+ bootstrap_servers: kafka:9092
+ topic_name: TEST_HV_VES_PERF3GPP
+ type: kafka
+ ves-3gpp-heartbeat:
+ aaf_credentials:
+ password: admin_secret
+ username: admin
+ kafka_info:
+ bootstrap_servers: kafka:9092
+ topic_name: TEST_SEC_3GPP_HEARTBEAT_OUTPUT
+ type: kafka