*.pyc
/bin/
+/venv/*
+
+/tests/aaf/certservice/tmp/*
+/tests/oom-platform-cert-service/postprocessor/tmp/*
project_creation_date: '2017-02-10'
lifecycle_state: 'Incubation'
project_category: ''
-project_lead: &onap_releng_ptl
+project_lead: &onap_csit_ptl
name: 'Morgan Richomme'
email: 'morgan.richomme@orange.com'
id: 'mrichomme'
company: 'Orange'
timezone: 'France/Paris'
-primary_contact: *onap_releng_ptl
+primary_contact: *onap_csit_ptl
issue_tracking:
type: 'jira'
url: 'https://jira.onap.org/projects/INT'
repositories:
- 'integration/csit'
committers:
- - <<: *onap_releng_ptl
+ - <<: *onap_csit_ptl
- name: 'Christophe Closset'
email: 'cc697w@intl.att.com'
company: 'ATT'
company: 'nokia'
id: 'mprzybys'
timezone: 'Poland/Warsaw'
- - name: 'Eric Multanen'
- email: 'eric.w.multanen@intel.com'
- company: 'intel'
- id: 'ewmulta'
- timezone: 'America/Los_Angeles'
- - <<: *onap_releng_ptl
- - name: 'Christophe Closset'
- email: 'cc697w@intl.att.com'
- company: 'ATT'
- id: 'ChrisC'
- timezone: 'Belgium/Namur'
- - name: 'Daniel Rose'
- email: 'DR695H@att.com'
- company: 'ATT'
- id: 'DR695H'
- timezone: 'America/New_York'
- name: 'Krzysztof Kuzmicki'
email: 'krzysztof.kuzmicki@nokia.com'
company: 'nokia'
company: 'Deutsche Telekom'
id: 'andreasgeissler'
timezone: 'Europe/Berlin'
+ - name: 'Michal Jagiello'
+ email: 'Michal.Jagiello@t-mobile.pl'
+ company: 'T-Mobile'
+ id: 'MichalJagielloTMPL'
+ timezone: 'Europe/Warsaw'
+ - name: 'Lukasz Rajewski'
+ email: 'lukasz.rajewski@orange.com'
+ company: 'Orange'
+ id: 'rajewluk'
+ timezone: 'Europe/Warsaw'
+ - name: 'Thierry Hardy'
+ email: 'thierry.hardy@orange.com'
+ company: 'orange'
+ id: 'jardellos'
+ timezone: 'Europe/Paris'
tsc:
# yamllint disable rule:line-length
approval: 'https://lists.onap.org/pipermail/onap-tsc'
- type: 'Addition'
name: 'Andreas Geissler'
link: 'https://lists.onap.org/g/onap-tsc/topic/onap_integration_committer/73303461'
+ - type: 'Addition'
+ name: 'Michal Jagiello'
+ link: 'https://lists.onap.org/g/onap-tsc/message/7102'
+ - type: 'Addition'
+ name: 'Lukasz Rajewski'
+ link: 'https://lists.onap.org/g/onap-tsc/message/7102'
+ - type: 'Addition'
+ name: 'Thierry Hardy'
+ link: 'https://lists.onap.org/g/onap-tsc/message/7102'
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+#
+
+
+TC_ONELINE_DESCR="Sanity test, create service and then create,update and delete a policy using http/https and Agent REST/DMAAP with/without SDNC controller"
+
+#App names to include in the test, space separated list
+INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC"
+
+. ../common/testcase_common.sh $@
+. ../common/agent_api_functions.sh
+. ../common/ricsimulator_api_functions.sh
+
+#### TEST BEGIN ####
+
+
+generate_uuid
+
+# Tested variants of REST/DMAAP/SDNC config
+TESTED_VARIANTS="REST DMAAP"
+#Test agent and simulator protocol versions (others are http only)
+TESTED_PROTOCOLS="HTTP HTTPS"
+
+for __httpx in $TESTED_PROTOCOLS ; do
+ for interface in $TESTED_VARIANTS ; do
+
+ echo "#####################################################################"
+ echo "#####################################################################"
+ echo "### Testing agent: $interface using $__httpx"
+ echo "#####################################################################"
+ echo "#####################################################################"
+
+ #Local vars in test script
+ ##########################
+
+ if [ $__httpx == "HTTPS" ]; then
+ # Path to callback receiver
+ CR_PATH="https://$CR_APP_NAME:$CR_EXTERNAL_SECURE_PORT/callbacks"
+ use_cr_https
+ else
+ # Path to callback receiver
+ CR_PATH="http://$CR_APP_NAME:$CR_EXTERNAL_PORT/callbacks"
+ use_cr_http
+ fi
+
+ # Clean container and start all needed containers #
+ clean_containers
+
+ if [ $__httpx == "HTTPS" ]; then
+ #"Using secure ports towards simulators"
+ use_simulator_https
+ else
+ #"Using non-secure ports towards simulators"
+ use_simulator_http
+ fi
+
+ start_ric_simulators ricsim_g1 1 OSC_2.1.0
+ start_ric_simulators ricsim_g2 1 STD_1.1.3
+
+ start_mr
+
+ if [ $__httpx == "HTTPS" ]; then
+ #echo "Using secure ports between agent and MR"
+ use_mr_https
+ else
+ #"Using non-secure ports between agent and MR"
+ use_mr_http
+ fi
+
+ start_cr
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+
+ start_sdnc
+
+ if [ $__httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_sdnc_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_sdnc_http
+ fi
+ fi
+
+ start_consul_cbs
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+ prepare_consul_config SDNC ".consul_config.json"
+ else
+ prepare_consul_config NOSDNC ".consul_config.json"
+ fi
+
+ consul_config_app ".consul_config.json"
+
+ start_control_panel
+
+ start_policy_agent
+
+ set_agent_debug
+
+ if [ $interface == "DMAAP" ] || [ $interface == "DMAAP+SDNC" ]; then
+ if [ $__httpx == "HTTPS" ]; then
+ echo "Using secure ports towards dmaap"
+ use_agent_dmaap_https
+ else
+ echo "Using non-secure ports towards dmaap"
+ use_agent_dmaap_http
+ fi
+ else
+ if [ $__httpx == "HTTPS" ]; then
+ echo "Using secure ports towards the agent"
+ use_agent_rest_https
+ else
+ echo "Using non-secure ports towards the agent"
+ use_agent_rest_http
+ fi
+ fi
+
+
+ cr_equal received_callbacks 0
+ mr_equal requests_submitted 0
+
+ sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+ api_equal json:rics 2 60
+
+ api_equal json:policy_schemas 2 120
+
+ api_equal json:policy_types 2
+
+ api_equal json:policies 0
+
+ api_equal json:policy_ids 0
+
+ echo "############################################"
+ echo "############## Health check ################"
+ echo "############################################"
+
+ api_get_status 200
+
+ echo "############################################"
+ echo "##### Service registry and supervision #####"
+ echo "############################################"
+
+ api_put_service 201 "serv1" 1000 "$CR_PATH/1"
+
+ api_get_service_ids 200 "serv1"
+
+ api_put_services_keepalive 200 "serv1"
+
+ echo "############################################"
+ echo "############## RIC Repository ##############"
+ echo "############################################"
+
+ api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1:AVAILABLE ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
+
+ echo "############################################"
+ echo "########### A1 Policy Management ###########"
+ echo "############################################"
+
+ api_put_policy 201 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
+ api_put_policy 200 "serv1" ricsim_g1_1 1 5000 NOTRANSIENT testdata/OSC/pi1_template.json
+
+ api_put_policy 201 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
+ api_put_policy 200 "serv1" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT testdata/STD/pi1_template.json
+
+ api_delete_policy 204 5000
+
+ api_delete_policy 204 5100
+
+ api_equal json:policies 0
+
+ api_equal json:policy_ids 0
+
+ cr_equal received_callbacks 0
+
+ if [ $interface == "DMAAP" ] || [ $interface == "DMAAP+SDNC" ]; then
+ VAL=11 # Number of Agent API calls over DMAAP
+ mr_equal requests_fetched $VAL
+ mr_equal responses_submitted $VAL
+ mr_equal responses_fetched $VAL
+ mr_equal current_requests 0
+ mr_equal current_responses 0
+ else
+ mr_equal requests_submitted 0
+ fi
+
+ if [ $interface == "REST+SDNC" ] || [ $interface == "DMAAP+SDNC" ]; then
+ sim_contains_str ricsim_g1_1 remote_hosts "a1-controller"
+ sim_contains_str ricsim_g2_1 remote_hosts "a1-controller"
+ else
+ sim_contains_str ricsim_g1_1 remote_hosts "policy-agent"
+ sim_contains_str ricsim_g2_1 remote_hosts "policy-agent"
+ fi
+
+ check_policy_agent_logs
+ check_control_panel_logs
+
+ store_logs "${__httpx}__${interface}"
+
+ done
+
+done
+
+#### TEST COMPLETE ####
+
+
+print_result
+
+auto_clean_containers
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+#
+
+
+TC_ONELINE_DESCR="Sample tests of the SDNC A1 controller restconf API using http/https (no agent)"
+
+#App names to include in the test, space separated list
+INCLUDED_IMAGES="RICSIM SDNC"
+
+. ../common/testcase_common.sh $@
+. ../common/controller_api_functions.sh
+. ../common/ricsimulator_api_functions.sh
+
+#### TEST BEGIN ####
+
+generate_uuid
+
+#Test agent and simulator protocol versions (others are http only)
+NB_TESTED_PROTOCOLS="HTTP HTTPS"
+SB_TESTED_PROTOCOLS="HTTP HTTPS"
+
+for __nb_httpx in $NB_TESTED_PROTOCOLS ; do
+ for __sb_httpx in $SB_TESTED_PROTOCOLS ; do
+
+ echo "#####################################################################"
+ echo "#####################################################################"
+ echo "### Testing SDNC using Northbound: $__nb_httpx and Southbound: $__sb_httpx"
+ echo "#####################################################################"
+ echo "#####################################################################"
+
+
+ # Clean container and start all needed containers #
+ clean_containers
+
+ start_ric_simulators ricsim_g1 1 OSC_2.1.0
+ start_ric_simulators ricsim_g2 1 STD_1.1.3
+
+ start_sdnc
+
+ if [ $__nb_httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_sdnc_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_sdnc_http
+ fi
+
+ if [ $__sb_httpx == "HTTPS" ]; then
+ # "Using secure ports towards SDNC"
+ use_simulator_https
+ else
+ #"Using non-secure ports towards SDNC"
+ use_simulator_http
+ fi
+
+ # API tests
+
+ controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 1
+
+ sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
+
+
+ controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1
+ controller_api_get_A1_policy_ids 200 STD ricsim_g2_1
+
+ controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1
+ controller_api_get_A1_policy_type 200 OSC ricsim_g1_1 1 testdata/OSC/sim_1.json
+ controller_api_get_A1_policy_type 404 OSC ricsim_g1_1 99
+
+ controller_api_put_A1_policy 200 OSC ricsim_g1_1 1 4000 testdata/OSC/pi1_template.json
+ controller_api_put_A1_policy 404 OSC ricsim_g1_1 5 1001 testdata/OSC/pi1_template.json
+ controller_api_put_A1_policy 200 STD ricsim_g2_1 5000 testdata/STD/pi1_template.json
+
+ controller_api_get_A1_policy_ids 200 OSC ricsim_g1_1 1 4000
+ controller_api_get_A1_policy_ids 200 STD ricsim_g2_1 5000
+
+ controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000
+ controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000
+
+ VAL='NOT IN EFFECT'
+ controller_api_get_A1_policy_status 200 OSC ricsim_g1_1 1 4000 "$VAL" "false"
+ controller_api_get_A1_policy_status 200 STD ricsim_g2_1 5000 "UNDEFINED"
+
+ controller_api_delete_A1_policy 200 OSC ricsim_g1_1 1 4000
+ controller_api_delete_A1_policy 200 STD ricsim_g2_1 5000
+
+ store_logs "NB_"$__nb_httpx"_SB_"$__sb_httpx
+
+ done
+
+done
+
+#### TEST COMPLETE ####
+
+print_result
+
+auto_clean_containers
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+
+
+cd $WORKSPACE/archives
+
+git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
+
+AUTOTEST_ROOT=$WORKSPACE/archives/nonrtric/test/auto-test
+POLMAN_PLANS=$WORKSPACE/plans/ccsdk-oran/polmansuite
+
+#Copy test script, adapted to ONAP images
+cp $POLMAN_PLANS/FTC1.sh $WORKSPACE/archives/nonrtric/test/auto-test/FTC1.sh
+cp $POLMAN_PLANS/FTC150.sh $WORKSPACE/archives/nonrtric/test/auto-test/FTC150.sh
+
+TEST_ENV=$POLMAN_PLANS/test_env-${GERRIT_BRANCH}.sh
+
+#Make the env vars availble to the robot scripts
+ROBOT_VARIABLES="-b debug.log -v AUTOTEST_ROOT:${AUTOTEST_ROOT} -v TEST_ENV:${TEST_ENV}"
+
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+
+# All started containers stopped and removed by the test case
+
+
+# Fix ownership. Mounted resources to consul changes ownership which prevents csit test cleanup
+cd $WORKSPACE/archives/nonrtric/test/simulator-group/
+sudo chown $(id -u):$(id -g) consul_cbs
+sudo chown $(id -u):$(id -g) consul_cbs/consul
+
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+#
+
+# Set up the image and tags for the test. Do not add the image tag to the image names.
+
+# NOTE: A env var for each container is created by the test script.
+# This var will point to the local or remote var depending on how
+# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
+
+# Tag for guilin branch
+# Remote Policy Agent image and tag
+POLICY_AGENT_REMOTE_IMAGE="nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_REMOTE_IMAGE_TAG="1.0.1-SNAPSHOT"
+
+
+# Control Panel remote image and tag
+CONTROL_PANEL_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_REMOTE_IMAGE_TAG="2.0.0"
+
+# Tag for guilin branch
+# SDNC A1 Controller remote image and tag
+SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
+SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.0.2-STAGING-latest"
+
+
+#SDNC DB remote image and tag
+SDNC_DB_REMOTE_IMAGE="mysql/mysql-server"
+SDNC_DB_REMOTE_IMAGE_TAG="5.6"
+#No local image for DB, remote image always used
+
+
+# Near RT RIC Simulator remote image and tag
+RIC_SIM_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
+RIC_SIM_REMOTE_IMAGE_TAG="2.0.0"
+
+
+#Consul remote image and tag
+CONSUL_REMOTE_IMAGE="consul"
+CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_REMOTE_IMAGE_TAG="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_LOCAL_IMAGE="mrstub"
+MRSTUB_LOCAL_IMAGE_TAG="latest"
+#No remote image for MR stub, local image always used
+
+#Callback receiver image and tag
+CR_LOCAL_IMAGE="callback-receiver"
+CR_LOCAL_IMAGE_TAG="latest"
+#No remote image for CR, local image always used
+
+# Common env var for auto-test. Vars used by docker-compose need to be exported
+export DOCKER_SIM_NWNAME="nonrtric-docker-net" # Name of docker private network
+
+export POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container)
+export POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container)
+export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container)
+export POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container)
+
+export POLICY_AGENT_APP_NAME="policy-agent" # Name for Policy Agent container
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
+export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel
+
+export MR_EXTERNAL_PORT=3905 # MR stub container external port (host -> container)
+export MR_INTERNAL_PORT=3905 # MR stub container internal port (container -> container)
+export MR_EXTERNAL_SECURE_PORT=3906 # MR stub container external secure port (host -> container)
+export MR_INTERNAL_SECURE_PORT=3906 # MR stub container internal secure port (container -> container)
+export MR_APP_NAME="message-router" # Name for the MR
+export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
+
+export CR_EXTERNAL_PORT=8090 # Callback receiver container external port (host -> container)
+export CR_INTERNAL_PORT=8090 # Callback receiver container internal port (container -> container)
+export CR_EXTERNAL_SECURE_PORT=8091 # Callback receiver container external secure port (host -> container)
+export CR_INTERNAL_SECURE_PORT=8091 # Callback receiver container internal secure port (container -> container)
+export CR_APP_NAME="callback-receiver" # Name for the Callback receiver
+
+export CONSUL_HOST="consul-server" # Host name of consul
+export CONSUL_EXTERNAL_PORT=8500 # Consul container external port (host -> container)
+export CONSUL_INTERNAL_PORT=8500 # Consul container internal port (container -> container)
+export CONSUL_APP_NAME="polman-consul" # Name for consul container
+
+export CBS_APP_NAME="polman-cbs" # Name for CBS container
+export CBS_EXTERNAL_PORT=10000 # CBS container external port (host -> container)
+export CBS_INTERNAL_PORT=10000 # CBS container internal port (container -> container)
+export CONFIG_BINDING_SERVICE="config-binding-service" # Host name of CBS
+
+export RIC_SIM_BASE="g" # Base name of the RIC Simulator container, shall be the group code
+ # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RIC_SIM_PREFIX="ricsim" # Prefix added to ric container name, added in the .env file in the 'ric' dir
+ # This prefix can be changed from the command line
+export RIC_SIM_INTERNAL_PORT=8085 # RIC Simulator container internal port (container -> container).
+ # (external ports allocated by docker)
+export RIC_SIM_INTERNAL_SECURE_PORT=8185 # RIC Simulator container internal secure port (container -> container).
+ # (external ports allocated by docker)
+
+export SDNC_APP_NAME="a1-controller" # Name of the SNDC A1 Controller container
+export SDNC_EXTERNAL_PORT=8282 # SNDC A1 Controller container external port (host -> container)
+export SDNC_INTERNAL_PORT=8181 # SNDC A1 Controller container internal port (container -> container)
+export SDNC_EXTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container external securee port (host -> container)
+export SDNC_INTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container internal secure port (container -> container)
+export SDNC_DB_APP_NAME="sdnc-db" # Name of the SDNC DB container
+export SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter" # SDNC truststore password
+SDNC_USER="admin" # SDNC username
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" # SNDC PWD
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:" # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/" # Base url path for SNDC API docs (for alive check)
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log" # Path to karaf log
+
+
+export CONTROL_PANEL_APP_NAME="control-panel" # Name of the Control Panel container
+export CONTROL_PANEL_EXTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+export CONTROL_PANEL_INTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log" # Path the application log in the Control Panel container
+
+UUID="" # UUID used as prefix to the policy id to simulate a real UUID
+ # Testscript need to set the UUID to use other this empty prefix is used
+
+RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT # Base url to the Agent NB REST interface
+RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
+DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT # Base url to the Dmaap adapter, http
+DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT # Base url to the Dmaap adapter, https
+ADAPTER=$RESTBASE # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
+ # The values of this var is swiched between the two base url when needed
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+#
+
+# Set up the image and tags for the test. Do not add the image tag to the image names.
+
+# NOTE: A env var for each container is created by the test script.
+# This var will point to the local or remote var depending on how
+# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
+
+
+# Remote Policy Agent image and tag
+POLICY_AGENT_REMOTE_IMAGE="nexus3.onap.org:10003/onap/ccsdk-oran-a1policymanagementservice"
+POLICY_AGENT_REMOTE_IMAGE_TAG="1.1.0-SNAPSHOT"
+
+
+# Control Panel remote image and tag
+CONTROL_PANEL_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel"
+CONTROL_PANEL_REMOTE_IMAGE_TAG="2.0.0"
+
+
+# SDNC A1 Controller remote image and tag
+SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
+SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.1.0-STAGING-latest"
+
+
+#SDNC DB remote image and tag
+SDNC_DB_REMOTE_IMAGE="mysql/mysql-server"
+SDNC_DB_REMOTE_IMAGE_TAG="5.6"
+#No local image for DB, remote image always used
+
+
+# Near RT RIC Simulator remote image and tag
+RIC_SIM_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
+RIC_SIM_REMOTE_IMAGE_TAG="2.0.0"
+
+
+#Consul remote image and tag
+CONSUL_REMOTE_IMAGE="consul"
+CONSUL_REMOTE_IMAGE_TAG="1.7.2"
+#No local image for Consul, remote image always used
+
+
+#CBS remote image and tag
+CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
+CBS_REMOTE_IMAGE_TAG="2.3.0"
+#No local image for CBS, remote image always used
+
+
+#MR stub image and tag
+MRSTUB_LOCAL_IMAGE="mrstub"
+MRSTUB_LOCAL_IMAGE_TAG="latest"
+#No remote image for MR stub, local image always used
+
+#Callback receiver image and tag
+CR_LOCAL_IMAGE="callback-receiver"
+CR_LOCAL_IMAGE_TAG="latest"
+#No remote image for CR, local image always used
+
+# Common env var for auto-test. Vars used by docker-compose need to be exported
+export DOCKER_SIM_NWNAME="nonrtric-docker-net" # Name of docker private network
+
+export POLICY_AGENT_EXTERNAL_PORT=8081 # Policy Agent container external port (host -> container)
+export POLICY_AGENT_INTERNAL_PORT=8081 # Policy Agent container internal port (container -> container)
+export POLICY_AGENT_EXTERNAL_SECURE_PORT=8433 # Policy Agent container external secure port (host -> container)
+export POLICY_AGENT_INTERNAL_SECURE_PORT=8433 # Policy Agent container internal secure port (container -> container)
+
+export POLICY_AGENT_APP_NAME="policy-agent" # Name for Policy Agent container
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" # Path the application log in the Policy Agent container
+export POLICY_AGENT_APP_NAME_ALIAS="policy-agent-container" # Alias name, name used by the control panel
+
+export MR_EXTERNAL_PORT=3905 # MR stub container external port (host -> container)
+export MR_INTERNAL_PORT=3905 # MR stub container internal port (container -> container)
+export MR_EXTERNAL_SECURE_PORT=3906 # MR stub container external secure port (host -> container)
+export MR_INTERNAL_SECURE_PORT=3906 # MR stub container internal secure port (container -> container)
+export MR_APP_NAME="message-router" # Name for the MR
+export MR_READ_URL="/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100" # Path to read messages from MR
+export MR_WRITE_URL="/events/A1-POLICY-AGENT-WRITE" # Path write messages to MR
+
+export CR_EXTERNAL_PORT=8090 # Callback receiver container external port (host -> container)
+export CR_INTERNAL_PORT=8090 # Callback receiver container internal port (container -> container)
+export CR_EXTERNAL_SECURE_PORT=8091 # Callback receiver container external secure port (host -> container)
+export CR_INTERNAL_SECURE_PORT=8091 # Callback receiver container internal secure port (container -> container)
+export CR_APP_NAME="callback-receiver" # Name for the Callback receiver
+
+export CONSUL_HOST="consul-server" # Host name of consul
+export CONSUL_EXTERNAL_PORT=8500 # Consul container external port (host -> container)
+export CONSUL_INTERNAL_PORT=8500 # Consul container internal port (container -> container)
+export CONSUL_APP_NAME="polman-consul" # Name for consul container
+
+export CBS_APP_NAME="polman-cbs" # Name for CBS container
+export CBS_EXTERNAL_PORT=10000 # CBS container external port (host -> container)
+export CBS_INTERNAL_PORT=10000 # CBS container internal port (container -> container)
+export CONFIG_BINDING_SERVICE="config-binding-service" # Host name of CBS
+
+export RIC_SIM_BASE="g" # Base name of the RIC Simulator container, shall be the group code
+ # Note, a prefix is added to each container name by the .env file in the 'ric' dir
+RIC_SIM_PREFIX="ricsim" # Prefix added to ric container name, added in the .env file in the 'ric' dir
+ # This prefix can be changed from the command line
+export RIC_SIM_INTERNAL_PORT=8085 # RIC Simulator container internal port (container -> container).
+ # (external ports allocated by docker)
+export RIC_SIM_INTERNAL_SECURE_PORT=8185 # RIC Simulator container internal secure port (container -> container).
+ # (external ports allocated by docker)
+
+export SDNC_APP_NAME="a1-controller" # Name of the SNDC A1 Controller container
+export SDNC_EXTERNAL_PORT=8282 # SNDC A1 Controller container external port (host -> container)
+export SDNC_INTERNAL_PORT=8181 # SNDC A1 Controller container internal port (container -> container)
+export SDNC_EXTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container external securee port (host -> container)
+export SDNC_INTERNAL_SECURE_PORT=8443 # SNDC A1 Controller container internal secure port (container -> container)
+export SDNC_DB_APP_NAME="sdnc-db" # Name of the SDNC DB container
+export SDNC_A1_TRUSTSTORE_PASSWORD="a1adapter" # SDNC truststore password
+SDNC_USER="admin" # SDNC username
+SDNC_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" # SNDC PWD
+SDNC_API_URL="/restconf/operations/A1-ADAPTER-API:" # Base url path for SNDC API
+SDNC_ALIVE_URL="/apidoc/explorer/" # Base url path for SNDC API docs (for alive check)
+SDNC_KARAF_LOG="/opt/opendaylight/data/log/karaf.log" # Path to karaf log
+
+
+export CONTROL_PANEL_APP_NAME="control-panel" # Name of the Control Panel container
+export CONTROL_PANEL_EXTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+export CONTROL_PANEL_INTERNAL_PORT=8080 # Control Panel container external port (host -> container)
+CONTROL_PANEL_LOGPATH="/logs/nonrtric-controlpanel.log" # Path the application log in the Control Panel container
+
+UUID="" # UUID used as prefix to the policy id to simulate a real UUID
+ # Testscript need to set the UUID to use other this empty prefix is used
+
+RESTBASE="http://localhost:"$POLICY_AGENT_EXTERNAL_PORT # Base url to the Agent NB REST interface
+RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base url to the secure Agent NB REST interface
+DMAAPBASE="http://localhost:"$MR_EXTERNAL_PORT # Base url to the Dmaap adapter, http
+DMAAPBASE_SECURE="https://localhost:"$MR_EXTERNAL_SECURE_PORT # Base url to the Dmaap adapter, https
+ADAPTER=$RESTBASE # Adapter holds the address the agent R-APP interface (REST OR DMAAP)
+ # The values of this var is swiched between the two base url when needed
--- /dev/null
+#!/bin/bash
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2020 Nordix Foundation. 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=================================================
+
+
+# Test suites are relative paths under [integration/csit.git]/tests/.
+# Place the suites in run order.
+# Temporary change to trigger verify job.
+ccsdk-oran/polmansuite
+
# limitations under the License.
#
# Modifications copyright (c) 2017 AT&T Intellectual Property
+# Modifications copyright (c) 2020 Samsung Electronics Co., Ltd.
#
# Place the scripts in run order:
-SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-source ${WORKSPACE}/scripts/ccsdk/script1.sh
-
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
export NEXUS_DOCKER_REPO="nexus3.onap.org:10001"
export NEXUS_USERNAME=docker
export NEXUS_PASSWD=docker
export DMAAP_TOPIC=AUTO
-export CCSDK_DOCKER_IMAGE_VERSION=0.6-STAGING-latest
+export CCSDK_DOCKER_IMAGE_VERSION=1.1-STAGING-latest
if [ "$MTU" == "" ]; then
export MTU="1450"
fi
-
# Clone CCSDK repo to get docker-compose for CCSDK
mkdir -p $WORKSPACE/archives/ccsdk
cd $WORKSPACE/archives
docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-alpine-image:$CCSDK_DOCKER_IMAGE_VERSION
-docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-alpine-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-odlsli-alpine-image:0.4-STAGING-latest
docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION
-docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-dgbuilder-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-dgbuilder-image:0.4-STAGING-latest
-
-docker pull $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-image:$CCSDK_DOCKER_IMAGE_VERSION
-docker tag $NEXUS_DOCKER_REPO/onap/ccsdk-odlsli-image:$CCSDK_DOCKER_IMAGE_VERSION onap/ccsdk-odlsli-image:0.4-STAGING-latest
# start CCSDK containers with docker compose and configuration from docker-compose.yml
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
./docker-compose up -d
-# WAIT 5 minutes maximum and test every 5 seconds if CCSDK is up using HealthCheck API
-TIME_OUT=500
-INTERVAL=30
-TIME=0
-while [ "$TIME" -lt "$TIME_OUT" ]; do
- response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-ccsdk" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"input":{"dummy":"dummy"}}' http://localhost:8383/restconf/operations/SLI-API:healthcheck ); echo $response
-
- if [ "$response" == "200" ]; then
- echo CCSDK started in $TIME seconds
- break;
- fi
-
- echo Sleep: $INTERVAL seconds before testing if CCSDK 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 testing activities...
-fi
-
-#sleep 800
+# WAIT 5 minutes maximum and check karaf.log for readiness every 10 seconds
-TIME_OUT=1500
-INTERVAL=60
+TIME_OUT=300
+INTERVAL=10
TIME=0
while [ "$TIME" -lt "$TIME_OUT" ]; do
-response=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client system:start-level)
+docker exec ccsdk_odlsli_container cat /opt/opendaylight/data/log/karaf.log | grep 'warp coils'
- if [ "$response" == "Level 100" ] ; then
+ if [ $? == 0 ] ; then
echo CCSDK karaf started in $TIME seconds
break;
fi
done
if [ "$TIME" -ge "$TIME_OUT" ]; then
- echo TIME OUT: karaf session not started in $TIME_OUT seconds... Could cause problems for testing activities...
+ echo TIME OUT: karaf session not started in $TIME_OUT seconds, setup failed
+ exit 1;
fi
-response=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client system:start-level)
-num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
+num_bundles=$(docker exec -i ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d' ' -f1)
- if [ "$response" == "Level 100" ] && [ "$num_bundles" -ge 333 ]; then
- num_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d\| -f1)
- num_failed_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | grep Failure | wc -l)
- failed_bundles=$(docker exec ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | grep Failure)
+ if [ "$num_bundles" -ge 333 ]; then
+ num_bundles=$(docker exec -i ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | tail -1 | cut -d' ' -f1)
+ num_failed_bundles=$(docker exec -i ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | grep Failure | wc -l)
+ failed_bundles=$(docker exec -i ccsdk_odlsli_container /opt/opendaylight/current/bin/client bundle:list | grep Failure)
echo There is/are $num_failed_bundles failed bundles out of $num_bundles installed bundles.
fi
+++ /dev/null
-#!/bin/bash
-#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Place the scripts in run order:
-source ${WORKSPACE}/scripts/ccsdk/script1.sh
-
-# CLI internet speed test
-curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python -
-
-# Test download a 100 MB file to check network speed to nexus.onap.org
-wget -O /dev/null https://nexus.onap.org/content/repositories/releases/org/onap/appc/appc-dg-shared-installer/1.3.0/appc-dg-shared-installer-1.3.0.zip
-
-# Test download a 100 MB file to check network speed to nexus3.onap.org
-wget -O /dev/null https://nexus3.onap.org/repository/docker.release/v2/-/blobs/sha256:04dc4b8163487bb1c40df1ce16f349b507c262d6e2f202baa2e66a42eb8c64a1
-
#!/bin/bash
#
-# Copyright 2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# limitations under the License.
#
# Place the scripts in run order:
-source ${SCRIPTS}/common_functions.sh
-
-#start msb
-docker run -d -p 8500:8500 --name msb_consul consul:0.9.3
-MSB_CONSUL_IP=`get-instance-ip.sh msb_consul`
-echo MSB_CONSUL_IP=${MSB_CONSUL_IP}
-
-docker run -d -p 10081:10081 -e CONSUL_IP=$MSB_CONSUL_IP --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery
-MSB_DISCOVERY_IP=`get-instance-ip.sh msb_discovery`
-echo DISCOVERY_IP=${MSB_DISCOVERY_IP}
-
-docker run -d -p 80:80 -e CONSUL_IP=$MSB_CONSUL_IP -e SDCLIENT_IP=$MSB_DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway
-MSB_IAG_IP=`get-instance-ip.sh msb_internal_apigateway`
-echo MSB_IAG_IP=${MSB_IAG_IP}
-# Wait for initialization(8500 Consul, 10081 Service Registration & Discovery, 80 api gateway)
-for i in {1..10}; do
- curl -sS -m 1 ${MSB_CONSUL_IP}:8500 && curl -sS -m 1 ${MSB_DISCOVERY_IP}:10081 && curl -sS -m 1 ${MSB_IAG_IP}:80 && break
- echo sleep $i
- sleep $i
-done
-
-#Need some time for the initialization of MSB services
-sleep 60
+source ${SCRIPTS}/common_functions.sh
# Start cli
-docker run -d --name cli -e CLI_MODE=daemon nexus3.onap.org:10001/onap/cli:v1.1.0
+docker run -d --name cli -e OPEN_CLI_MODE=daemon nexus3.onap.org:10001/onap/cli:6.0.0
# Wait for cli initialization
echo Wait for CLI initialization
CLI_IP=`get-instance-ip.sh cli`
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v CLI_IP:${CLI_IP} -v MSB_IAG_IP:${MSB_IAG_IP}"
+ROBOT_VARIABLES="-v CLI_IP:${CLI_IP}"
[
{
"httpRequest": {
- "path": "/aai/v19/query.*"
+ "path": "/aai/v20/query.*"
},
"httpResponse": {
"statusCode": 200,
"serial-number": "6061ZW3",
"ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
"resource-version": "1573053304574",
+ "model-invariant-id": "7129e420-d396-4efb-af02-6b83499b12f8",
+ "model-version-id": "77c1a3d9-422a-4f78-bd8f-f7a357685b25",
"nf-role": "gNB",
"orchestration-status": "Active"
}
}
}
}
- }
+ },
+ {
+ "httpRequest":{
+ "path":"/aai/v20/service-design-and-creation/models/model.*"
+ },
+ "httpResponse":{
+ "statusCode":200,
+ "headers":{
+ "content-type":[
+ "application/json"
+ ]
+ },
+ "body":{
+ "type":"JSON",
+ "json":{
+ "model-version-id":"6d25b637-8bca-47e2-af1a-61258424183d",
+ "model-name":"PNF102",
+ "model-version":"1.0",
+ "model-description":"sartgserg",
+ "sdnc-model-name":"pm_control",
+ "sdnc-model-version":"1.0.0",
+ "resource-version":"1598626661947",
+ "relationship-list":{
+ "relationship":[
+ {
+ "related-to":"model-element",
+ "relationship-label":"org.onap.relationships.inventory.IsA",
+ "related-link":"/aai/v20/service-design-and-creation/models/model/c1a44771-3aa8-4888-a4f4-be89d1caa0cb/model-vers/model-ver/7256a992-10a7-4ac8-8c2c-63c67e5c48c8/model-elements/model-element/fddc70fe-8343-48c1-af2e-b54f551a32ee/model-elements/model-element/7bff45b7-8254-44e5-b7ad-6e10dee6dfc3",
+ "relationship-data":[
+ {
+ "relationship-key":"model.model-invariant-id",
+ "relationship-value":"c1a44771-3aa8-4888-a4f4-be89d1caa0cb"
+ },
+ {
+ "relationship-key":"model-ver.model-version-id",
+ "relationship-value":"7256a992-10a7-4ac8-8c2c-63c67e5c48c8"
+ },
+ {
+ "relationship-key":"model-element.model-element-uuid",
+ "relationship-value":"fddc70fe-8343-48c1-af2e-b54f551a32ee"
+ },
+ {
+ "relationship-key":"model-element.model-element-uuid",
+ "relationship-value":"7bff45b7-8254-44e5-b7ad-6e10dee6dfc3"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
]
"fileBasedGP": 15,
"fileLocation": "/pm/pm.xml",
"nfFilter": {
- "swVersions": [
- "1.0.0",
- "1.0.1"
- ],
"nfNames": [
"^pnf.*",
"^vnf.*"
+ ],
+ "modelInvariantUUIDs": [
+ "7129e420-d396-4efb-af02-6b83499b12f8"
+ ],
+ "modelVersionIDs": [
+
]
},
"measurementGroups": [
#
#export container name
-export MergerContainerName=TrustStoreMerger
+export CertServicePostProcessorContainerName=CertServicePostProcessor
#install docker sdk
echo "Uninstall docker-py and reinstall docker."
# limitations under the License.
#
-kill-instance.sh ${MergerContainerName}
+kill-instance.sh ${CertServicePostProcessorContainerName}
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-oom-platform-cert-service/truststoremerger
+oom-platform-cert-service/postprocessor
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
echo "Uninstall docker-py and reinstall docker."
pip uninstall -y docker-py
pip uninstall -y docker
pip install -U docker==2.7.0
-# the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo ${DIR}
-
-# the temp directory used, within $DIR
-# omit the -p parameter to create a temporal directory in the default location
-WORK_DIR=`mktemp -d -p "$DIR"`
-echo ${WORK_DIR}
-
-cd ${WORK_DIR}
-
-# check if tmp dir was created
-if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
- echo "Could not create temp dir"
- exit 1
-fi
-
sudo apt-get -y install libxml2-utils
-bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+source ${SCRIPTS}/policy/detmVers.sh
-echo ${POLICY_API_VERSION}
-echo ${POLICY_PAP_VERSION}
-echo ${POLICY_APEX_PDP_VERSION}
-
-# Adding this waiting container due to race condition between pap and mariadb
-docker-compose -f ${WORKSPACE}/scripts/policy/policy-apex-pdp/docker-compose-apex.yml run --rm start_dependencies
-
-#Configure the database
-docker exec --tty mariadb chmod +x /docker-entrypoint-initdb.d/db.sh
-docker exec --tty mariadb /docker-entrypoint-initdb.d/db.sh
-
-# now bring everything else up
-docker-compose -f ${WORKSPACE}/scripts/policy/policy-apex-pdp/docker-compose-apex.yml run --rm start_all
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d apex-pdp
unset http_proxy https_proxy
POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
MARIADB_IP=`get-instance-ip.sh mariadb`
APEX_IP=`get-instance-ip.sh policy-apex-pdp`
-DMAAP_IP=`get-instance-ip.sh dmaap-simulator`
+DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
echo PAP IP IS ${POLICY_PAP_IP}
echo MARIADB IP IS ${MARIADB_IP}
echo APEX IP IS ${APEX_IP}
echo DMAAP_IP IS ${DMAAP_IP}
-ROBOT_VARIABLES="-v APEX_IP:${APEX_IP} -v POLICY_API_IP:${POLICY_API_IP} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${APEX_IP} 6969
+
+ROBOT_VARIABLES=""
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
# Copyright (C) 2018 Ericsson. All rights reserved.
#
# Modifications copyright (c) 2019 Nordix Foundation.
+# Modifications Copyright (C) 2020 AT&T Intellectual Property.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-kill-instance.sh policy-apex-pdp
-kill-instance.sh policy-pap
-kill-instance.sh policy-api
-kill-instance.sh mariadb
-kill-instance.sh dmaap-simulator
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Select branch
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
echo "Uninstall docker-py and reinstall docker."
pip uninstall -y docker-py
sudo apt-get -y install libxml2-utils
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-echo ${POLICY_API_VERSION}
+bash ${SCRIPTS}/policy/get-models-examples.sh
+
+source ${SCRIPTS}/policy/detmVers.sh
-# Adding this waiting container to avoid race condition between api and mariadb containers.
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_dependencies
+DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
-#Configure the database
-docker exec --tty mariadb chmod +x /docker-entrypoint-initdb.d/db.sh
-docker exec --tty mariadb /docker-entrypoint-initdb.d/db.sh
+# create a couple of variations of the policy definitions
+sed -e 's!Measurement_vGMUX!ADifferentValue!' \
+ ${DATA}/vCPE.policy.monitoring.input.tosca.json \
+ >${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json
+
+sed -e 's!"version": "1.0.0"!"version": "2.0.0"!' \
+ -e 's!"policy-version": 1!"policy-version": 2!' \
+ ${DATA}/vCPE.policy.monitoring.input.tosca.json \
+ >${DATA}/vCPE.policy.monitoring.input.tosca.v2.json
+
+echo ${POLICY_API_VERSION}
+
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d api
-# now bring everything else up
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-api.yml run --rm start_all
unset http_proxy https_proxy
echo API IP IS ${POLICY_API_IP}
echo MARIADB IP IS ${MARIADB_IP}
-ROBOT_VARIABLES="-v POLICY_API_IP:${POLICY_API_IP}"
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${POLICY_API_IP} 6969
+
+ROBOT_VARIABLES=""
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-kill-instance.sh policy-api
-kill-instance.sh mariadb
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
echo "Uninstall docker-py and reinstall docker."
pip uninstall -y docker-py
pip uninstall -y docker
pip install -U docker==2.7.0
-# the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo ${DIR}
-
-# the temp directory used, within $DIR
-# omit the -p parameter to create a temporal directory in the default location
-WORK_DIR=`mktemp -d -p "$DIR"`
-echo ${WORK_DIR}
-
-cd ${WORK_DIR}
-
-# check if tmp dir was created
-if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
- echo "Could not create temp dir"
- exit 1
-fi
-
sudo apt-get -y install libxml2-utils
-bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_APEX_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_APEX_PDP_VERSION="${POLICY_APEX_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_DISTRIBUTION_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_DISTRIBUTION_VERSION="${POLICY_DISTRIBUTION_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+source ${SCRIPTS}/policy/detmVers.sh
-echo ${POLICY_API_VERSION}
-echo ${POLICY_PAP_VERSION}
-echo ${POLICY_APEX_PDP_VERSION}
-echo ${POLICY_DISTRIBUTION_VERSION}
-
-SCRIPT_DIR=${WORKSPACE}/scripts/policy/policy-distribution
+SCRIPT_DIR=${SCRIPTS}/policy/policy-distribution
# Remaking the csar file in case if the file got corrupted
zip -F ${SCRIPT_DIR}/config/distribution/csar/sample_csar_with_apex_policy.csar --out ${SCRIPT_DIR}/config/distribution/csar/csar_temp.csar
-# Adding this waiting container due to race condition between pap and mariadb
-docker-compose -f ${SCRIPT_DIR}/docker-compose-distribution.yml run --rm start_dependencies
-
-#Configure the database
-docker exec --tty mariadb chmod +x /docker-entrypoint-initdb.d/db.sh
-docker exec --tty mariadb /docker-entrypoint-initdb.d/db.sh
+# Remake temp directory
+rm -rf ${SCRIPT_DIR}/config/distribution/temp
+mkdir ${SCRIPT_DIR}/config/distribution/temp
-# now bring everything else up
-docker-compose -f ${SCRIPT_DIR}/docker-compose-distribution.yml run --rm start_all
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d distribution
unset http_proxy https_proxy
POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
MARIADB_IP=`get-instance-ip.sh mariadb`
APEX_IP=`get-instance-ip.sh policy-apex-pdp`
-DMAAP_IP=`get-instance-ip.sh dmaap-simulator`
+DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
POLICY_DISTRIBUTION_IP=`get-instance-ip.sh policy-distribution`
echo PAP IP IS ${POLICY_PAP_IP}
echo DMAAP_IP IS ${DMAAP_IP}
echo POLICY_DISTRIBUTION_IP IS ${POLICY_DISTRIBUTION_IP}
-ROBOT_VARIABLES="-v APEX_IP:${APEX_IP} -v SCRIPT_DIR:${SCRIPT_DIR} -v POLICY_DISTRIBUTION_IP:${POLICY_DISTRIBUTION_IP}"
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${POLICY_DISTRIBUTION_IP} 6969
+
+ROBOT_VARIABLES=""
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v APEX_IP:${APEX_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCRIPT_DIR:${SCRIPT_DIR}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_DISTRIBUTION_IP:${POLICY_DISTRIBUTION_IP}"
# Copyright (C) 2018 Ericsson. All rights reserved.
#
# Modifications copyright (c) 2019 Nordix Foundation.
+# Modifications Copyright (C) 2020 AT&T Intellectual Property.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-kill-instance.sh policy-apex-pdp
-kill-instance.sh policy-pap
-kill-instance.sh policy-api
-kill-instance.sh mariadb
-kill-instance.sh dmaap-simulator
-kill-instance.sh policy-distribution
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
# OS upgrades
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
SCR2=${WORKSPACE}/scripts/policy/drools-apps
pip install -U docker==2.7.0
sudo apt-get -y install libxml2-utils
-${SCRIPTS}/policy/policy-models-simulators.sh
+bash ${SCRIPTS}/policy/get-models-examples.sh
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_XACML_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_XACML_PDP_VERSION="${POLICY_XACML_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_DROOLS_APPS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-echo ${POLICY_DROOLS_APPS_VERSION_EXTRACT}
-export POLICY_DROOLS_APPS_VERSION="${POLICY_DROOLS_APPS_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+source ${SCRIPTS}/policy/detmVers.sh
-echo ${POLICY_XACML_PDP_VERSION}
-echo ${POLICY_DROOLS_APPS_VERSION}
-
-echo "user information: $(id)"
-echo "docker and docker-compose versions:"
-docker -v && docker-compose -v
-
-# Adding this waiting container due to race condition between drools and mariadb
-docker-compose -f ${SCR2}/docker-compose-drools-apps.yml run --rm start_dependencies
-
-# Adding this waiting container due to race condition between pap and xacml
-docker-compose -f ${SCR2}/docker-compose-drools-apps.yml run --rm start_pap
-
-# now bring everything else up
-docker-compose -f ${SCR2}/docker-compose-drools-apps.yml run --rm start_all
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d drools-apps
unset http_proxy https_proxy
-DROOLS_IP=`get-instance-ip.sh drools`
+DROOLS_IP=`get-instance-ip.sh drools-apps`
API_IP=`get-instance-ip.sh policy-api`
PAP_IP=`get-instance-ip.sh policy-pap`
XACML_IP=`get-instance-ip.sh policy-xacml-pdp`
echo XACML IP IS ${XACML_IP}
echo SIMULATORS IP IS ${SIM_IP}
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${DROOLS_IP} 6969
+
# give enough time for the controllers to come up
sleep 15
-DATA=${WORKSPACE}/simulators/models/models-examples/src/main/resources/policies
+DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
ROBOT_VARIABLES=""
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR2:${SCR2}"
#
mkdir -p $WORKSPACE/archives/
-docker-compose -f ${WORKSPACE}/scripts/policy/drools-apps/docker-compose-drools-apps.yml logs > $WORKSPACE/archives/docker-compose-drools-apps.log
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml logs > $WORKSPACE/archives/docker-compose-drools-apps.log
-docker-compose -f ${WORKSPACE}/scripts/policy/drools-apps/docker-compose-drools-apps.yml down -v
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
pip uninstall -y docker
pip install -U docker==2.7.0
-echo "user information: $(id)"
-echo "docker information:"
-docker -v && docker-compose -v && docker info
-
# Component Versions
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
sudo apt-get -y install libxml2-utils
-POLICY_DROOLS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_DROOLS_VERSION="${POLICY_DROOLS_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-echo ${POLICY_DROOLS_VERSION}
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools.yml up -d
-sleep 2m
+source ${SCRIPTS}/policy/detmVers.sh
-docker container ls -a
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d drools
POLICY_DROOLS_IP=`get-instance-ip.sh drools`
MARIADB_IP=`get-instance-ip.sh mariadb`
echo DROOLS IP IS ${POLICY_DROOLS_IP}
echo MARIADB IP IS ${MARIADB_IP}
-for i in {1..10}; do
- curl -sS ${POLICY_DROOLS_IP}:9696 && break
- echo sleep $i
- sleep $i
-done
+# wait for the app to start up - looking for telemtry service on port 9696
+${SCRIPTS}/policy/wait_for_port.sh ${POLICY_DROOLS_IP} 9696
+
+# give enough time for the controllers to come up
+sleep 15
ROBOT_VARIABLES="-v POLICY_DROOLS_IP:${POLICY_DROOLS_IP}"
#
mkdir -p $WORKSPACE/archives/
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools.yml logs > $WORKSPACE/archives/docker-compose-drools.log
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-drools.yml down -v
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml logs > $WORKSPACE/archives/docker-compose-drools.log
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
# ============LICENSE_END=========================================================
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
echo "Uninstall docker-py and reinstall docker."
pip uninstall -y docker-py
pip uninstall -y docker
pip install -U docker==2.7.0
-
sudo apt-get -y install libxml2-utils
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-echo ${POLICY_API_VERSION}
-echo ${POLICY_PAP_VERSION}
-# Adding this waiting container due to race condition between pap and mariadb
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml run --rm start_dependencies
-
-#Configure the database
-docker exec --tty mariadb chmod +x /docker-entrypoint-initdb.d/db.sh
-docker exec --tty mariadb /docker-entrypoint-initdb.d/db.sh
-
-# now bring everything else up
-docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-pap.yml run --rm start_all
+bash ${SCRIPTS}/policy/get-models-examples.sh
-unset http_proxy https_proxy
+source ${SCRIPTS}/policy/detmVers.sh
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d pap
+
+unset http_proxy https_proxy
POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
POLICY_API_IP=`get-instance-ip.sh policy-api`
echo API IP IS ${POLICY_API_IP}
echo MARIADB IP IS ${MARIADB_IP}
+
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${POLICY_PAP_IP} 6969
+
+
+DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
+
ROBOT_VARIABLES=""
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
#!/bin/bash
# ============LICENSE_START=======================================================
# Copyright (C) 2019 Nordix Foundation.
-# Modifications Copyright (C) 2019 AT&T Intellectual Property.
+# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-kill-instance.sh policy-pap
-kill-instance.sh policy-api
-kill-instance.sh mariadb
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
# ============LICENSE_END=========================================================
source ${SCRIPTS}/policy/config/policy-csit.conf
-export POLICY_MARIADB_VER
-echo ${GERRIT_BRANCH}
-echo ${POLICY_MARIADB_VER}
echo "Uninstall docker-py and reinstall docker."
pip uninstall -y docker-py
pip uninstall -y docker
pip install -U docker==2.7.0
-# the directory of the script
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo ${DIR}
-
-# the temp directory used, within $DIR
-# omit the -p parameter to create a temporal directory in the default location
-WORK_DIR=`mktemp -d -p "$DIR"`
-echo ${WORK_DIR}
-
-cd ${WORK_DIR}
-
-# check if tmp dir was created
-if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
- echo "Could not create temp dir"
- exit 1
-fi
-
SCR_DMAAP=${SCRIPTS}/policy/drools-apps
sudo apt-get -y install libxml2-utils
-bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
-
-POLICY_API_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_API_VERSION="${POLICY_API_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_PAP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_PAP_VERSION="${POLICY_PAP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
-POLICY_XACML_PDP_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_XACML_PDP_VERSION="${POLICY_XACML_PDP_VERSION_EXTRACT:0:3}-SNAPSHOT-latest"
+bash ${SCRIPTS}/policy/get-models-examples.sh
-echo ${POLICY_API_VERSION}
-echo ${POLICY_PAP_VERSION}
-echo ${POLICY_XACML_PDP_VERSION}
+source ${SCRIPTS}/policy/detmVers.sh
-# Adding this waiting container due to race condition between pap and mariadb
-docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml run --rm start_dependencies
+docker-compose -f ${SCRIPTS}/policy/docker-compose-all.yml up -d xacml-pdp
-# now bring everything else up
-docker-compose -f ${WORKSPACE}/scripts/policy/policy-xacml-pdp/docker-compose-pdpx.yml run --rm start_all
unset http_proxy https_proxy
POLICY_API_IP=`get-instance-ip.sh policy-api`
MARIADB_IP=`get-instance-ip.sh mariadb`
POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp`
-DMAAP_IP=`get-instance-ip.sh dmaap-simulator`
+DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
echo PDP IP IS ${POLICY_PDPX_IP}
echo MARIADB IP IS ${MARIADB_IP}
echo DMAAP_IP IS ${DMAAP_IP}
-DATA2=${WORKSPACE}/dmaap-sim/models/models-examples/src/main/resources/policies
+# wait for the app to start up
+${SCRIPTS}/policy/wait_for_port.sh ${POLICY_PDPX_IP} 6969
+
+DATA2=${WORKSPACE}/models/models-examples/src/main/resources/policies
ROBOT_VARIABLES=""
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCR_DMAAP}"
#!/bin/bash
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
-kill-instance.sh policy-xacml-pdp
-kill-instance.sh policy-pap
-kill-instance.sh policy-api
-kill-instance.sh mariadb
-kill-instance.sh dmaap-simulator
+docker-compose -f ${WORKSPACE}/scripts/policy/docker-compose-all.yml down -v
--- /dev/null
+#!/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.
+#
+
+# It can enable HTTPS for SDC component
+export SDC_TEST_HTTPS="${SDC_TEST_HTTPS:-false}"
+
+# By default all images are from remote upstream registry, this option
+# provides the chance to test locally built images
+export SDC_LOCAL_IMAGES="${SDC_LOCAL_IMAGES:-false}"
+
+export WORKFLOW_LOCAL_IMAGES="${WORKFLOW_LOCAL_IMAGES:-false}"
+
+# For this to take effect SDC_LOCAL_IMAGES must be enabled...
+#
+# The path to the local sdc git repo from which the local images have
+# been built - it also affects the tag used - if left empty *AND*
+# local images are used *AND* SDC_LOCAL_TAG is unset then the tag
+# will be set to: 'latest'
+#
+# BEWARE: Using local images with an incorrect git repo could lead to
+# problems...set SDC_LOCAL_GITREPO or GERRIT_BRANCH properly...
+export SDC_LOCAL_GITREPO="${SDC_LOCAL_GITREPO}"
+
+# For this to take effect SDC_LOCAL_IMAGES must be enabled...
+#
+# This will set the tag for local images - leaving this empty *AND*
+# with unset SDC_LOCAL_GITREPO the local images will fallback to the
+# tag: 'latest'
+export SDC_LOCAL_TAG="${SDC_LOCAL_TAG}"
+
+
+export WORKFLOW_LOCAL_GITREPO="${WORKFLOW_LOCAL_GITREPO}"
+
+
+
+source ${WORKSPACE}/scripts/sdc-workflow-d/sdc_workflow_d.sh
#!/bin/bash
#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# 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.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# Modifications copyright (c) 2017 AT&T Intellectual Property
-#
-echo "This is ${WORKSPACE}/scripts/ccsdk/script1.sh"
+source ${WORKSPACE}/scripts/sdc-workflow-d/cleanup_sdc_workflow.sh
# Test suites are relative paths under [integration/csit.git]/tests/.
# Place the suites in run order.
-# Temporary change to trigger verify job.
-ccsdk/oran/suite1
-ccsdk/oran/suite2
+sdc-workflow-d/test1.robot
+++ /dev/null
-Bag Attributes
- friendlyName: so@so.onap.org
- localKeyID: 54 69 6D 65 20 31 35 36 34 30 35 32 33 31 34 37 38 34
-subject=CN = aai-simulator, emailAddress = , OU = so@so.onap.org, OU = OSAAF, O = ONAP, C = US
-
-issuer=C = US, O = ONAP, OU = OSAAF, CN = intermediateCA_9
-
------BEGIN CERTIFICATE-----
-MIIEBzCCAu+gAwIBAgIIdC1kel7DdnYwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
-BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
-bnRlcm1lZGlhdGVDQV85MB4XDTE5MDcyNTEwNTgzNFoXDTIwMDcyNTEwNTgzNFow
-bjEWMBQGA1UEAwwNYWFpLXNpbXVsYXRvcjEPMA0GCSqGSIb3DQEJARYAMRcwFQYD
-VQQLDA5zb0Bzby5vbmFwLm9yZzEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoMBE9O
-QVAxCzAJBgNVBAYTAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
-185xCE6cmsY6XB5Dd/5GlfuWjN05KKk3akymxhbJLa9ektlusmuTPt4cnxD+e4b6
-dymqHzQ6C206TBK1jaDzcF07Ag7VTpxmlgaSukQ+aZoXfIcs80lWCLnNvC2MrOuh
-9uhUILAmuddo01cIHJvti5R2g6BEirCGsVKBSwmXRotxHyzUg9IwOpeGy0G1ZDjU
-OiMqY5qOonVTEz1AganctdiWK1/eZ5IBD7gQwckS5n1a6RYMVSnr1vKLoiZq76Bp
-wKy3EBX16jlmQMC5Aj9/GDezJg0bPvlikL3VUsC76DRShucsxS3SzVxeAJ5nsH8S
-qUElpbe3uabhFG2qKmtvdwIDAQABo4HPMIHMMAkGA1UdEwQCMAAwDgYDVR0PAQH/
-BAQDAgXgMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBUBgNVHSME
-TTBLgBSB95lbELnIjN7zUl7qTmmgQz6s3aEwpC4wLDEOMAwGA1UECwwFT1NBQUYx
-DTALBgNVBAoMBE9OQVAxCzAJBgNVBAYTAlVTggEHMB0GA1UdDgQWBBSQ54p+SID0
-2p21lUHY9YC1ZZfkZTAYBgNVHREEETAPgg1hYWktc2ltdWxhdG9yMA0GCSqGSIb3
-DQEBCwUAA4IBAQBRGK6Iyjc/0bC3+qjPuNwSlu1pUcgHtgxP/oTU5f9xMSkSjIP0
-weVnIEGOwlW8GRbDPQza14AHETTxJ17rv6p6h7l/dZZmbMPl2S+QXGptgDWR6zY7
-q5ROecGcQzgto6lTMcKgBMW+ct3Tb3khMqP6ewzGz85SY7BgyVE7HFG9M5BM3NhX
-ovAcj93C24DFKLDKxHrrsVIROlFk6QW2+kb0zo1YzVc6NNJY2ViXBrM5zrG21tDj
-VEv0JaHKPYhzWCb7ZcSSo/ftZ2yDsRGS8r6DK5sYCfLifloMVJhF04hOC+ZbxiiB
-JgYniQPmb0Zj5BfXWovdAe/89wr5aokQ3GZL
------END CERTIFICATE-----
--- /dev/null
+-----BEGIN CERTIFICATE-----
+MIIFbTCCA1WgAwIBAgIUNRiDdy3HfVkhYbpUyVihUP4C+c8wDQYJKoZIhvcNAQEL
+BQAwPTEPMA0GA1UEAwwGUm9vdENBMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwE
+T05BUDELMAkGA1UEBhMCVVMwIBcNMjAwOTE4MDgzODMyWhgPMjEyMDA4MjUwODM4
+MzJaMD0xDzANBgNVBAMMBlJvb3RDQTEOMAwGA1UECwwFT1NBQUYxDTALBgNVBAoM
+BE9OQVAxCzAJBgNVBAYTAlVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEAkvqnUBq7YgmtsH6nMDSouZ/IpimdUkmlVM9lp0DZ8gasT+/cD8uv9yc0rSly
+U3+XFFAolI4qkGIoeyPo9pDf0qXXQBSg4VFl4OeEuT21Of110IfdjzBP2bSkaavr
+HjYwFFEy0Nn/bqiQ3j3zWiDOaf5wxAIYeqVPOXT6DatsGXxIfTZoZNsRQi5XYgor
+kfj/oQq/pByJJWMPkb/CzdECSzInQ+hcjGh14t7WT2P8oxpdWZmnPphawSWgZquM
+gpyB/ZU6Pik9tNTSF6/rIO62SBWD9//3Nc/NJ2GEig9vh3RIafaHsX7/dctV07qJ
+4uHYMYmaCcv+nsh8rROIyVOybFgW+NCZXIsXeLlbGpDwqR8FJ/m2ulzP+fFVxrZ9
+Gfm6DpGOwj/cXldUHcdas5uaLVb93xE3dm0QeU4OchRSxi0bb+a8EA7nhYlW54e1
+hahkSe7awXRMEoCVJa9QQpCGFbYqWUHDaI96oLLdsEcwTfLyQ5sBZ07fejP2g4zR
+y16O+PZMyX5IXNfEur2Zvfg7qT80vMh5HYNITTw5tdY5TEBmf5xeFLPune0y97IV
+Nd9qPiCqeKLHnfrKacLMNYLHRUpPgxyPnyIl+k+b/T3qvP3d0R9OwcVdgs2I8+Il
+XczrT97z6N78L8qRs/dupD8unx74IrMND0+RV7cAjB4FBNUCAwEAAaNjMGEwHQYD
+VR0OBBYEFPTYCkHKz3SBboUm6YD2/7Qi5Zr2MB8GA1UdIwQYMBaAFPTYCkHKz3SB
+boUm6YD2/7Qi5Zr2MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0G
+CSqGSIb3DQEBCwUAA4ICAQAPkP/gc2bBBusO2JDhTsjJyfUZnBn0INtQmTvQtU28
+LYENJ7AaqLQsGMmG69QjPXI5nopcReV6NNiMo+Rf3lQfyVbKXmWo088Ni0GaAD3X
+qqp0MrOKT+YuwUS7WgKgdlLNhzWVtrvDbtk+2k/rnFGh73KGNzFy8InPU1wPQsxj
+34tfFBSBNUvzyvcdmr6/4p2ByESyCN7yukvoGhb73PdP0riwi0to53HWQD6W3JPT
+ZxIk48rzDw8dyzvO6N0NDM7wpJZRA+OFyQf1guIfx2icY52Oc6+1q/1gpr5Epgvc
+JhKHxjDfYZLyKrPEg4lapNi2y36Xh0c9gU1JUqsfGFwOJ500N3Hz3RNrrRJeZoae
+xqDn6CtNE4Phyh6UyndfQrbcL67Ygc8w1tzIjtAprWi87jbglVHbnnWl1XEWBaBL
+O7Kbdp/Ffa0ENu9Q1JPpgV4zei06e/QJrB1tNbiSmj1d47VjCycAxYIj3CqaDey/
+8Ej8lAdjEPqEd98beMEY5TrSHVNWt/XuEqn3JoDbSAnqr7XIfzGF4JtfsVY1nyhE
+WbbOtUdm9rjBrj9ekJF0khKT1eYGYsJuV8gEqg9pjzXj4qabnK63JiGUmTaZVgvI
+e4YaV1jEnydB9bh31S9MXtvA7/D1g8apunBnbqyc6OCnfQA+1czTcWPhWAUq8X2f
+HA==
+-----END CERTIFICATE-----
client:
configuration:
ssl:
- keyStore: classpath:org.onap.so.p12
+ keyStore: file:/app/bpmn-infra-certs/org.onap.so.p12
keyStorePassword: 'RLe5ExMWW;Kd6GTSt0WQz;.Y'
- trustStore: classpath:org.onap.so.trust.jks
- trustStorePassword: '6V%8oSU$,%WbYp3IUe;^mWt4'
+ trustStore: file:/app/bpmn-infra-certs/org.onap.so.trust.jks
+ trustStorePassword: '[)3KV.k*!IlkFhWEq0Nv2dDa'
ssl:
key-alias: so@so.onap.org
key--store-password: 'ywsqCy:EEo#j}HJHM7z^Rk[L'
- key-store: classpath:so-vnfm-adapter.p12
+ key-store: file:/app/so-vnfm-adapter-certs/so-vnfm-adapter.p12
key-store-type: PKCS12
client-auth: need
http:
client:
ssl:
- trust-store: classpath:org.onap.so.trust.jks
+ trust-store: file:/app/so-vnfm-adapter-certs/org.onap.so.trust.jks
trust-store-password: ',sx#.C*W)]wVgJC6ccFHI#:H'
aai:
auth: 221187EFA3AD4E33600DE0488F287099934CE65C3D0697BCECC00BB58E784E07CD74A24581DC31DBC086FF63DF116378776E9BE3D1325885
ports:
- "8081:8081"
volumes:
- - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
- ${CONFIG_DIR_PATH}/override-files/bpmn-infra/onapheat:/app/config
- - ${CONFIG_DIR_PATH}/certificates/aai-certificate/aai.crt:/app/ca-certificates/aai.crt
+ - ${CONFIG_DIR_PATH}/certificates/bpmn-infra-certs:/app/bpmn-infra-certs
+ - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
environment:
- APP=bpmn-infra
- JVM_ARGS=-Xms64m -Xmx512m
ports:
- "8080:8080"
volumes:
- - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
- ${CONFIG_DIR_PATH}/override-files/api-handler-infra/onapheat:/app/config
+ - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
environment:
- APP=api-handler-infra
- JVM_ARGS=-Xms64m -Xmx512m
ports:
- "9092:9092"
volumes:
- - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
- ${CONFIG_DIR_PATH}/override-files/so-vnfm-adapter/onapheat:/app/config
+ - ${CONFIG_DIR_PATH}/certificates/so-vnfm-adapter-certs:/app/so-vnfm-adapter-certs
+ - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
environment:
- APP=so-vnfm-adapter
- JVM_ARGS=-Xms64m -Xmx512m
ports:
- "9093:9093"
volumes:
- - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
- ${CONFIG_DIR_PATH}/override-files/vnfm-simulator/onapheat:/app/config
+ - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
environment:
- APP=VNFM-SIMULATOR
- JVM_ARGS=-Xms64m -Xmx512m
ports:
- "9098:9098"
volumes:
- - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates
- ${CONFIG_DIR_PATH}/override-files/ve-vnfm-adapter/onapheat:/app/config
+ - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt
environment:
- APP=ve-vnfm-adapter
- JVM_ARGS=-Xms64m -Xmx512m
+++ /dev/null
-Bag Attributes
- friendlyName: so@so.onap.org
- localKeyID: 54 69 6D 65 20 31 35 36 33 34 36 33 36 32 39 35 38 33
-subject=/CN=so-vnfm-adapter/emailAddress=/OU=so@so.onap.org/OU=OSAAF/O=ONAP/C=US
-issuer=/C=US/O=ONAP/OU=OSAAF/CN=intermediateCA_9
------BEGIN CERTIFICATE-----
-MIIEITCCAwmgAwIBAgIILuAnLLineoYwDQYJKoZIhvcNAQELBQAwRzELMAkGA1UE
-BhMCVVMxDTALBgNVBAoMBE9OQVAxDjAMBgNVBAsMBU9TQUFGMRkwFwYDVQQDDBBp
-bnRlcm1lZGlhdGVDQV85MB4XDTE5MDcxODE1MjcwOVoXDTIwMDcxODE1MjcwOVow
-cDEYMBYGA1UEAwwPc28tdm5mbS1hZGFwdGVyMQ8wDQYJKoZIhvcNAQkBFgAxFzAV
-BgNVBAsMDnNvQHNvLm9uYXAub3JnMQ4wDAYDVQQLDAVPU0FBRjENMAsGA1UECgwE
-T05BUDELMAkGA1UEBhMCVVMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
-AQCu2NbWjFiZ5Tz5P7daCD6mqJqSWV3f+gkM2VC/UYM/43hd/2ILJbbtsv4uzS/P
-GXl3UIKBjb7zRiDCvLNMFsHCZ9/gIonG1z737S42LCrdVKq/KQ59yIOPrxYmLyiQ
-Xy81ChX77b2KvKPPeF+K/wnh5fLwlcJ18geeCoWGaMK0C/i6J/uUb9z+Ef0Nmtau
-NdXAuUnERCKMra+3kFxZwaRC/gSCy+/s6EQdeaGNiijg03AmrUx9XjrJjHbYMDVo
-OKSxtv0E4fxbfmTpHaKCuN4eg+0nEXw/eiIEuSHJuh3KKv7wRoP/hG/Tdog7x60M
-SD+hdNjCbFP6yAyMPfoxVnjHAgMBAAGjgecwgeQwCQYDVR0TBAIwADAOBgNVHQ8B
-Af8EBAMCBeAwIAYDVR0lAQH/BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMFQGA1Ud
-IwRNMEuAFIH3mVsQuciM3vNSXupOaaBDPqzdoTCkLjAsMQ4wDAYDVQQLDAVPU0FB
-RjENMAsGA1UECgwET05BUDELMAkGA1UEBhMCVVOCAQcwHQYDVR0OBBYEFFLrO3T4
-QybeDQ28mHgC/xT5f03qMDAGA1UdEQQpMCeCD3NvLXZuZm0tYWRhcHRlcoIUc28t
-dm5mbS1hZGFwdGVyLm9uYXAwDQYJKoZIhvcNAQELBQADggEBACe+JaVIjTku/QNp
-XoQCNN+sllSZmEHTLmYfpSzY5BY2AeJsgTYqFtAhtp6uQf8Jr993CyEyeJ4if2Z9
-J5NWoJKmY1+a63UphB1mg4sNSCuDxvbxPjtrFkOx/DiB1XEUdoifS9IQSDIIuhaD
-YP6sih1TBOh/2ityCe51Mu1J9/wgb24rlYouVtEyQeIai4dqngFHeQHeNXOnGN0z
-osEcKSYa0C+ZOAomBMT58C2aDz9vyI8YPuzwVSDKndmXUgvrkkVnxk3qJRtghDQc
-RV+4SeZg8s4+5DxKL4AL15IAaAPMJHi+MRtfm7qNzqCEl5sAEzO7S4oVHeWLNFV8
-a9PHErg=
------END CERTIFICATE-----
+++ /dev/null
-#!/bin/bash
-#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# 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.
-#
-# These scripts are sourced by run-csit.sh.
-
-
-
-#Start market place
-docker run -d -i -t --name=vnfmarket -p 8702:8702 onap/vnfmarket
-
-REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' vnfmarket`
-
-
-# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v REPO_IP:${REPO_IP}"
-
-
--- /dev/null
+# Copyright 2020 Huawei Technologies Co., Ltd.
+# Copyright 2020 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.
+
+version: '2'
+networks:
+ default:
+ driver: bridge
+ driver_opts:
+ com.docker.network.driver.mtu: ${NETWORK_DRIVER_MTU}
+
+services:
+ postgres:
+ container_name: "postgres"
+ restart: "always"
+ image: "nexus3.onap.org:10001/onap/vnfsdk/refrepo/postgres:${POSTGRES_IMAGE_TAG}"
+ mem_limit: "1g"
+ memswap_limit: "1g"
+ ports:
+ - "5432:5432"
+
+ refrepo:
+ container_name: "refrepo"
+ restart: "always"
+ image: "nexus3.onap.org:10001/onap/vnfsdk/refrepo:${REFREPO_IMAGE_TAG}"
+ ports:
+ - "8702-8703:8702-8703"
+ - "50051:50051"
+ environment:
+ POSTGRES_SERVICE_HOST: postgres
+ links:
+ - postgres
#!/bin/bash
#
# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# limitations under the License.
#
# These scripts are sourced by run-csit.sh.
-VNFSDK_REFREPO_DOCKER_VERSION=1.3-STAGING-latest
-#Start postgres database
-docker run -d -i -t --name=postgres -p 5432:5432 nexus3.onap.org:10001/onap/vnfsdk/refrepo/postgres:latest
+REFREPO_IMAGE_TAG=latest \
+POSTGRES_IMAGE_TAG=latest \
+NETWORK_DRIVER_MTU=1450 \
+docker-compose up -d
-POSTGRES=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`
-
-#Start market place
-docker run -d -i -t --name=refrepo -e POSTGRES_SERVICE_HOST=$POSTGRES -p 8702:8702 nexus3.onap.org:10001/onap/vnfsdk/refrepo:$VNFSDK_REFREPO_DOCKER_VERSION
+DOCKER_IP=`get-docker-network-ip.sh`
# Wait for Market place initialization
echo Wait for VNF Repository initialization
-for i in {1..30}; do
- sleep 1
+# Active waiting with healthcheck and max retry count
+MAX_RETRY=30
+TRY=1
+while (( $(curl -s -o /dev/null -w ''%{http_code}'' ${DOCKER_IP}:8702/onapapi/vnfsdk-marketplace/v1/PackageResource/healthcheck) != 200 )) && (($TRY < $MAX_RETRY)); do
+ sleep 4
+ TRY=$[$TRY+1]
done
-REPO_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' refrepo`
-
+# Get refrepo logs for easier debug in case of failure
+docker logs refrepo
+REFREPO_IP=`get-instance-ip.sh refrepo`
# Pass any variables required by Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REPO_IP:${REPO_IP}"
+ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REPO_IP:${REFREPO_IP}"
echo ${ROBOT_VARIABLES}
#!/bin/bash
#
# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# This script is sourced by run-csit.sh after Robot test completion.
-
-kill-instance.sh vnfmarket
-
+docker-compose down
+++ /dev/null
-#!/usr/bin/env bash
-###############################################################################
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# 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.
-###############################################################################
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo $SCRIPT_DIR
-
-#CHECK IF MSB_ADDR IS GIVEN IN COMMAND
-if [ -z "$1" ]
-then
- echo "There is no MSB_ADDR"
- exit 1
-fi
-MSB_ADDR=$1
-CSAR_NAME=$2
-echo $MSB_ADDR
-echo $CSAR_NAME
-
-# Wait for MSB initialization
-echo Wait for MSB initialization
-for i in {1..20}; do
- curl -sS -m 1 $MSB_ADDR > /dev/null && break
- sleep $i
-done
-#MSB initialized
-###########################################
-###########################################
-###########################################
-###########################################
-###########################################
-###########################################
-############UOLOAD PACKAGE to MARKET PLACE######################
-echo
-echo "############## UOLOAD PACKAGE to MARKET PLACE STARTED ##############";
-UploadPackageResponse=$(curl -sS -X POST -H "Content-Type: multipart/form-data;" -F "file=@$CSAR_NAME" http://$MSB_ADDR/openoapi/vnfsdk-marketplace/v1/PackageResource/csars)
-if echo "$UploadPackageResponse" | grep -q "\"csarId\""; then
- echo "UOLOAD PACKAGE TO MARKET PLACE SUCSSS !!!";
-else
- echo "UploadPackageResponse :$UploadPackageResponse"
- echo "UOLOAD PACKAGE TO MARKET PLACE FAILED !!!";
- exit 1;
-fi
-UploadCsarId=$(echo ${UploadPackageResponse:11:36})
-echo "PACKAGE ID:$UploadCsarId"
-echo "############## UOLOAD PACKAGE to MARKET PLACE END ##################";
-#######UOLOAD PACKAGE to MARKET PLACE END#############
-###########################################
-###########################################
-###########################################
-###########################################
-###########################################
-###########################################
-###########################################
-################GET ON BOARD STATUS########
-echo
-echo "####################### GETTING ON-BOARDING STATUS ##################";
-#sleeping for 10 sec so thate ON Boarding operation should be happened at backend
-for pc in $(seq 1 10); do
- status=$((${pc}*10));
- echo -ne "ON_BOARDING Status (%): $status\033[0K\r"
- sleep 1
-done
-echo
-
-#Three Retries for getting On Boarding Result
-#count=0
-#while [ $count -lt 3 ]
-#do
-# OnBoardStatusResponse=$(curl -sS -X GET "http://$MSB_ADDR/openoapi/vnfsdk-marketplace/v1/PackageResource/csars/$UploadCsarId/onboardstatus?operTypeId=functiontest&operId=functestexec" -H "Accept: application/json" -H "Content-Type: application/json")
-# echo $OnBoardStatusResponse
-# if echo "$OnBoardStatusResponse" | grep -q "\"status\":0"; then
-# break;
-# else
-# if [ $count -eq 3 ]
-# then
-# echo "ON-BOARDING OPERATION FAILED !!!";
-# fi
-# count=`expr $count + 1`;
-# sleep 3;
-# fi
-#done
-echo "GET ON-BOARDING RESULT OPERATION SUCESS ";
-echo "##################### GETTING ON-BOARDING STATUS END #################";
-####################GET ON BOARD STATUS END############
-##########################################
-##########################################
-##########################################
-##########################################
-##########################################
-#################DOWNLOAD PACKAGE#########
-echo
-echo "############## DOWNLOADED PACKAGE FROM MARKET STARTED #################";
-PACKAGE_NAME=market_temp.csar
-curl -sS -X GET "http://$MSB_ADDR/openoapi/vnfsdk-marketplace/v1/PackageResource/csars/$UploadCsarId/files" > $PACKAGE_NAME
-fileSize=$(du -b $PACKAGE_NAME | cut -f 1)
-if [ $fileSize -eq 0 ]
-then
- echo "DOWNLOADED PACKAGE FROM MARKET NOT PROPER, ON-BOARDING OPERATION FAILED !!!";
- exit 1;
-fi
-echo "DOWNLOADED PACKAGE FROM MARKET OPERATION SUCESS !!!";
-echo "MARKET PACKAGE NAME:$PACKAGE_NAME"
-echo "##################### DOWNLOADED PACKAGE FROM MARKET ##################";
-###################DOWNLOAD PACKAGE END#####################
-##########################################
-##########################################
-##########################################
-##########################################
-##########CATALOUGE START#################
-echo
-PACKAGE_NAME=$CSAR_NAME
-#Check if common-tosca-catalog is registered with MSB or not
-#curl -sS -X GET http://$MSB_ADDR/api/microservices/v1/services/catalog/version/v1 -H "Accept: application/json" -H "Content-Type: application/json"
-#check if common-tosca-aria is registered with MSB or not
-#curl -sS -X GET http://$MSB_ADDR/api/microservices/v1/services/tosca/version/v1 -H "Accept: application/json" -H "Content-Type: application/json"
-#echo Sending POST request to Catalog
-CsarIdString=$(curl -sS -X POST -H "Content-Type: multipart/form-data; boundary=-WebKitFormBoundary7MA4YWxkTrZu0gW" -H "Cache-Control: no-cache" -H "Postman-Token: abcb6497-b225-c592-01be-e9ff460ca188" -F "file=@$PACKAGE_NAME" http://$MSB_ADDR/openoapi/catalog/v1/csars)
-#getting csarId from the output of curl request
-CsarId=$(echo ${CsarIdString:11:36})
-echo $CsarId
-echo $CsarIdString
-#csarid is sucessfully stored in CsarId variable
-echo "====finished======"
-##########CATALOUGE END############
-echo "DELETING PACAKE LOCAL COPY:$PACKAGE_NAME";
-#rm $PACKAGE_NAME;
--- /dev/null
+#!/bin/bash
+#
+# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 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.
+#
+# These scripts are sourced by run-csit.sh.
+
+VNFSDK_REFREPO_DOCKER_VERSION=latest
+
+#Start market place
+docker run -d -i -t --name refrepo -p 8702:8702 nexus3.onap.org:10001/onap/vnfsdk/refrepo:$VNFSDK_REFREPO_DOCKER_VERSION
+DOCKER_IP=`get-docker-network-ip.sh`
+
+# Wait for Market place initialization
+echo Wait for VNF Repository initialization
+# Active waiting with healthcheck and max retry count
+MAX_RETRY=30
+TRY=1
+while (( $(curl -s -o /dev/null -w ''%{http_code}'' ${DOCKER_IP}:8702/onapapi/vnfsdk-marketplace/v1/PackageResource/healthcheck) != 200 )) && (($TRY < $MAX_RETRY)); do
+ sleep 4
+ TRY=$[$TRY+1]
+done
+
+REFREPO_IP=`get-instance-ip.sh refrepo`
+
+# Get refrepo logs for easier debug in case of failure
+docker logs refrepo
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v REFREPO_IP:${REFREPO_IP}"
+echo ${ROBOT_VARIABLES}
#!/bin/bash
#
# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# This script is sourced by run-csit.sh after Robot test completion.
-
kill-instance.sh refrepo
-kill-instance.sh postgres
-
## Test suites are relative paths under [integration/csit.git]/tests/.
## Place the suites in run order.
-vnfsdk-marketplace/provision/sanity_test_vnfsdktestfunction.robot
+vnfsdk-refrepo/csar_validation_tests.robot
function on_exit(){
rc=$?
- rsync -av "$WORKDIR/" "$WORKSPACE/archives"
-
- # Record list of active docker containers
- docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log"
-
- # show memory consumption after all docker instances initialized
- docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt"
-
+ if [[ ${WORKSPACE} ]]; then
+ if [[ ${WORKDIR} ]]; then
+ rsync -av "$WORKDIR/" "$WORKSPACE/archives"
+ fi
+ # Record list of active docker containers
+ docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log"
+
+ # show memory consumption after all docker instances initialized
+ docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt"
+ fi
# Run teardown script plan if it exists
cd "${TESTPLANDIR}"
TEARDOWN="${TESTPLANDIR}/teardown.sh"
# 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.
+#
+# Modifications copyright (c) 2020 Samsung Electronics Co., Ltd.
+#
###############################################################################
-SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-echo $SCRIPTS
-
unset http_proxy https_proxy
-response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"input":{"dummy":"dummy"}}' http://localhost:8383/restconf/operations/SLI-API:healthcheck )
+response=$(curl --write-out '%{http_code}' --silent --output /dev/null -H "Authorization: Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==" -X POST -H "X-FromAppId: csit-sdnc" -H "X-TransactionId: csit-ccsdk" -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:8383/restconf/operations/SLI-API:healthcheck )
if [ "$response" == "200" ]; then
echo "CCSDK health check passed."
+++ /dev/null
-#!/bin/bash
-#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# 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.
-
-curl -v -X PUT -d @- http://$1:1080/expectation <<EOF
-{
- "httpRequest": {
- "method": "GET",
- "path": "/hello"
- },
- "httpResponse": {
- "body": "Hello world!",
- "statusCode": 200
- }
-}
-EOF
-
#!/bin/bash
-#
-# Copyright 2016-2017 Huawei Technologies Co., Ltd.
+# Copyright 2020 Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# 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.
-#
-
-kill-instance.sh i-mock
-
+ip a | grep docker | grep inet | awk '{print $2}' | awk -F'/' '{print $1}'
--- /dev/null
+{
+ "name":"OnapPfParameterGroup",
+ "restServerParameters": {
+ "host": "0.0.0.0",
+ "port": 6969,
+ "userName": "healthcheck",
+ "password": "zb!XztG34",
+ "https": true
+ },
+ "pdpStatusParameters":{
+ "pdpGroup": "defaultGroup",
+ "timeIntervalMs": 120000,
+ "pdpType":"apex",
+ "description":"Pdp Heartbeat",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.controlloop.operational.common.Apex",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.native.Apex",
+ "version": "1.0.0"
+ }
+ ]
+ },
+ "topicParameterGroup": {
+ "topicSources" : [{
+ "topic" : "POLICY-PDP-PAP",
+ "servers" : [ "policy.api.simpledemo.onap.org" ],
+ "topicCommInfrastructure" : "dmaap",
+ "useHttps" : true,
+ "allowSelfSignedCerts" : true
+ }],
+ "topicSinks" : [{
+ "topic" : "POLICY-PDP-PAP",
+ "servers" : [ "policy.api.simpledemo.onap.org" ],
+ "topicCommInfrastructure" : "dmaap",
+ "useHttps" : true,
+ "allowSelfSignedCerts" : true
+ }]
+ }
+}
"databaseDriver": "org.mariadb.jdbc.Driver",
"databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
"databaseUser": "policy_user",
- "databasePassword": "cG9saWN5X3VzZXI=",
+ "databasePassword": "policy_user",
"persistenceUnit": "PolicyMariaDb"
},
"topicParameterGroup": {
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-JAVA_HOME=/usr/local/openjdk-11
-POLICY_HOME=/opt/app/policy
-POLICY_LOGS=/var/log/onap
-KEYSTORE_PASSWD=Pol1cy_0nap
-TRUSTSTORE_PASSWD=Pol1cy_0nap
-
-JDBC_DRIVER=org.mariadb.jdbc.Driver
-JDBC_URL=jdbc:mariadb://mariadb:3306/onap_sdk?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
-JDBC_LOG_URL=jdbc:mariadb://mariadb:3306/log?connectTimeout=30000&socketTimeout=60000&log=true&sessionVariables=max_statement_time=30
-JDBC_USER=policy_user
-JDBC_PASSWORD=policy_user
-
-site_name=site_1
-fp_monitor_interval=30
-failed_counter_threshold=3
-test_trans_interval=20
-write_fpc_interval=5
-max_fpc_update_interval=60
-test_via_jmx=false
-jmx_fqdn=
-
-AAF_NAMESPACE=org.onap.policy
-AAF_HOST=aaf.api.simpledemo.onap.org
-
-ENVIRONMENT=TEST
-
-#Micro Service Model Properties
-policy_msOnapName=
-policy_msPolicyName=
+++ /dev/null
-#! /bin/bash
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-PROPS_BUILD="${POLICY_HOME}/etc/build.info"
-
-PROPS_RUNTIME="${POLICY_HOME}/servers/brmsgw/config.properties"
-PROPS_INSTALL="${POLICY_HOME}/install/servers/brmsgw/config.properties"
-
-
-if [ ! -f "${PROPS_BUILD}" ]; then
- echo "error: version information does not exist: ${PROPS_BUILD}"
- exit 1
-fi
-
-source "${POLICY_HOME}/etc/build.info"
-
-if [ -z "${version}" ]; then
- echo "error: no version information present"
- exit 1
-fi
-
-for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do
- if [ ! -f "${CONFIG}" ]; then
- echo "warning: configuration does not exist: ${CONFIG}"
- else
- sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}"
- fi
-done
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# BRMSpep component installation configuration parameters
-BRMSGW_JMX_PORT=9989
-
-COMPONENT_X_MX_MB=512
-COMPONENT_X_MS_MB=512
-
-REST_PAP_URL=https://pap:9091/pap/
-REST_PDP_ID=https://pdp:8081/pdp/
-
-PDP_HTTP_USER_ID=testpdp
-PDP_HTTP_PASSWORD=alpha123
-PDP_PAP_PDP_HTTP_USER_ID=testpap
-PDP_PAP_PDP_HTTP_PASSWORD=alpha123
-
-M2_HOME=/usr/share/java/maven-3
-snapshotRepositoryID=policy-nexus-snapshots
-snapshotRepositoryName=Snapshots
-snapshotRepositoryURL=http://nexus:8081/nexus/content/repositories/snapshots
-releaseRepositoryID=policy-nexus-releases
-releaseRepositoryName=Releases
-releaseRepositoryURL=http://nexus:8081/nexus/content/repositories/releases
-repositoryUsername=admin
-repositoryPassword=admin123
-UEB_URL=mr.api.simpledemo.onap.org
-UEB_TOPIC=PDPD-CONFIGURATION
-UEB_API_KEY=
-UEB_API_SECRET=
-
-groupID=org.onap.policy-engine
-artifactID=drlPDPGroup
-AMSTERDAM_GROUP_ID=org.onap.policy-engine.drools.amsterdam
-AMSTERDAM_ARTIFACT_ID=policy-amsterdam-rules
-
-# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
-resource_name=brmsgw_1
-node_type=brms_gateway
-
-#Environment should be Set either DEV, TEST or PROD
-ENVIRONMENT=TEST
-
-#Notification Properties... type can be either websocket, ueb, or dmaap
-BRMS_NOTIFICATION_TYPE=websocket
-BRMS_UEB_URL=mr.api.simpledemo.onap.org
-BRMS_UEB_TOPIC=PDPD-CONFIGURATION
-BRMS_UEB_DELAY=
-BRMS_CLIENT_ID=python
-BRMS_CLIENT_KEY=dGVzdA==
-BRMS_UEB_API_KEY=
-BRMS_UEB_API_SECRET=
-
-#Dependency.json file version
-BRMS_DEPENDENCY_VERSION=1.5.1
-BRMS_MODELS_DEPENDENCY_VERSION=2.1.2
-
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# configs component installation configuration parameters
-
-# tomcat specific parameters
-
-TOMCAT_JMX_PORT=9993
-TOMCAT_SHUTDOWN_PORT=8090
-SSL_HTTP_CONNECTOR_PORT=8443
-SSL_HTTP_CONNECTOR_REDIRECT_PORT=8443
-SSL_AJP_CONNECTOR_PORT=8383
-SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
-
-TOMCAT_X_MS_MB=2048
-TOMCAT_X_MX_MB=2048
-
-# ------------------ console properties ---------------------------
-
-#
-# Authorization Policy
-
-ROOT_POLICIES=admin
-ADMIN_FILE=Policy-Admin.xml
-
-
-# Set your domain here:
-
-REST_ADMIN_DOMAIN=com
-
-#
-# Location where the GIT repository is located
-#
-REST_ADMIN_REPOSITORY=repository
-
-#
-# Location where all the user workspaces are located.
-#
-REST_ADMIN_WORKSPACE=${{POLICY_HOME}}/servers/console/bin/workspace
-
-#
-# These can be set so the Admin Console knows who is logged on. Ideally, you can run the console in a J2EE
-# container and setup authentication as you please. Setting HttpSession attribute values will override these
-# values set in the properties files.
-#
-# ((HttpServletRequest) request).getSession().setAttribute("xacml.rest.admin.user.name", "Homer");
-#
-# The default policy: Policy-Admin.xml is extremely simple.
-#
-# You can test authorization within the Admin Console by changing the user id.
-# There are 3 supported user ids:
-# guest - Read only access
-# editor - Read/Write access
-# admin - Read/Write/Admin access
-#
-# An empty or null value for xacml.rest.admin.user.id results in no access to the application at all.
-#
-# This is for development/demonstration purposes only. A production environment should provide authentication which is
-# outside the scope of this application. This application can be used to develop a XACML policy for user authorization
-# within this application.
-#
-
-REST_ADMIN_USER_NAME=Administrator
-REST_ADMIN_USER_ID=super-admin
-
-#
-#
-# Property to declare the max time frame for logs.
-#
-LOG_TIMEFRAME=30
-
-# Property to declare the number of visible rows for users in MicroService Policy
-COLUMN_COUNT=3
-
-# Dashboard refresh rate in miliseconds
-REFRESH_RATE=40000
-
-#
-# URL location for the PAP servlet.
-#
-
-
-REST_PAP_URL=https://pap:9091/pap/
-
-#
-# Config/Action Properties location.
-#
-
-REST_CONFIG_HOME=${{POLICY_HOME}}/servers/pap/webapps/Config/
-REST_ACTION_HOME=${{POLICY_HOME}}/servers/pap/webapps/Action/
-REST_CONFIG_URL=https://pap:9091/
-REST_CONFIG_WEBAPPS=${{POLICY_HOME}}/servers/pap/webapps/
-
-# PAP account information
-CONSOLE_PAP_HTTP_USER_ID=testpap
-CONSOLE_PAP_HTTP_PASSWORD=alpha123
-
-
-node_type=pap_admin
-resource_name=console_1
-
-# The (optional) period of time in seconds between executions of the integrity audit.
-# Value < 0 : Audit does not run (default value if property is not present = -1)
-# Value = 0 : Audit runs continuously
-# Value > 0 : The period of time in seconds between execution of the audit on a particular node
-integrity_audit_period_seconds=-1
-
-#Automatic Policy Distribution
-automatic_push=false
-
-#Diff of policies for Firewall feature
-FW_GETURL=
-FW_AUTHOURL=
-FW_PROXY=
-FW_PORT=
-
-#SMTP Server Details for Java Mail
-onap_smtp_host=
-onap_smtp_port=25
-onap_smtp_userName=
-onap_smtp_password=
-onap_smtp_emailExtension=
-onap_application_name=
-
-#-----------------------ONAP-PORTAL-Properties----------------------
-
-ONAP_REDIRECT_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm
-ONAP_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi
-ONAP_UEB_URL_LIST=
-ONAP_PORTAL_INBOX_NAME=
-ONAP_UEB_APP_KEY=
-ONAP_UEB_APP_SECRET=
-ONAP_UEB_APP_MAILBOX_NAME=
-APP_DISPLAY_NAME=ONAP Policy
-ONAP_SHARED_CONTEXT_REST_URL=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/context
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# elasticsearch
-
-ELK_JMX_PORT=9995
\ No newline at end of file
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# mysql scripts component installation configuration parameters
-
-# Path to mysql bin
-MYSQL_BIN=/usr/local/mysql/bin
-
+++ /dev/null
-#! /bin/bash
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# pap component installation configuration parameters
-
-# tomcat specific parameters
-
-TOMCAT_JMX_PORT=9990
-TOMCAT_SHUTDOWN_PORT=9405
-SSL_HTTP_CONNECTOR_PORT=9091
-SSL_AJP_CONNECTOR_PORT=8380
-SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
-
-TOMCAT_X_MS_MB=512
-TOMCAT_X_MX_MB=512
-
-# pap properties
-
-PAP_PDPS=${{POLICY_HOME}}/servers/pap/bin/pdps
-PAP_URL=https://pap:9091/pap/
-
-PAP_INITIATE_PDP=true
-PAP_HEARTBEAT_INTERVAL=10000
-PAP_HEARTBEAT_TIMEOUT=10000
-
-REST_ADMIN_DOMAIN=com
-REST_ADMIN_REPOSITORY=repository
-REST_ADMIN_WORKSPACE=workspace
-
-# PDP related properties
-
-PAP_PDP_URL=https://pdp:8081/pdp/
-PAP_PDP_HTTP_USER_ID=testpdp
-PAP_PDP_HTTP_PASSWORD=alpha123
-
-PAP_HTTP_USER_ID=testpap
-PAP_HTTP_PASSWORD=alpha123
-
-#new values added 10-21-2015
-PROP_PAP_TRANS_WAIT=500000
-PROP_PAP_TRANS_TIMEOUT=5000
-PROP_PAP_AUDIT_TIMEOUT=300000
-PROP_PAP_RUN_AUDIT_FLAG=true
-PROP_PAP_AUDIT_FLAG=true
-
-PROP_PAP_INCOMINGNOTIFICATION_TRIES=4
-
-
-node_type=pap
-resource_name=pap_1
-dependency_groups=paplp_1
-test_via_jmx=true
-
-# The (optional) period of time in seconds between executions of the integrity audit.
-# Value < 0 : Audit does not run (default value if property is not present = -1)
-# Value = 0 : Audit runs continuously
-# Value > 0 : The period of time in seconds between execution of the audit on a particular node
-integrity_audit_period_seconds=-1
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# JVM specific parameters
-LOGPARSER_JMX_PORT=9996
-LOGPARSER_X_MS_MB=256
-LOGPARSER_X_MX_MB=256
-
-SERVER=https://pap:9091/pap/
-LOGPATH=/var/log/onap/policy/pap/pap-rest.log
-PARSERLOGPATH=${{POLICY_HOME}}/servers/paplp/bin/IntegrityMonitor.log
-
-node_type=logparser
-# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
-resource_name=paplp_1
+++ /dev/null
-#! /bin/bash
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# pdp component installation configuration parameters
-
-# tomcat specific parameters
-
-TOMCAT_JMX_PORT=9991
-TOMCAT_SHUTDOWN_PORT=8087
-SSL_HTTP_CONNECTOR_PORT=8081
-SSL_AJP_CONNECTOR_PORT=8381
-SSL_AJP_CONNECTOR_REDIRECT_PORT=8443
-
-TOMCAT_X_MS_MB=512
-TOMCAT_X_MX_MB=512
-
-# pdp properties
-
-UEB_CLUSTER=mr.api.simpledemo.onap.org
-
-REST_PAP_URL=https://pap:9091/pap/
-REST_PDP_ID=https://pdp:8081/pdp/
-REST_PDP_CONFIG=${{POLICY_HOME}}/servers/pdp/bin/config
-REST_PDP_WEBAPPS=${{POLICY_HOME}}/servers/pdp/webapps
-REST_PDP_REGISTER=true
-REST_PDP_REGISTER_SLEEP=15
-REST_PDP_REGISTER_RETRIES=-1
-REST_PDP_MAXCONTENT=999999999
-
-# PDP related properties
-PDP_HTTP_USER_ID=testpdp
-PDP_HTTP_PASSWORD=alpha123
-PDP_PAP_PDP_HTTP_USER_ID=testpap
-PDP_PAP_PDP_HTTP_PASSWORD=alpha123
-
-node_type=pdp_xacml
-resource_name=pdp_1
-dependency_groups=pdplp_1;brmsgw_1
-test_via_jmx=true
-
-#
-# Notification Properties
-# Notification type: websocket, ueb or dmaap... if left blank websocket is the default
-PDP_NOTIFICATION_TYPE=websocket
-PDP_UEB_CLUSTER=
-PDP_UEB_TOPIC=
-PDP_UEB_DELAY=
-PDP_UEB_API_KEY=
-PDP_UEB_API_SECRET=
-PDP_DMAAP_AAF_LOGIN=
-PDP_DMAAP_AAF_PASSWORD=
-
-#AAF Policy Name space
-#Required only, when we use AAF
-POLICY_AAF_NAMESPACE=
-POLICY_AAF_RESOURCE=
-
-# Indeterminate resolution
-DECISION_INDETERMINATE_RESPONSE=PERMIT
+++ /dev/null
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# JVM specific parameters
-LOGPARSER_JMX_PORT=9997
-LOGPARSER_X_MS_MB=256
-LOGPARSER_X_MX_MB=256
-
-SERVER=https://pdp:8081/pdp/
-LOGPATH=/var/log/onap/policy/pdpx/pdp-rest.log
-PARSERLOGPATH=${{POLICY_HOME}}/servers/pdplp/bin/IntegrityMonitor.log
-
-node_type=logparser
-# the java property is RESOURCE_NAME (uppercase), but the conf parameter is lowercase
-resource_name=pdplp_1
+++ /dev/null
-#! /bin/bash -x
-# Copyright 2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#########################################Upload BRMS Param Template##########################################
-
-echo "Upload BRMS Param Template"
-
-sleep 2
-
-wget -O cl-amsterdam-template.drl https://git.onap.org/policy/drools-applications/plain/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
-
-sleep 2
-
-curl -k -v --silent -X POST --header 'Content-Type: multipart/form-data' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -F "file=@cl-amsterdam-template.drl" -F "importParametersJson={\"serviceName\":\"ClosedLoopControlName\",\"serviceType\":\"BRMSPARAM\"}" 'https://pdp:8081/pdp/api/policyEngineImport'
-
-echo "PRELOAD_POLICIES is $PRELOAD_POLICIES"
-
-if [ "$PRELOAD_POLICIES" == "false" ]; then
- exit 0
-fi
-
-#########################################Create BRMS Param policies##########################################
-
-echo "Create BRMSParam Operational Policies"
-
-sleep 2
-
-echo "Create BRMSParamvFirewall Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamvFirewall",
- "policyDescription": "BRMS Param vFirewall policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a%0D%0A++trigger_policy%3A+unique-policy-id-1-modifyConfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-modifyConfig%0D%0A++++name%3A+modify+packet+gen+config%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+TBD+-+Cannot+be+known+until+instantiation+is+done%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create BRMSParamvDNS Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamvDNS",
- "policyDescription": "BRMS Param vDNS policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "controlLoopYaml": "controlLoop%3A%0A++version%3A+2.0.0%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0A++timeout%3A+1200%0A++abatement%3A+false%0Apolicies%3A%0A++-+id%3A+unique-policy-id-1-scale-up%0A++++name%3A+Create+a+new+VF+Module%0A++++description%3A%0A++++actor%3A+SO%0A++++recipe%3A+VF+Module+Create%0A++++target%3A%0A++++++type%3A+VNF%0A++++payload%3A%0A++++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D%27%0A++++++configurationParameters%3A+%27%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B9%5D%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B16%5D%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B23%5D%22%7D%5D%27%0A++++retry%3A+0%0A++++timeout%3A+1200%0A++++success%3A+final_success%0A++++failure%3A+final_failure%0A++++failure_timeout%3A+final_failure_timeout%0A++++failure_retries%3A+final_failure_retries%0A++++failure_exception%3A+final_failure_exception%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create BRMSParamVOLTE Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamVOLTE",
- "policyDescription": "BRMS Param VOLTE policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create BRMSParamvCPE Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamvCPE",
- "policyDescription": "BRMS Param vCPE policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create BRMSParamvPCI Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamvPCI",
- "policyDescription": "BRMS Param vPCI policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "casablanca"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+3.0.0%0D%0A++controlLoopName%3A+ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459%0D%0A++trigger_policy%3A+unique-policy-id-123-modifyconfig%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-123-modifyconfig%0D%0A++++name%3A+modify+PCI+config%0D%0A++++description%3A%0D%0A++++actor%3A+SDNR%0D%0A++++recipe%3A+ModifyConfig%0D%0A++++target%3A%0D%0A++++++%23+These+fields+are+not+used%0D%0A++++++resourceID%3A+Eace933104d443b496b8.nodes.heat.vpg%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+300%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create BRMSParamCCVPN Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyConfigType": "BRMS_PARAM",
- "policyName": "com.BRMSParamCCVPN",
- "policyDescription": "BRMS Param CCVPN policy",
- "policyScope": "com",
- "attributes": {
- "MATCHING": {
- "controller" : "amsterdam"
- },
- "RULE": {
- "templateName": "ClosedLoopControlName",
- "closedLoopControlName": "ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b",
- "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-#########################################Create Micro Service Config policies##########################################
-
-echo "Create MicroService Config Policies"
-
-sleep 2
-
-echo "Create MicroServicevFirewall Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",
- "policyConfigType": "MicroService",
- "policyName": "com.MicroServicevFirewall",
- "onapName": "DCAE"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-
-sleep 2
-
-echo "Create MicroServicevDNS Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevDNS\", \"description\": \"MicroService vDNS Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vLoadBalancer\", \"controlLoopSchemaType\": \"VM\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }",
- "policyConfigType": "MicroService",
- "policyName": "com.MicroServicevDNS",
- "onapName": "DCAE"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-
-sleep 2
-
-echo "Create MicroServicevCPE Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"Measurement_vGMUX\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ABATED\" }, { \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"GREATER\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }",
- "policyConfigType": "MicroService",
- "policyName": "com.MicroServicevCPE",
- "onapName": "DCAE"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-#########################################Create SDNC Naming Policies##########################################
-
-echo "Create SDNC Naming Policies"
-
-sleep 2
-
-echo "Create SDNC vFW Naming Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VFW_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vFW\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vFW\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}",
- "policyName": "SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP",
- "policyConfigType": "MicroService",
- "onapName": "SDNC",
- "riskLevel": "4",
- "riskType": "test",
- "guard": "false",
- "priority": "4",
- "description": "ONAP_VFW_NAMING_TIMESTAMP"
- }' 'https://pdp:8081/pdp/api/createPolicy'
-
- sleep 2
-
- echo "Create SDNC vPG Naming Policy"
- curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{\"service\":\"SDNC-GenerateName\",\"version\":\"CSIT\",\"content\":{\"policy-instance-name\":\"ONAP_VPG_NAMING_TIMESTAMP\",\"naming-models\":[{\"naming-properties\":[{\"property-name\":\"AIC_CLOUD_REGION\"},{\"property-name\":\"nfRole\"},{\"property-name\":\"TIMESTAMP\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNF\",\"nfRole\":\"vPG\",\"naming-recipe\":\"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"ENTIRETY\",\"start-value\":\"001\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}},{\"property-name\":\"NFC_NAMING_CODE\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"VNFC\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"},{\"property-name\":\"VF_MODULE_LABEL\"},{\"property-name\":\"VF_MODULE_TYPE\"},{\"property-name\":\"SEQUENCE\",\"increment-sequence\":{\"max\":\"zzz\",\"scope\":\"PRECEEDING\",\"start-value\":\"01\",\"length\":\"3\",\"increment\":\"1\",\"sequence-type\":\"alpha-numeric\"}}],\"naming-type\":\"VF-MODULE\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"}],\"naming-type\":\"KEY\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"protected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"protected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"},{\"naming-properties\":[{\"property-name\":\"VNF_NAME\"},{\"property-value\":\"unprotected\",\"property-name\":\"CONSTANT\"},{\"property-value\":\"_\",\"property-name\":\"DELIMITER\"}],\"naming-type\":\"unprotected_private_net_id\",\"nfRole\":\"vPG\",\"naming-recipe\":\"VNF_NAME|DELIMITER|CONSTANT\"}]}}",
- "policyName": "SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP",
- "policyConfigType": "MicroService",
- "onapName": "SDNC",
- "riskLevel": "4",
- "riskType": "test",
- "guard": "false",
- "priority": "4",
- "description": "ONAP_VPG_NAMING_TIMESTAMP"
- }' 'https://pdp:8081/pdp/api/createPolicy'
-
-#########################################Creating OOF PCI Policies##########################################
-sleep 2
-
-echo "Create MicroServicevPCI Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation_pci\", \"uuid\": \"test_pci\", \"policyName\": \"MicroServicevPCI\", \"description\": \"MicroService vPCI Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.executePolicy\", \"thresholdValue\": 1, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",
- "policyConfigType": "MicroService",
- "policyName": "com.MicroServicevPCI",
- "onapName": "DCAE"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create PCI MS Config Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyName": "com.PCIMS_CONFIG_POLICY",
- "configBody": "{ \"PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS\":60, \"PCI_MODCONFIG_POLICY_NAME\":\"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF\":\"OOF-PCI-OPTIMIZATION\", \"PCI_SDNR_TARGET_NAME\":\"SDNR\" }",
- "policyType": "Config",
- "attributes" : { "matching" : { "key1" : "value1" } },
- "policyConfigType": "Base",
- "onapName": "DCAE",
- "configName": "PCIMS_CONFIG_POLICY",
- "configBodyType": "JSON"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Create OOF Config Policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyName": "com.OOF_PCI_CONFIG_POLICY",
- "configBody": "{ \"ALGO_CATEGORY\":\"OOF-PCI-OPTIMIZATION\", \"PCI_OPTMIZATION_ALGO_NAME\":\"OOF-PCI-OPTIMIZATION-LEVEL1\", \"PCI_OPTIMIZATION_NW_CONSTRAINT\":\"MAX5PCICHANGESONLY\", \"PCI_OPTIMIZATION_PRIORITY\": 2, \"PCI_OPTIMIZATION_TIME_CONSTRAINT\":\"ONLYATNIGHT\" }",
- "attributes" : { "matching" : { "key1" : "value1" } },
- "policyType": "Config",
- "policyConfigType": "Base",
- "onapName": "DCAE",
- "configName": "OOF_PCI_CONFIG_POLICY",
- "configBodyType": "JSON"
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-#########################################Creating Decision Guard policies#########################################
-
-sleep 2
-
-echo "Creating Decision Guard policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyClass": "Decision",
- "policyName": "com.AllPermitGuard",
- "policyDescription": "Testing all Permit YAML Guard Policy",
- "onapName": "PDPD",
- "ruleProvider": "GUARD_YAML",
- "attributes": {
- "MATCHING": {
- "actor": ".*",
- "recipe": ".*",
- "targets": ".*",
- "clname": ".*",
- "limit": "10",
- "timeWindow": "1",
- "timeUnits": "minute",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Creating Decision vDNS Guard - Frequency Limiter policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyClass": "Decision",
- "policyName": "com.vDNS_Frequency",
- "policyDescription": "Limit vDNS Scale Up over time period",
- "onapName": "PDPD",
- "ruleProvider": "GUARD_YAML",
- "attributes": {
- "MATCHING": {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "limit": "1",
- "timeWindow": "10",
- "timeUnits": "minute",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-sleep 2
-
-echo "Creating Decision vDNS Guard - Min/Max policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "policyClass": "Decision",
- "policyName": "com.vDNS_MinMax",
- "policyDescription": "Ensure number of instances within a range",
- "onapName": "SampleDemo",
- "ruleProvider": "GUARD_MIN_MAX",
- "attributes": {
- "MATCHING": {
- "actor": "SO",
- "recipe": "scaleOut",
- "targets": ".*",
- "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
- "min": "1",
- "max": "5",
- "guardActiveStart": "00:00:01-05:00",
- "guardActiveEnd": "23:59:59-05:00"
- }
- }
-}' 'https://pdp:8081/pdp/api/createPolicy'
-
-#########################################Push Decision policy#########################################
-
-sleep 2
-
-echo "Push Decision policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.AllPermitGuard",
- "policyType": "DECISION"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "Push Decision policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.vDNS_Frequency",
- "policyType": "DECISION"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "Push Decision policy"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.vDNS_MinMax",
- "policyType": "DECISION"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-#########################################Pushing BRMS Param policies##########################################
-
-echo "Pushing BRMSParam Operational policies"
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamvFirewall"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamvFirewall",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamvDNS"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamvDNS",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamVOLTE"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamVOLTE",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamvCPE"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamvCPE",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamvPCI"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamvPCI",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 2
-
-echo "pushPolicy : PUT : com.BRMSParamCCVPN"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.BRMSParamCCVPN",
- "policyType": "BRMS_Param"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-#########################################Pushing MicroService Config policies##########################################
-
-echo "Pushing MicroService Config policies"
-
-sleep 2
-
-echo "pushPolicy : PUT : com.MicroServicevFirewall"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.MicroServicevFirewall",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 10
-
-echo "pushPolicy : PUT : com.MicroServicevDNS"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.MicroServicevDNS",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 10
-
-echo "pushPolicy : PUT : com.MicroServicevCPE"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.MicroServicevCPE",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-#########################################Pushing SDNC Naming Policies##########################################
-echo "Pushing SDNC Naming Policies"
-
-sleep 2
-
-echo "pushPolicy : PUT : SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "SDNC_Policy.ONAP_VFW_NAMING_TIMESTAMP",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 10
-
-echo "pushPolicy : PUT : SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "SDNC_Policy.ONAP_VPG_NAMING_TIMESTAMP",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-
-#########################################Pushing OOF PCI Policies##########################################
-sleep 10
-
-echo "pushPolicy : PUT : com.MicroServicevPCI"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.MicroServicevPCI",
- "policyType": "MicroService"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 10
-
-echo "pushPolicy : PUT : com.PCIMS_CONFIG_POLICY"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.PCIMS_CONFIG_POLICY",
- "policyType": "Base"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
-
-sleep 10
-
-echo "pushPolicy : PUT : com.OOF_PCI_CONFIG_POLICY"
-curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
- "pdpGroup": "default",
- "policyName": "com.OOF_PCI_CONFIG_POLICY",
- "policyType": "Base"
-}' 'https://pdp:8081/pdp/api/pushPolicy'
{
"dmaapProvider": {
"name": "DMaaP simulator",
- "topicSweepSec": 300,
- "restServerParameters": { }
+ "topicSweepSec": 300
},
"restServers": [
{
"sink": "APPC-LCM-WRITE",
"source": "APPC-LCM-READ"
}
- ]
+ ],
+ "grpcServer": {
+ "name": "CDS simulator",
+ "providerClass": "org.onap.policy.simulators.CdsSimulator",
+ "host": "0.0.0.0",
+ "port": 6680,
+ "timeout": 30,
+ "username": "ccsdkapps",
+ "password": "ccsdkapps",
+ "resourceLocation": "org/onap/policy/simulators/cds/",
+ "successRepeatCount": 0,
+ "requestedResponseDelayMs": 0
+ }
}
--- /dev/null
+# ============LICENSE_START====================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+SCRIPTS="${SCRIPTS-scripts}"
+
+source ${SCRIPTS}/policy/config/policy-csit.conf
+export POLICY_MARIADB_VER
+
+echo POLICY_MARIADB_VER=${POLICY_MARIADB_VER}
+
+POLICY_MODELS_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_MODELS_VERSION=${POLICY_MODELS_VERSION}
+
+POLICY_API_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/api/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_API_VERSION=${POLICY_API_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_API_VERSION=${POLICY_API_VERSION}
+
+POLICY_PAP_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/pap/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_PAP_VERSION=${POLICY_PAP_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_PAP_VERSION=${POLICY_PAP_VERSION}
+
+POLICY_XACML_PDP_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/xacml-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_XACML_PDP_VERSION=${POLICY_XACML_PDP_VERSION}
+
+POLICY_DROOLS_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/drools-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_DROOLS_VERSION=${POLICY_DROOLS_VERSION}
+
+POLICY_DROOLS_APPS_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/drools-applications/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_DROOLS_APPS_VERSION=${POLICY_DROOLS_APPS_VERSION}
+
+POLICY_APEX_PDP_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/apex-pdp/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_APEX_PDP_VERSION=${POLICY_APEX_PDP_VERSION}
+
+POLICY_DISTRIBUTION_VERSION=$(
+ curl -q --silent \
+ https://git.onap.org/policy/distribution/plain/pom.xml?h=${GERRIT_BRANCH} |
+ xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)
+export POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION:0:3}-SNAPSHOT-latest
+echo POLICY_DISTRIBUTION_VERSION=${POLICY_DISTRIBUTION_VERSION}
--- /dev/null
+#
+# ===========LICENSE_START====================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=====================================================
+#
+version: '2'
+services:
+ mariadb:
+ image: mariadb:${POLICY_MARIADB_VER}
+ container_name: mariadb
+ hostname: mariadb
+ command: ['--lower-case-table-names=1', '--wait_timeout=28800']
+ env_file: config/db/db.conf
+ volumes:
+ - ./config/db:/docker-entrypoint-initdb.d:ro
+ expose:
+ - 3306
+ policy.api.simpledemo.onap.org:
+ image: nexus3.onap.org:10001/onap/policy-models-simulator:${POLICY_MODELS_VERSION}
+ container_name: policy.api.simpledemo.onap.org
+ hostname: policy.api.simpledemo.onap.org
+ volumes:
+ - ./config/sim-all:/opt/app/policy/simulators/etc/mounted:ro
+ expose:
+ - 6666
+ - 6668
+ - 6669
+ - 6670
+ - 3905
+ api:
+ image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
+ container_name: policy-api
+ depends_on:
+ - mariadb
+ hostname: policy-api
+ expose:
+ - 6969
+ volumes:
+ - ./wait_for_port.sh:/opt/app/policy/api/bin/wait_for_port.sh:ro
+ entrypoint: ./wait_for_port.sh
+ command: [
+ '-c', 'bash ./policy-api.sh',
+ 'mariadb', '3306'
+ ]
+ pap:
+ image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
+ container_name: policy-pap
+ depends_on:
+ - mariadb
+ - policy.api.simpledemo.onap.org
+ - api
+ hostname: policy-pap
+ expose:
+ - 6969
+ volumes:
+ - ./config/pap/defaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
+ - ./wait_for_port.sh:/opt/app/policy/pap/bin/wait_for_port.sh:ro
+ entrypoint: ./wait_for_port.sh
+ command: [
+ '-c', 'bash ./policy-pap.sh',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905',
+ 'api', '6969'
+ ]
+ xacml-pdp:
+ image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION}
+ container_name: policy-xacml-pdp
+ depends_on:
+ - mariadb
+ - policy.api.simpledemo.onap.org
+ - pap
+ hostname: policy-xacml-pdp
+ expose:
+ - 6969
+ volumes:
+ - ./config/xacml-pdp/defaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
+ - ./wait_for_port.sh:/opt/app/policy/pdpx/bin/wait_for_port.sh:ro
+ entrypoint: ./wait_for_port.sh
+ command: [
+ '-c', 'bash ./policy-pdpx.sh',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905',
+ 'pap', '6969'
+ ]
+ drools:
+ image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_VERSION}
+ container_name: drools
+ depends_on:
+ - mariadb
+ - policy.api.simpledemo.onap.org
+ - pap
+ hostname: drools
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools/custom:/tmp/policy-install/config:ro
+ - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+ env_file:
+ - config/drools/env/base.conf
+ entrypoint: /opt/app/policy/bin/wait_for_port.sh
+ command: [
+ '-c', '/opt/app/policy/bin/pdpd-entrypoint.sh boot',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905'
+ ]
+ drools-apps:
+ image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION}
+ container_name: drools-apps
+ depends_on:
+ - mariadb
+ - policy.api.simpledemo.onap.org
+ - pap
+ - xacml-pdp
+ hostname: drools-apps
+ expose:
+ - 6969
+ - 9696
+ volumes:
+ - ./config/drools-apps/custom:/tmp/policy-install/config:ro
+ - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+ env_file:
+ - config/drools-apps/env/base.conf
+ - config/drools-apps/env/feature-healthcheck.conf
+ - config/drools-apps/env/feature-pooling-dmaap.conf
+ entrypoint: /opt/app/policy/bin/wait_for_port.sh
+ command: [
+ '-c', '/opt/app/policy/bin/pdpd-cl-entrypoint.sh boot',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905',
+ 'pap', '6969',
+ 'policy.api.simpledemo.onap.org', '6666',
+ 'policy.api.simpledemo.onap.org', '6668',
+ 'policy.api.simpledemo.onap.org', '6669',
+ 'policy.api.simpledemo.onap.org', '6670'
+ ]
+ apex-pdp:
+ image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
+ container_name: policy-apex-pdp
+ depends_on:
+ - mariadb
+ - policy.api.simpledemo.onap.org
+ - pap
+ hostname: policy-apex-pdp
+ expose:
+ - 6969
+ - 23324
+ volumes:
+ - ./config/apex-pdp/OnapPfConfig.json:/opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json:ro
+ - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+ entrypoint: /opt/app/policy/bin/wait_for_port.sh
+ command: [
+ '-c', '/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /opt/app/policy/apex-pdp/etc/onappf/config/OnapPfConfig.json',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905',
+ 'pap', '6969'
+ ]
+ distribution:
+ image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION}
+ container_name: policy-distribution
+ depends_on:
+ - mariadb
+ - api
+ - pap
+ - apex-pdp
+ hostname: policy-distribution
+ volumes:
+ - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json:ro
+ - ./policy-distribution/config/distribution/temp/:/opt/app/policy/distribution/etc/temp/:ro
+ - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+ entrypoint: /opt/app/policy/bin/wait_for_port.sh
+ command: [
+ '-c', './policy-dist.sh',
+ 'mariadb', '3306',
+ 'policy.api.simpledemo.onap.org', '3905',
+ 'pap', '6969',
+ 'apex-pdp', '6969'
+ ]
+++ /dev/null
-# Copyright 2019-2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d
- expose:
- - 3306
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
- expose:
- - 6969
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- hostname: policy-wait
- command: mariadb:3306
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - api
- hostname: policy-wait-all
- command:
- mariadb:3306
- api:6969
+++ /dev/null
-# Copyright 2018-2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file:
- - ${WORKSPACE}/scripts/policy/config/db/db.conf
- volumes:
- - ${WORKSPACE}/scripts/policy/config/db:/docker-entrypoint-initdb.d
- expose:
- - 3306
- nexus:
- image: sonatype/nexus:2.14.8-01
- container_name: nexus
- hostname: nexus
- expose:
- - 8081
- drools:
- image: nexus3.onap.org:10001/onap/policy-drools:${POLICY_DROOLS_VERSION}
- container_name: drools
- depends_on:
- - mariadb
- - nexus
- hostname: drools
- expose:
- - 6969
- - 9696
- volumes:
- - ${WORKSPACE}/scripts/policy/config/drools/custom:/tmp/policy-install/config
- env_file:
- - ${WORKSPACE}/scripts/policy/config/drools/env/base.conf
+++ /dev/null
-# Copyright 2018 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file:
- - ${WORKSPACE}/scripts/policy/config/db/db.conf
- volumes:
- - ${WORKSPACE}/scripts/policy/config/db:/docker-entrypoint-initdb.d
- expose:
- - 3306
- nexus:
- image: sonatype/nexus:2.14.8-01
- container_name: nexus
- hostname: nexus
- pap:
- image: nexus3.onap.org:10001/onap/policy-pe:${POLICY_ENGINE_VERSION}
- environment:
- - PRELOAD_POLICIES=${PRELOAD_POLICIES}
- container_name: pap
- depends_on:
- - mariadb
- hostname: pap
- expose:
- - 8443
- - 9091
- command: pap
- volumes:
- - ${WORKSPACE}/scripts/policy/config/pe:/tmp/policy-install/config
- pdp:
- image: nexus3.onap.org:10001/onap/policy-pe:${POLICY_ENGINE_VERSION}
- container_name: pdp
- depends_on:
- - pap
- hostname: pdp
- expose:
- - 8081
- command: pdp
- volumes:
- - ./config/pe:/tmp/policy-install/config
- brmsgw:
- image: nexus3.onap.org:10001/onap/policy-pe:${POLICY_ENGINE_VERSION}
- container_name: brmsgw
- depends_on:
- - pap
- hostname: brmsgw
- command: brmsgw
- volumes:
- - ${WORKSPACE}/scripts/policy/config/pe:/tmp/policy-install/config
+++ /dev/null
-# Copyright 2019-2020 AT&T Intellectual Property. All rights reserved
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d
- expose:
- - 3306
- pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- hostname: policy-pap
- expose:
- - 6969
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
- expose:
- - 6969
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- hostname: policy-wait
- command: mariadb:3306
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - pap
- - api
- hostname: policy-wait-all
- command:
- mariadb:3306
- pap:6969
- api:6969
+++ /dev/null
-#
-# ===========LICENSE_START====================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: ../config/db/db.conf
- volumes:
- - ../config/db:/docker-entrypoint-initdb.d:ro
- expose:
- - 3306
- policy.api.simpledemo.onap.org:
- image: policy/simulators
- container_name: policy.api.simpledemo.onap.org
- hostname: policy.api.simpledemo.onap.org
- volumes:
- - ../config/sim-all:/opt/app/policy/simulators/etc/parameters:ro
- expose:
- - 6666
- - 6668
- - 6669
- - 6670
- - 3905
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
- expose:
- - 6969
- pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- hostname: policy-pap
- expose:
- - 6969
- volumes:
- - ./custom/papDefaultConfig.json:/opt/app/policy/pap/etc/defaultConfig.json:ro
- policy-xacml-pdp:
- image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION}
- container_name: policy-xacml-pdp
- depends_on:
- - mariadb
- - policy.api.simpledemo.onap.org
- hostname: policy-xacml-pdp
- expose:
- - 6969
- volumes:
- - ./custom/xacmlDefaultConfig.json:/opt/app/policy/pdpx/etc/defaultConfig.json:ro
- drools:
- image: nexus3.onap.org:10001/onap/policy-pdpd-cl:${POLICY_DROOLS_APPS_VERSION}
- container_name: drools
- depends_on:
- - mariadb
- - policy.api.simpledemo.onap.org
- hostname: drools
- expose:
- - 6969
- - 9696
- volumes:
- - ../config/drools-apps/custom:/tmp/policy-install/config:ro
- env_file:
- - ../config/drools-apps/env/base.conf
- - ../config/drools-apps/env/feature-healthcheck.conf
- - ../config/drools-apps/env/feature-pooling-dmaap.conf
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- - policy.api.simpledemo.onap.org
- hostname: policy-wait
- command:
- mariadb:3306
- policy.api.simpledemo.onap.org:6666
- policy.api.simpledemo.onap.org:6668
- policy.api.simpledemo.onap.org:6669
- policy.api.simpledemo.onap.org:6670
- policy.api.simpledemo.onap.org:3905
- start_pap:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 120
- container_name: policy-wait-pap
- depends_on:
- - mariadb
- - policy.api.simpledemo.onap.org
- - pap
- hostname: policy-wait-pap
- command:
- mariadb:3306
- policy.api.simpledemo.onap.org:3905
- pap:6969
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 120
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - policy.api.simpledemo.onap.org
- - api
- - pap
- - policy-xacml-pdp
- - drools
- hostname: policy-wait-all
- command:
- mariadb:3306
- policy.api.simpledemo.onap.org:6666
- policy.api.simpledemo.onap.org:6668
- policy.api.simpledemo.onap.org:6669
- policy.api.simpledemo.onap.org:6670
- policy.api.simpledemo.onap.org:3905
- api:6969
- pap:6969
- drools:6969
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
+#!/bin/bash
+#
+# ============LICENSE_START===================================================
+# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+# ============================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 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=====================================================
#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-MYSQL_ROOT_PASSWORD=secret
-MYSQL_USER=policy_user
-MYSQL_PASSWORD=policy_user
\ No newline at end of file
+
+source ${SCRIPTS}/policy/config/policy-csit.conf
+
+rm -rf ${WORKSPACE}/models
+mkdir ${WORKSPACE}/models
+cd ${WORKSPACE}
+
+# download models examples
+git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
+++ /dev/null
-# 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.
-MYSQL_ROOT_PASSWORD=secret
-MYSQL_USER=policy_user
-MYSQL_PASSWORD=policy_user
+++ /dev/null
-#!/bin/bash -xv
-# 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.
-
-for db in policyadmin
-do
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
-done
-
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
+++ /dev/null
-# 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.
-version: '2'
-networks:
- default:
- driver: bridge
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d
- ports:
- - "3306:3306"
- message-router:
- image: dmaap/simulator
- container_name: dmaap-simulator
- hostname: dmaap-simulator
- ports:
- - "3904:3904"
- pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- - message-router
- hostname: policy-pap
-
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
- apex:
- image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
- container_name: policy-apex-pdp
- depends_on:
- - mariadb
- - 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']
-
- ports:
- - "6969:6969"
- - "23324:23324"
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- - message-router
- hostname: policy-wait
- command:
- mariadb:3306
- message-router:3904
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - message-router
- - api
- - pap
- - apex
- hostname: policy-wait-all
- command:
- mariadb:3306
- message-router:3904
- api:6969
- pap:6969
- apex:6969
+++ /dev/null
-# 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.
-MYSQL_ROOT_PASSWORD=secret
-MYSQL_USER=policy_user
-MYSQL_PASSWORD=policy_user
+++ /dev/null
-#!/bin/bash -xv
-# 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.
-
-for db in policyadmin
-do
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
-done
-
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
+++ /dev/null
-# 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.
-version: '2'
-networks:
- default:
- driver: bridge
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d
- ports:
- - "3306:3306"
- message-router:
- image: dmaap/simulator
- container_name: dmaap-simulator
- hostname: dmaap-simulator
- ports:
- - "3904:3904"
- policy-pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- - message-router
- hostname: policy-pap
-
-
- policy-api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
-
-
- distribution:
- image: nexus3.onap.org:10001/onap/policy-distribution:${POLICY_DISTRIBUTION_VERSION}
- container_name: policy-distribution
- hostname: policy-distribution
- volumes:
- - ./config/distribution/defaultConfig.json:/opt/app/policy/distribution/etc/defaultConfig.json
- - ./config/distribution/temp/:/opt/app/policy/distribution/etc/temp/
- depends_on:
- - mariadb
- - message-router
- - policy-pap
- - policy-api
- - apex
-
- apex:
- image: nexus3.onap.org:10001/onap/policy-apex-pdp:${POLICY_APEX_PDP_VERSION}
- container_name: policy-apex-pdp
- depends_on:
- - mariadb
- - message-router
- - policy-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']
- ports:
- - "6969:6969"
- - "23324:23324"
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- - message-router
- hostname: policy-wait
- command:
- mariadb:3306
- message-router:3904
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - message-router
- - policy-api
- - policy-pap
- - apex
- - distribution
- hostname: policy-wait-all
- command:
- mariadb:3306
- message-router:3904
- policy-api:6969
- policy-pap:6969
- apex:6969
- distribution:6969
+++ /dev/null
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-source ${SCRIPTS}/policy/config/policy-csit.conf
-
-rm -rf ${WORKSPACE}/dmaap-sim
-mkdir ${WORKSPACE}/dmaap-sim
-cd ${WORKSPACE}/dmaap-sim
-
-POLICY_MODELS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_MODELS_VERSION="${POLICY_MODELS_VERSION_EXTRACT}"
-echo ${POLICY_MODELS_VERSION}
-
-# download dmaap tarball and build docker image
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
-cd models/models-sim/models-sim-dmaap
-item=`curl --silent -L ${NEXUS_URL}/org/onap/policy/models/sim/policy-models-sim-dmaap/${POLICY_MODELS_VERSION} | egrep 'policy-models-sim-dmaap-.*tarball' | cut '-d"' -f2 | egrep 'gz$' | sort | tail -1`
-mkdir target
-curl -L $item -o target/policy-models-sim-dmaap-${POLICY_MODELS_VERSION}-tarball.tar.gz
-bash ./src/main/package/docker/docker_build.sh
-cd ${WORKSPACE}
+++ /dev/null
-#!/bin/bash
-#
-# ============LICENSE_START===================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-# ============================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ============LICENSE_END=====================================================
-#
-
-source ${SCRIPTS}/policy/config/policy-csit.conf
-
-rm -rf ${WORKSPACE}/simulators
-mkdir ${WORKSPACE}/simulators
-cd ${WORKSPACE}/simulators
-
-POLICY_MODELS_VERSION_EXTRACT="$(curl -q --silent https://git.onap.org/policy/models/plain/pom.xml?h=${GERRIT_BRANCH} | xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' -)"
-export POLICY_MODELS_VERSION="${POLICY_MODELS_VERSION_EXTRACT}"
-echo ${POLICY_MODELS_VERSION}
-
-# download simulators tarball and build docker image
-git clone --depth 1 https://gerrit.onap.org/r/policy/models -b ${GERRIT_BRANCH}
-cd models/models-sim/policy-models-simulators
-item=`curl --silent -L ${NEXUS_URL}/org/onap/policy/models/sim/policy-models-simulators/${POLICY_MODELS_VERSION} | egrep 'policy-models-simulators-.*tarball' | cut '-d"' -f2 | egrep 'gz$' | sort | tail -1`
-mkdir target
-curl -L $item -o target/policy-models-simulators-${POLICY_MODELS_VERSION}-tarball.tar.gz
-bash ./src/main/package/docker/docker_build.sh
-
-cd ${WORKSPACE}
+++ /dev/null
-#!/bin/bash -xv
-# ============LICENSE_START=======================================================
-# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-for db in policyadmin operationshistory
-do
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};"
- mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;"
-done
-
-mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;"
+++ /dev/null
-# ============LICENSE_START=======================================================
-# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-version: '2'
-services:
- mariadb:
- image: mariadb:${POLICY_MARIADB_VER}
- container_name: mariadb
- hostname: mariadb
- command: ['--lower-case-table-names=1', '--wait_timeout=28800']
- env_file: config/db/db.conf
- volumes:
- - ./config/db:/docker-entrypoint-initdb.d
- expose:
- - 3306
- message-router:
- image: dmaap/simulator
- container_name: dmaap-simulator
- hostname: dmaap-simulator
- expose:
- - 3904
- pap:
- image: nexus3.onap.org:10001/onap/policy-pap:${POLICY_PAP_VERSION}
- container_name: policy-pap
- depends_on:
- - mariadb
- - message-router
- hostname: policy-pap
- api:
- image: nexus3.onap.org:10001/onap/policy-api:${POLICY_API_VERSION}
- container_name: policy-api
- depends_on:
- - mariadb
- hostname: policy-api
- xacml-pdp:
- image: nexus3.onap.org:10001/onap/policy-xacml-pdp:${POLICY_XACML_PDP_VERSION}
- container_name: policy-xacml-pdp
- depends_on:
- - mariadb
- - message-router
- - pap
- hostname: policy-xacml-pdp
- expose:
- - 6969
- start_dependencies:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait
- depends_on:
- - mariadb
- - message-router
- hostname: policy-wait
- command:
- mariadb:3306
- message-router:3904
- start_all:
- image: dadarek/wait-for-dependencies
- environment:
- TIMEOUT_LENGTH: 60
- container_name: policy-wait-all
- depends_on:
- - mariadb
- - message-router
- - api
- - pap
- - xacml-pdp
- hostname: policy-wait-all
- command:
- mariadb:3306
- message-router:3904
- api:6969
- pap:6969
- xacml-pdp:6969
#!/bin/bash
-if [[ $# -ne 2 ]]; then
- echo "Usage: wait-for-port hostname port" >&2
+tmout=120
+cmd=
+
+while getopts c:t: opt; do
+ case "$opt" in
+ c) cmd="$OPTARG" ;;
+ t) tmout="$OPTARG" ;;
+ esac
+done
+let nargs=$OPTIND-1
+shift $nargs
+
+let even_args=$#%2
+if [[ $# -lt 2 || $even_args -ne 0 ]]; then
+ echo "args: [-t timeout] [-c command] hostname1 port1 hostname2 port2 ..." >&2
exit 1
fi
-export host=$1
-export port=$2
+while [[ $# -ge 2 ]]; do
+ export host=$1
+ export port=$2
+ shift
+ shift
-echo "Waiting for $host port $port open"
-timeout 120 bash -c 'until nc -vz "$host" "$port"; do echo -n "."; sleep 1; done'
-rc=$?
+ echo "Waiting for $host port $port..."
+ timeout $tmout bash -c 'until nc -vz "$host" "$port"; do echo -n ".";
+ sleep 1; done'
+ rc=$?
-if [[ $rc != 0 ]]; then
+ if [[ $rc != 0 ]]; then
echo "$host port $port cannot be reached"
exit $rc
-fi
+ fi
+done
+
+$cmd
-echo "$host port $port is open"
exit 0
--- /dev/null
+#!/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.
+#
+
+#
+# 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
+#
+# DCAE plugin-related parts will also have to be refactored under dedicated
+# directories in the future
+#
+
+echo "This is ${WORKSPACE}/scripts/sdc-dcae-d/cleanup_sdc_workflow.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 workflow-frontend
+docker stop workflow-backend
+docker rm workflow-frontend
+docker rm workflow-backend
+
+#delete data folder
+
+sudo rm -rf ${WORKSPACE}/data/*
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+#
+# Constants:
+#
+
+WORKSPACE="${WORKSPACE:-}"
+SUCCESS=0
+FAILURE=1
+
+CS_PASSWORD="onap123#@!"
+SDC_USER="asdc_user"
+SDC_PASSWORD="Aa1234%^!"
+
+JETTY_BASE="/var/lib/jetty"
+SDC_CERT_DIR="onap/cert"
+
+RELEASE=latest
+
+LOCAL=false
+BE_DEBUG_PORT="--publish 4000:4000"
+FE_DEBUG_PORT="--publish 6000:6000"
+ONBOARD_DEBUG_PORT="--publish 4001:4001"
+CS_PORT=${CS_PORT:-9042}
+
+
+# Java Options:
+BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -Xmx1536m -Xms1536m"
+FE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=6000,server=y,suspend=n -Xmx256m -Xms256m"
+ONBOARD_BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n -Xmx1g -Xms1g"
+SIM_JAVA_OPTIONS=" -Xmx128m -Xms128m -Xss1m -Dlog4j.configuration=file:///${JETTY_BASE}/config/sdc-simulator/log4j.properties"
+API_TESTS_JAVA_OPTIONS="-Xmx512m -Xms512m"
+UI_TESTS_JAVA_OPTIONS="-Xmx1024m -Xms1024m"
+#Define this as variable, so it can be excluded in run commands on Docker for OSX, as /etc/localtime cant be mounted there.
+LOCAL_TIME_MOUNT_CMD="--volume /etc/localtime:/etc/localtime:ro"
+# If os is OSX, unset this, so /etc/localtime is not mounted, otherwise leave it be
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ LOCAL_TIME_MOUNT_CMD=""
+fi
+
+
+#
+# Functions:
+#
+
+
+function usage {
+ echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -sim|--simulator <Run-with-simulator>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -tad <run api tests with the default test suit>] [ -tu <run ui tests with the default test suit>] [ -h|--help ]"
+ echo "start dockers built locally example: docker_run.sh -l"
+ echo "start dockers built locally and simulator example: docker_run.sh -l -sim"
+ echo "start dockers, pull from onap nexus according to release and simulator example: docker_run.sh -r 1.5-STAGING-latest -sim"
+ echo "start dockers built locally and run api tests docker example: docker_run.sh -l -tad"
+ echo "start dockers built locally and run only the catalog be example: docker_run.sh -l -d sdc-BE "
+}
+#
+
+
+function cleanup {
+ echo "Performing old dockers cleanup"
+
+ if [ "$1" == "all" ] ; then
+ docker_ids=`docker ps -a | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit}|dcae" | awk '{print $1}'`
+ for X in ${docker_ids}
+ do
+ docker rm -f ${X}
+ done
+ else
+ echo "performing $1 docker cleanup"
+ tmp=`docker ps -a -q --filter="name=$1"`
+ if [[ ! -z "$tmp" ]]; then
+ docker rm -f ${tmp}
+ fi
+ fi
+}
+#
+
+
+function dir_perms {
+ mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
+ mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
+ mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport
+ mkdir -p ${WORKSPACE}/data/logs/ONBOARD/SDC/ONBOARD-BE
+ mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/target
+ mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport
+ mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/target
+ mkdir -p ${WORKSPACE}/data/logs/docker_logs
+ mkdir -p ${WORKSPACE}/data/logs/WS
+ echo "Creating dir '${WORKSPACE}/data/${SDC_CERT_DIR}'"
+ mkdir -p ${WORKSPACE}/data/${SDC_CERT_DIR}
+ chmod -R 777 ${WORKSPACE}/data/logs
+}
+#
+
+
+function docker_logs {
+ docker logs $1 > ${WORKSPACE}/data/logs/docker_logs/$1_docker.log
+}
+#
+
+
+#
+# Readiness Prob
+#
+
+function ready_probe {
+ docker exec $1 /var/lib/ready-probe.sh > /dev/null 2>&1
+ rc=$?
+ if [[ ${rc} == 0 ]]; then
+ echo DOCKER $1 start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function ready_probe_jetty {
+ docker exec $1 /var/lib/jetty/ready-probe.sh > /dev/null 2>&1
+ rc=$?
+ if [[ ${rc} == 0 ]]; then
+ echo DOCKER $1 start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function probe_docker {
+ MATCH=`docker logs --tail 30 $1 | grep "DOCKER STARTED"`
+ echo MATCH is -- ${MATCH}
+
+ if [ -n "$MATCH" ] ; then
+ echo DOCKER start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function probe_test_docker {
+ # This expected logging should be output by startup.sh of the
+ # respective test docker container
+ MATCH=`docker logs --tail 30 $1 | grep "Startup completed successfully"`
+ echo MATCH is -- ${MATCH}
+
+ if [ -n "$MATCH" ] ; then
+ echo TEST DOCKER start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+
+function probe_sim {
+ if lsof -Pi :8285 -sTCP:LISTEN -t >/dev/null ; then
+ echo "Already running"
+ return ${SUCCESS}
+ else
+ echo "Not running"
+ return ${FAILURE}
+ fi
+}
+#
+
+
+function monitor_docker {
+ DOCKER_NAME=$1
+ echo "Monitor ${DOCKER_NAME} Docker"
+ sleep 5
+ TIME_OUT=900
+ INTERVAL=20
+ TIME=0
+
+ while [ "$TIME" -lt "$TIME_OUT" ]; do
+
+ case ${DOCKER_NAME} in
+
+ sdc-cs)
+ ready_probe ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-BE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-FE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-onboard-BE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-api-tests)
+ probe_test_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+ sdc-ui-tests)
+ probe_test_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+ *)
+ probe_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+
+ esac
+
+ if [[ ${status} == ${SUCCESS} ]] ; then
+ break;
+ fi
+
+ echo "Sleep: ${INTERVAL} seconds before testing if ${DOCKER_NAME} DOCKER is up. Total wait time up now is: ${TIME} seconds. Timeout is: ${TIME_OUT} seconds"
+ sleep ${INTERVAL}
+ TIME=$(($TIME+$INTERVAL))
+ done
+
+ docker_logs ${DOCKER_NAME}
+
+ 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
+}
+#
+
+# healthCheck script used the secure connection to send request (https is always turn on)
+function healthCheck {
+
+ echo "BE Health Check:"
+ curl -k --noproxy "*" https://${IP}:8443/sdc2/rest/healthCheck
+
+ echo ""
+ echo ""
+ echo "FE Health Check:"
+ curl -k --noproxy "*" https://${IP}:9443/sdc1/rest/healthCheck
+
+
+ echo ""
+ echo ""
+ healthCheck_http_code=$(curl -k --noproxy "*" -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" https://${IP}:8443/sdc2/rest/v1/user/demo;)
+ if [[ ${healthCheck_http_code} != 200 ]]; then
+ echo "Error [${healthCheck_http_code}] while checking existence of user"
+ return ${healthCheck_http_code}
+ fi
+ echo "check user existence: OK"
+ return ${healthCheck_http_code}
+}
+#
+
+
+function command_exit_status {
+ status=$1
+ docker=$2
+ if [ "${status}" != "0" ] ; then
+ echo "[ ERROR ] Docker ${docker} run command exit with status [${status}]"
+ fi
+}
+#
+
+
+#
+# Run Containers
+#
+
+
+#Cassandra
+function sdc-cs {
+ DOCKER_NAME="sdc-cs"
+ echo "docker run sdc-cassandra..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-cassandra:${RELEASE}
+ fi
+ docker run -dit --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish ${CS_PORT}:${CS_PORT} ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while CS is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+#Cassandra-init
+function sdc-cs-init {
+ DOCKER_NAME="sdc-cs-init"
+ echo "docker run sdc-cassandra-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-cassandra-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --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 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-cassandra-init:${RELEASE} > /dev/null 2>&1
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+#Onboard Cassandra-init
+function sdc-cs-onboard-init {
+ DOCKER_NAME="sdc-cs-onboard-init"
+ echo "docker run sdc-cs-onboard-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env CS_HOST_PORT=${CS_PORT} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/home/sdc/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+#Back-End
+function sdc-BE {
+ DOCKER_NAME="sdc-BE"
+ echo "docker run sdc-backend..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-backend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${BE_DEBUG_PORT}
+ fi
+ docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:${JETTY_BASE}/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE}
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while BE is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# Back-End-Init
+function sdc-BE-init {
+ DOCKER_NAME="sdc-BE-init"
+ echo "docker run sdc-backend-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-backend-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+# Onboard Back-End
+function sdc-onboard-BE {
+ DOCKER_NAME="sdc-onboard-BE"
+ echo "docker run sdc-onboard-BE ..."
+# TODO Check the dir_perms action . do we need it here ??
+# dir_perms
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-onboard-backend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${ONBOARD_DEBUG_PORT}
+ fi
+ docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env SDC_CERT_DIR="${SDC_CERT_DIR}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:${JETTY_BASE}/onap/cert --volume ${WORKSPACE}/data/logs/ONBOARD:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:/${JETTY_BASE}/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while sdc-onboard-BE is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# Front-End
+function sdc-FE {
+ DOCKER_NAME="sdc-FE"
+ IMAGE_NAME="${PREFIX}/sdc-frontend:${RELEASE}"
+ echo "Running container '${DOCKER_NAME}' based on '${IMAGE_NAME}' image..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-frontend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${FE_DEBUG_PORT}
+ fi
+
+ PLUGIN_CONFIG_FILE="${WORKSPACE}/data/environments/plugins-configuration.yaml"
+ if [[ -f ${WORKSPACE}/data/environments/plugins-configuration.yaml ]]; then
+ PLUGINS_CONF_VOLUME_MOUNT="--volume ${PLUGIN_CONFIG_FILE}:${JETTY_BASE}/config/catalog-fe/plugins-configuration.yaml"
+ else
+ echo "INFO: '${PLUGIN_CONFIG_FILE}' not provided, ignoring..."
+ fi
+
+ docker run \
+ --detach \
+ --name ${DOCKER_NAME} \
+ --env HOST_IP=${IP} \
+ --env ENVNAME="${DEP_ENV}" \
+ --env JAVA_OPTIONS="${FE_JAVA_OPTIONS}" \
+ --log-driver=json-file \
+ --log-opt max-size=100m \
+ --log-opt max-file=10 \
+ --ulimit memlock=-1:-1 \
+ --ulimit nofile=4096:100000 \
+ --volume ${WORKSPACE}/data/logs/FE/:${JETTY_BASE}/logs \
+ --volume ${WORKSPACE}/data/environments:/${JETTY_BASE}/chef-solo/environments \
+ ${LOCAL_TIME_MOUNT_CMD} \
+ ${PLUGINS_CONF_VOLUME_MOUNT} \
+ --publish 9443:9443 \
+ --publish 8181:8181 \
+ ${ADDITIONAL_ARGUMENTS} \
+ ${IMAGE_NAME}
+
+ command_exit_status $? ${DOCKER_NAME}
+ echo "Please wait while '${DOCKER_NAME}' container is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# apis-sanity
+function sdc-api-tests {
+ if [[ ${RUN_API_TESTS} = true ]] ; then
+ healthCheck
+ healthCheck_http_code=$?
+ if [[ ${healthCheck_http_code} == 200 ]] ; then
+ echo "docker run sdc-api-tests..."
+ echo "Trigger sdc-api-tests docker, please wait..."
+
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-api-tests:${RELEASE}
+ fi
+
+ docker run --detach --name sdc-api-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${API_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${API_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-api-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-api-tests/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:/var/lib/tests/cert --publish 9560:9560 ${PREFIX}/sdc-api-tests:${RELEASE} echo "please wait while SDC-API-TESTS is starting....."
+ monitor_docker sdc-api-tests
+ fi
+ fi
+}
+#
+
+
+# ui-sanity
+function sdc-ui-tests {
+
+ if [[ ${RUN_UI_TESTS} = true ]] ; then
+ healthCheck
+ healthCheck_http_code=$?
+ if [[ ${healthCheck_http_code} == 200 ]]; then
+ echo "docker run sdc-ui-tets..."
+ echo "Trigger sdc-ui-tests docker, please wait..."
+
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-ui-tests:${RELEASE}
+ fi
+ RUN_SIMULATOR=true;
+ sdc-sim
+ docker run --detach --name sdc-ui-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${UI_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${UI_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-ui-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5901:5901 --publish 6901:6901 ${PREFIX}/sdc-ui-tests:${RELEASE}
+ echo "please wait while SDC-UI-TESTS is starting....."
+ monitor_docker sdc-ui-tests
+ fi
+ fi
+}
+#
+
+
+# SDC-Simulator
+function sdc-sim {
+ if [ "${RUN_SIMULATOR}" == true ]; then
+ echo "docker run sdc-webSimulator..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-simulator:${RELEASE}
+ fi
+
+ probe_sim
+ sim_stat=$?
+ if [ ${sim_stat} == 1 ]; then
+ docker run \
+ --detach \
+ --name sdc-sim \
+ --env FE_URL="${FE_URL}" \
+ --env JAVA_OPTIONS="${SIM_JAVA_OPTIONS}" \
+ --env ENVNAME="${DEP_ENV}" \
+ ${LOCAL_TIME_MOUNT_CMD} \
+ --volume ${WORKSPACE}/data/logs/WS/:${JETTY_BASE}/logs \
+ --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments \
+ --publish 8285:8080 \
+ --publish 8286:8443 ${PREFIX}/sdc-simulator:${RELEASE}
+ echo "please wait while SDC-WEB-SIMULATOR is starting....."
+ monitor_docker sdc-sim
+ fi
+ fi
+}
+#
+
+
+#
+# Main
+#
+
+# Handle command line arguments
+while [ $# -gt 0 ]; do
+ case $1 in
+
+ # -r | --release - The specific docker version to pull and deploy
+ -r | --release )
+ shift 1 ;
+ RELEASE=$1;
+ shift 1;;
+
+ # -e | --environment - The environment name you want to deploy
+ -e | --environment )
+ shift 1;
+ DEP_ENV=$1;
+ shift 1 ;;
+
+ # -p | --port - The port from which to connect to the docker nexus
+ -p | --port )
+ shift 1 ;
+ PORT=$1;
+ shift 1 ;;
+
+ # -l | --local - Use this for deploying your local dockers without pulling them first
+ -l | --local )
+ LOCAL=true;
+ shift 1;;
+
+ # -ta - Use this for running the APIs sanity docker after all other dockers have been deployed
+ -ta )
+ shift 1 ;
+ API_SUITE=$1;
+ RUN_API_TESTS=true;
+ shift 1 ;;
+
+ # -tu - Use this for running the UI sanity docker after all other dockers have been deployed
+ -tu )
+ shift 1 ;
+ UI_SUITE=$1;
+ RUN_UI_TESTS=true;
+ shift 1 ;;
+
+ # -tad - Use this for running the DEFAULT suite of tests in APIs sanity docker after all other dockers have been deployed
+ -tad | -t )
+ API_SUITE="onapApiSanity";
+ RUN_API_TESTS=true;
+ shift 1 ;;
+
+ # -tud - Use this for running the DEFAULT suite of tests in UI sanity docker after all other dockers have been deployed
+ -tud )
+ UI_SUITE="onapUiSanity";
+ RUN_UI_TESTS=true;
+ shift 1 ;;
+
+ # -d | --docker - The init specified docker
+ -d | --docker )
+ shift 1 ;
+ DOCKER=$1;
+ shift 1 ;;
+ # -sim | --simulator run the simulator
+ -sim | --simulator )
+ RUN_SIMULATOR=true;
+ shift 1 ;;
+ # -sim | --simulator run the simulator
+ -u | --fe_url )
+ shift 1 ;
+ FE_URL=$1;
+ shift 1 ;;
+
+ # -h | --help - Display the help message with all the available run options
+ -h | --help )
+ usage;
+ exit ${SUCCESS};;
+
+ * )
+ usage;
+ exit ${FAILURE};;
+ esac
+done
+
+
+#Prefix those with WORKSPACE so it can be set to something other than /opt
+[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt) || echo ${DEP_ENV}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat ${WORKSPACE}/opt/config/nexus_username.txt) || NEXUS_USERNAME=release
+[ -f ${WORKSPACE}/opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat ${WORKSPACE}/opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
+[ -f ${WORKSPACE}/opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat ${WORKSPACE}/opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+
+export IP=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+#If OSX, then use this to get IP
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ export IP=$(ipconfig getifaddr en0)
+fi
+export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
+
+if [ ${LOCAL} = true ]; then
+ PREFIX='onap'
+fi
+
+echo ""
+
+if [ -z "${DOCKER}" ]; then
+ cleanup all
+ dir_perms
+ sdc-cs
+ sdc-cs-init
+ sdc-cs-onboard-init
+ sdc-onboard-BE
+ sdc-BE
+ sdc-BE-init
+ sdc-FE
+ healthCheck
+ sdc-sim
+ sdc-api-tests
+ sdc-ui-tests
+else
+ cleanup ${DOCKER}
+ dir_perms
+ ${DOCKER}
+ healthCheck
+fi
--- /dev/null
+#!/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.
+#
+echo "[INFO] This is sdc_workflow_d.sh"
+# run sdc deployment
+source "${WORKSPACE}/scripts/sdc/setup_sdc_for_sanity.sh"
+export ROBOT_VARIABLES
+
+# fail quick if error
+set -exo pipefail
+
+export ENV_NAME='CSIT'
+
+function iss_true {
+ _value=$(eval echo "\$${1}" | tr '[:upper:]' '[:lower:]')
+
+ case "$_value" in
+ 1|yes|true|Y)
+ return 0
+ ;;
+ esac
+
+ return 1
+}
+
+# returns 0: if SDC_LOCAL_IMAGES is set to true value
+# returns 1: otherwise
+function using_local_workflow_images {
+ iss_true WORKFLOW_LOCAL_IMAGES
+}
+
+# cloning workflow directory
+mkdir -p "${WORKSPACE}/data/clone/"
+cd "${WORKSPACE}/data/clone"
+if using_local_workflow_images && [ -n "$WORKFLOW_LOCAL_GITREPO" ] ; then
+ WORKFLOW_LOCAL_GITREPO=$(realpath "$WORKFLOW_LOCAL_GITREPO")
+ if [ -d "$WORKFLOW_LOCAL_GITREPO" ] ; then
+ rm -rf ./workflow
+ cp -a "$WORKFLOW_LOCAL_GITREPO" ./workflow
+ else
+ echo "[ERROR]: Local git repo for workflow does not exist: ${WORKFLOW_LOCAL_GITREPO}"
+ exit 1
+ fi
+else
+ git clone --depth 1 "https://github.com/onap/sdc-sdc-workflow-designer.git" -b ${GERRIT_BRANCH}
+fi
+# set enviroment variables
+source ${WORKSPACE}/data/clone/workflow/version.properties
+export WORKFLOW_RELEASE=$major.$minor-STAGING-latest
+
+SDC_CS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sdc-cs)
+SDC_BE=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' sdc-BE)
+echo "[INFO] Initialization of workflow init"
+echo ${SDC_CS}
+echo ${SDC_BE}
+docker run -ti \
+ -e "CS_HOST=${SDC_CS}" \
+ -e "CS_PORT=9042" \
+ -e "CS_AUTHENTICATE=true"\
+ -e "CS_USER=asdc_user" \
+ -e "CS_PASSWORD=Aa1234%^!" nexus3.onap.org:10001/onap/sdc-workflow-init:latest
+
+echo "[INFO] Initialization of workflow Backend init"
+docker run -d --name "workflow-backend" -e "SDC_PROTOCOL=http" \
+ -e "SDC_ENDPOINT=${SDC_BE}:8080" \
+ -e "SDC_USER=workflow" \
+ -e "SDC_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" \
+ -e "CS_HOSTS=${SDC_CS}" \
+ -e "CS_PORT=9042" \
+ -e "CS_AUTHENTICATE=true"\
+ -e "CS_USER=asdc_user" \
+ -e "CS_PASSWORD=Aa1234%^!" \
+ -e "CS_SSL_ENABLED=false"\
+ -e "SERVER_SSL_ENABLED=false" \
+ --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --publish 8384:8080 --publish 10443:8443 --publish 8000:8000 nexus3.onap.org:10001/onap/sdc-workflow-backend:latest
+
+WORKFLOW_BE=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' workflow-backend)
+echo "[INFO] starting workflow designer fronend"
+docker run -d --name "workflow-frontend" \
+ -e BACKEND="http://${WORKFLOW_BE}:8080"\
+ --publish 8484:8080 --publish 11443:8443 nexus3.onap.org:10001/onap/sdc-workflow-frontend:latest
+
+cp "${WORKSPACE}/data/clone/sdc/sdc-os-chef/environments/plugins-configuration.yaml" \
+ "${WORKSPACE}/data/environments/plugins-configuration.yaml"
+
+WF_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' workflow-frontend)
+WFADDR="http:\/\/${WF_IP}:8080\/workflows"
+echo ${WFADDR}
+sed -i \
+ -e "s/<%= @workflow_discovery_url %>/${WFADDR}/g" \
+ -e "s/<%= @workflow_source_url %>/${WFADDR}/g" \
+ "${WORKSPACE}/data/environments/plugins-configuration.yaml"
+
+cp "${WORKSPACE}/data/clone/sdc/sdc-os-chef/scripts/docker_run.sh" "${WORKSPACE}/scripts/sdc-workflow-d/"
+
+echo "[INFO] restarting sdc-FE with updated plugin configuration file with Worflow host ip"
+docker stop sdc-FE
+"${WORKSPACE}/scripts/sdc-workflow-d/docker_run.sh" \
+ --local \
+ -e "${ENV_NAME}" \
+ -p 10001 -d sdc-FE
+# This file is sourced in another script which is out of our control...
+set +e
+set +o pipefail
--- /dev/null
+#!/bin/bash
+
+#
+# Constants:
+#
+
+WORKSPACE="${WORKSPACE:-}"
+SUCCESS=0
+FAILURE=1
+
+CS_PASSWORD="onap123#@!"
+SDC_USER="asdc_user"
+SDC_PASSWORD="Aa1234%^!"
+
+JETTY_BASE="/var/lib/jetty"
+SDC_CERT_DIR="onap/cert"
+
+RELEASE=latest
+
+LOCAL=false
+BE_DEBUG_PORT="--publish 4000:4000"
+FE_DEBUG_PORT="--publish 6000:6000"
+ONBOARD_DEBUG_PORT="--publish 4001:4001"
+CS_PORT=${CS_PORT:-9042}
+
+
+# Java Options:
+BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -Xmx1536m -Xms1536m"
+FE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=6000,server=y,suspend=n -Xmx256m -Xms256m"
+ONBOARD_BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n -Xmx1g -Xms1g"
+SIM_JAVA_OPTIONS=" -Xmx128m -Xms128m -Xss1m -Dlog4j.configuration=file:///${JETTY_BASE}/config/sdc-simulator/log4j.properties"
+API_TESTS_JAVA_OPTIONS="-Xmx512m -Xms512m"
+UI_TESTS_JAVA_OPTIONS="-Xmx1024m -Xms1024m"
+#Define this as variable, so it can be excluded in run commands on Docker for OSX, as /etc/localtime cant be mounted there.
+LOCAL_TIME_MOUNT_CMD="--volume /etc/localtime:/etc/localtime:ro"
+# If os is OSX, unset this, so /etc/localtime is not mounted, otherwise leave it be
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ LOCAL_TIME_MOUNT_CMD=""
+fi
+
+
+#
+# Functions:
+#
+
+
+function usage {
+ echo "usage: docker_run.sh [ -r|--release <RELEASE-NAME> ] [ -e|--environment <ENV-NAME> ] [ -p|--port <Docker-hub-port>] [ -l|--local <Run-without-pull>] [ -sim|--simulator <Run-with-simulator>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -ta <run api tests with the supplied test suit>] [ -tu <run ui tests with the supplied test suit>] [ -tad <run api tests with the default test suit>] [ -tu <run ui tests with the default test suit>] [ -h|--help ]"
+ echo "start dockers built locally example: docker_run.sh -l"
+ echo "start dockers built locally and simulator example: docker_run.sh -l -sim"
+ echo "start dockers, pull from onap nexus according to release and simulator example: docker_run.sh -r 1.5-STAGING-latest -sim"
+ echo "start dockers built locally and run api tests docker example: docker_run.sh -l -tad"
+ echo "start dockers built locally and run only the catalog be example: docker_run.sh -l -d sdc-BE "
+}
+#
+
+
+function cleanup {
+ echo "Performing old dockers cleanup"
+
+ if [ "$1" == "all" ] ; then
+ docker_ids=`docker ps -a | egrep "ecomp-nexus:${PORT}/sdc|sdc|Exit}|dcae" | awk '{print $1}'`
+ for X in ${docker_ids}
+ do
+ docker rm -f ${X}
+ done
+ else
+ echo "performing $1 docker cleanup"
+ tmp=`docker ps -a -q --filter="name=$1"`
+ if [[ ! -z "$tmp" ]]; then
+ docker rm -f ${tmp}
+ fi
+ fi
+}
+#
+
+
+function dir_perms {
+ mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
+ mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
+ mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport
+ mkdir -p ${WORKSPACE}/data/logs/ONBOARD/SDC/ONBOARD-BE
+ mkdir -p ${WORKSPACE}/data/logs/sdc-api-tests/target
+ mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport
+ mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/target
+ mkdir -p ${WORKSPACE}/data/logs/docker_logs
+ mkdir -p ${WORKSPACE}/data/logs/WS
+ echo "Creating dir '${WORKSPACE}/data/${SDC_CERT_DIR}'"
+ mkdir -p ${WORKSPACE}/data/${SDC_CERT_DIR}
+ chmod -R 777 ${WORKSPACE}/data/logs
+}
+#
+
+
+function docker_logs {
+ docker logs $1 > ${WORKSPACE}/data/logs/docker_logs/$1_docker.log
+}
+#
+
+
+#
+# Readiness Prob
+#
+
+function ready_probe {
+ docker exec $1 /var/lib/ready-probe.sh > /dev/null 2>&1
+ rc=$?
+ if [[ ${rc} == 0 ]]; then
+ echo DOCKER $1 start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function ready_probe_jetty {
+ docker exec $1 /var/lib/jetty/ready-probe.sh > /dev/null 2>&1
+ rc=$?
+ if [[ ${rc} == 0 ]]; then
+ echo DOCKER $1 start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function probe_docker {
+ MATCH=`docker logs --tail 30 $1 | grep "DOCKER STARTED"`
+ echo MATCH is -- ${MATCH}
+
+ if [ -n "$MATCH" ] ; then
+ echo DOCKER start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+function probe_test_docker {
+ # This expected logging should be output by startup.sh of the
+ # respective test docker container
+ MATCH=`docker logs --tail 30 $1 | grep "Startup completed successfully"`
+ echo MATCH is -- ${MATCH}
+
+ if [ -n "$MATCH" ] ; then
+ echo TEST DOCKER start finished in $2 seconds
+ return ${SUCCESS}
+ fi
+ return ${FAILURE}
+}
+#
+
+
+function probe_sim {
+ if lsof -Pi :8285 -sTCP:LISTEN -t >/dev/null ; then
+ echo "Already running"
+ return ${SUCCESS}
+ else
+ echo "Not running"
+ return ${FAILURE}
+ fi
+}
+#
+
+
+function monitor_docker {
+ DOCKER_NAME=$1
+ echo "Monitor ${DOCKER_NAME} Docker"
+ sleep 5
+ TIME_OUT=900
+ INTERVAL=20
+ TIME=0
+
+ while [ "$TIME" -lt "$TIME_OUT" ]; do
+
+ case ${DOCKER_NAME} in
+
+ sdc-cs)
+ ready_probe ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-BE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-FE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-onboard-BE)
+ ready_probe_jetty ${DOCKER_NAME} ${TIME} ;
+ status=$? ;
+ ;;
+ sdc-api-tests)
+ probe_test_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+ sdc-ui-tests)
+ probe_test_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+ *)
+ probe_docker ${DOCKER_NAME} ${TIME};
+ status=$? ;
+ ;;
+
+ esac
+
+ if [[ ${status} == ${SUCCESS} ]] ; then
+ break;
+ fi
+
+ echo "Sleep: ${INTERVAL} seconds before testing if ${DOCKER_NAME} DOCKER is up. Total wait time up now is: ${TIME} seconds. Timeout is: ${TIME_OUT} seconds"
+ sleep ${INTERVAL}
+ TIME=$(($TIME+$INTERVAL))
+ done
+
+ docker_logs ${DOCKER_NAME}
+
+ 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
+}
+#
+
+# healthCheck script used the secure connection to send request (https is always turn on)
+function healthCheck {
+
+ echo "BE Health Check:"
+ curl -k --noproxy "*" https://${IP}:8443/sdc2/rest/healthCheck
+
+ echo ""
+ echo ""
+ echo "FE Health Check:"
+ curl -k --noproxy "*" https://${IP}:9443/sdc1/rest/healthCheck
+
+
+ echo ""
+ echo ""
+ healthCheck_http_code=$(curl -k --noproxy "*" -o /dev/null -w '%{http_code}' -H "Accept: application/json" -H "Content-Type: application/json" -H "USER_ID: jh0003" https://${IP}:8443/sdc2/rest/v1/user/demo;)
+ if [[ ${healthCheck_http_code} != 200 ]]; then
+ echo "Error [${healthCheck_http_code}] while checking existence of user"
+ return ${healthCheck_http_code}
+ fi
+ echo "check user existence: OK"
+ return ${healthCheck_http_code}
+}
+#
+
+
+function command_exit_status {
+ status=$1
+ docker=$2
+ if [ "${status}" != "0" ] ; then
+ echo "[ ERROR ] Docker ${docker} run command exit with status [${status}]"
+ fi
+}
+#
+
+
+#
+# Run Containers
+#
+
+
+#Cassandra
+function sdc-cs {
+ DOCKER_NAME="sdc-cs"
+ echo "docker run sdc-cassandra..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-cassandra:${RELEASE}
+ fi
+ docker run -dit --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --env HOST_IP=${IP} --env MAX_HEAP_SIZE="1536M" --env HEAP_NEWSIZE="512M" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish ${CS_PORT}:${CS_PORT} ${PREFIX}/sdc-cassandra:${RELEASE} /bin/sh
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while CS is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+#Cassandra-init
+function sdc-cs-init {
+ DOCKER_NAME="sdc-cs-init"
+ echo "docker run sdc-cassandra-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-cassandra-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --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 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/root/chef-solo/cache ${PREFIX}/sdc-cassandra-init:${RELEASE} > /dev/null 2>&1
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+#Onboard Cassandra-init
+function sdc-cs-onboard-init {
+ DOCKER_NAME="sdc-cs-onboard-init"
+ echo "docker run sdc-cs-onboard-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env RELEASE="${RELEASE}" --env CS_HOST_IP=${IP} --env CS_HOST_PORT=${CS_PORT} --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env CS_PASSWORD="${CS_PASSWORD}" --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/CS:/var/lib/cassandra --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments --volume ${WORKSPACE}/data/CS-Init:/home/sdc/chef-solo/cache ${PREFIX}/sdc-onboard-cassandra-init:${RELEASE}
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+#Back-End
+function sdc-BE {
+ DOCKER_NAME="sdc-BE"
+ echo "docker run sdc-backend..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-backend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${BE_DEBUG_PORT}
+ fi
+ docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env JAVA_OPTIONS="${BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:${JETTY_BASE}/chef-solo/environments --publish 8443:8443 --publish 8080:8080 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-backend:${RELEASE}
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while BE is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# Back-End-Init
+function sdc-BE-init {
+ DOCKER_NAME="sdc-BE-init"
+ echo "docker run sdc-backend-init..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-backend-init:${RELEASE}
+ fi
+ docker run --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
+ rc=$?
+ docker_logs ${DOCKER_NAME}
+ if [[ ${rc} != 0 ]]; then exit ${rc}; fi
+}
+#
+
+
+# Onboard Back-End
+function sdc-onboard-BE {
+ DOCKER_NAME="sdc-onboard-BE"
+ echo "docker run sdc-onboard-BE ..."
+# TODO Check the dir_perms action . do we need it here ??
+# dir_perms
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-onboard-backend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${ONBOARD_DEBUG_PORT}
+ fi
+ docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env SDC_CERT_DIR="${SDC_CERT_DIR}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:${JETTY_BASE}/onap/cert --volume ${WORKSPACE}/data/logs/ONBOARD:${JETTY_BASE}/logs --volume ${WORKSPACE}/data/environments:/${JETTY_BASE}/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
+ command_exit_status $? ${DOCKER_NAME}
+ echo "please wait while sdc-onboard-BE is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# Front-End
+function sdc-FE {
+ DOCKER_NAME="sdc-FE"
+ IMAGE_NAME="${PREFIX}/sdc-frontend:${RELEASE}"
+ echo "Running container '${DOCKER_NAME}' based on '${IMAGE_NAME}' image..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-frontend:${RELEASE}
+ else
+ ADDITIONAL_ARGUMENTS=${FE_DEBUG_PORT}
+ fi
+
+ PLUGIN_CONFIG_FILE="${WORKSPACE}/data/environments/plugins-configuration.yaml"
+ if [[ -f ${WORKSPACE}/data/environments/plugins-configuration.yaml ]]; then
+ PLUGINS_CONF_VOLUME_MOUNT="--volume ${PLUGIN_CONFIG_FILE}:${JETTY_BASE}/config/catalog-fe/plugins-configuration.yaml"
+ else
+ echo "INFO: '${PLUGIN_CONFIG_FILE}' not provided, ignoring..."
+ fi
+
+ docker run \
+ --detach \
+ --name ${DOCKER_NAME} \
+ --env HOST_IP=${IP} \
+ --env ENVNAME="${DEP_ENV}" \
+ --env JAVA_OPTIONS="${FE_JAVA_OPTIONS}" \
+ --log-driver=json-file \
+ --log-opt max-size=100m \
+ --log-opt max-file=10 \
+ --ulimit memlock=-1:-1 \
+ --ulimit nofile=4096:100000 \
+ --volume ${WORKSPACE}/data/logs/FE/:${JETTY_BASE}/logs \
+ --volume ${WORKSPACE}/data/environments:/${JETTY_BASE}/chef-solo/environments \
+ ${LOCAL_TIME_MOUNT_CMD} \
+ ${PLUGINS_CONF_VOLUME_MOUNT} \
+ --publish 9443:9443 \
+ --publish 8181:8181 \
+ ${ADDITIONAL_ARGUMENTS} \
+ ${IMAGE_NAME}
+
+ command_exit_status $? ${DOCKER_NAME}
+ echo "Please wait while '${DOCKER_NAME}' container is starting..."
+ monitor_docker ${DOCKER_NAME}
+}
+#
+
+
+# apis-sanity
+function sdc-api-tests {
+ if [[ ${RUN_API_TESTS} = true ]] ; then
+ healthCheck
+ healthCheck_http_code=$?
+ if [[ ${healthCheck_http_code} == 200 ]] ; then
+ echo "docker run sdc-api-tests..."
+ echo "Trigger sdc-api-tests docker, please wait..."
+
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-api-tests:${RELEASE}
+ fi
+
+ docker run --detach --name sdc-api-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${API_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${API_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-api-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-api-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/logs/sdc-api-tests/outputCsar:/var/lib/tests/outputCsar --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:/var/lib/tests/cert --publish 9560:9560 ${PREFIX}/sdc-api-tests:${RELEASE} echo "please wait while SDC-API-TESTS is starting....."
+ monitor_docker sdc-api-tests
+ fi
+ fi
+}
+#
+
+
+# ui-sanity
+function sdc-ui-tests {
+
+ if [[ ${RUN_UI_TESTS} = true ]] ; then
+ healthCheck
+ healthCheck_http_code=$?
+ if [[ ${healthCheck_http_code} == 200 ]]; then
+ echo "docker run sdc-ui-tets..."
+ echo "Trigger sdc-ui-tests docker, please wait..."
+
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-ui-tests:${RELEASE}
+ fi
+ RUN_SIMULATOR=true;
+ sdc-sim
+ docker run --detach --name sdc-ui-tests --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env JAVA_OPTIONS="${UI_TESTS_JAVA_OPTIONS}" --env SUITE_NAME=${UI_SUITE} --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/sdc-ui-tests/target:/var/lib/tests/target --volume ${WORKSPACE}/data/logs/sdc-ui-tests/ExtentReport:/var/lib/tests/ExtentReport --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 5901:5901 --publish 6901:6901 ${PREFIX}/sdc-ui-tests:${RELEASE}
+ echo "please wait while SDC-UI-TESTS is starting....."
+ monitor_docker sdc-ui-tests
+ fi
+ fi
+}
+#
+
+
+# SDC-Simulator
+function sdc-sim {
+ if [ "${RUN_SIMULATOR}" == true ]; then
+ echo "docker run sdc-webSimulator..."
+ if [ ${LOCAL} = false ]; then
+ docker pull ${PREFIX}/sdc-simulator:${RELEASE}
+ fi
+
+ probe_sim
+ sim_stat=$?
+ if [ ${sim_stat} == 1 ]; then
+ docker run \
+ --detach \
+ --name sdc-sim \
+ --env FE_URL="${FE_URL}" \
+ --env JAVA_OPTIONS="${SIM_JAVA_OPTIONS}" \
+ --env ENVNAME="${DEP_ENV}" \
+ ${LOCAL_TIME_MOUNT_CMD} \
+ --volume ${WORKSPACE}/data/logs/WS/:${JETTY_BASE}/logs \
+ --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments \
+ --publish 8285:8080 \
+ --publish 8286:8443 ${PREFIX}/sdc-simulator:${RELEASE}
+ echo "please wait while SDC-WEB-SIMULATOR is starting....."
+ monitor_docker sdc-sim
+ fi
+ fi
+}
+#
+
+
+#
+# Main
+#
+
+# Handle command line arguments
+while [ $# -gt 0 ]; do
+ case $1 in
+
+ # -r | --release - The specific docker version to pull and deploy
+ -r | --release )
+ shift 1 ;
+ RELEASE=$1;
+ shift 1;;
+
+ # -e | --environment - The environment name you want to deploy
+ -e | --environment )
+ shift 1;
+ DEP_ENV=$1;
+ shift 1 ;;
+
+ # -p | --port - The port from which to connect to the docker nexus
+ -p | --port )
+ shift 1 ;
+ PORT=$1;
+ shift 1 ;;
+
+ # -l | --local - Use this for deploying your local dockers without pulling them first
+ -l | --local )
+ LOCAL=true;
+ shift 1;;
+
+ # -ta - Use this for running the APIs sanity docker after all other dockers have been deployed
+ -ta )
+ shift 1 ;
+ API_SUITE=$1;
+ RUN_API_TESTS=true;
+ shift 1 ;;
+
+ # -tu - Use this for running the UI sanity docker after all other dockers have been deployed
+ -tu )
+ shift 1 ;
+ UI_SUITE=$1;
+ RUN_UI_TESTS=true;
+ shift 1 ;;
+
+ # -tad - Use this for running the DEFAULT suite of tests in APIs sanity docker after all other dockers have been deployed
+ -tad | -t )
+ API_SUITE="onapApiSanity";
+ RUN_API_TESTS=true;
+ shift 1 ;;
+
+ # -tud - Use this for running the DEFAULT suite of tests in UI sanity docker after all other dockers have been deployed
+ -tud )
+ UI_SUITE="onapUiSanity";
+ RUN_UI_TESTS=true;
+ shift 1 ;;
+
+ # -d | --docker - The init specified docker
+ -d | --docker )
+ shift 1 ;
+ DOCKER=$1;
+ shift 1 ;;
+ # -sim | --simulator run the simulator
+ -sim | --simulator )
+ RUN_SIMULATOR=true;
+ shift 1 ;;
+ # -sim | --simulator run the simulator
+ -u | --fe_url )
+ shift 1 ;
+ FE_URL=$1;
+ shift 1 ;;
+
+ # -h | --help - Display the help message with all the available run options
+ -h | --help )
+ usage;
+ exit ${SUCCESS};;
+
+ * )
+ usage;
+ exit ${FAILURE};;
+ esac
+done
+
+
+#Prefix those with WORKSPACE so it can be set to something other than /opt
+[ -f ${WORKSPACE}/opt/config/env_name.txt ] && DEP_ENV=$(cat ${WORKSPACE}/opt/config/env_name.txt) || echo ${DEP_ENV}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && NEXUS_USERNAME=$(cat ${WORKSPACE}/opt/config/nexus_username.txt) || NEXUS_USERNAME=release
+[ -f ${WORKSPACE}/opt/config/nexus_password.txt ] && NEXUS_PASSWD=$(cat ${WORKSPACE}/opt/config/nexus_password.txt) || NEXUS_PASSWD=sfWU3DFVdBr7GVxB85mTYgAW
+[ -f ${WORKSPACE}/opt/config/nexus_docker_repo.txt ] && NEXUS_DOCKER_REPO=$(cat ${WORKSPACE}/opt/config/nexus_docker_repo.txt) || NEXUS_DOCKER_REPO=nexus3.onap.org:${PORT}
+[ -f ${WORKSPACE}/opt/config/nexus_username.txt ] && docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO
+
+
+export IP=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+#If OSX, then use this to get IP
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ export IP=$(ipconfig getifaddr en0)
+fi
+export PREFIX=${NEXUS_DOCKER_REPO}'/onap'
+
+if [ ${LOCAL} = true ]; then
+ PREFIX='onap'
+fi
+
+echo ""
+
+if [ -z "${DOCKER}" ]; then
+ cleanup all
+ dir_perms
+ sdc-cs
+ sdc-cs-init
+ sdc-cs-onboard-init
+ sdc-onboard-BE
+ sdc-BE
+ sdc-BE-init
+ sdc-FE
+ healthCheck
+ sdc-sim
+ sdc-api-tests
+ sdc-ui-tests
+else
+ cleanup ${DOCKER}
+ dir_perms
+ ${DOCKER}
+ healthCheck
+fi
set -exo pipefail
echo "This is ${WORKSPACE}/scripts/sdc/setup_sdc_for_sanity.sh"
-
+echo "lets check what is ${1} ${2}"
ENABLE_SIMULATOR=
case "$1" in
tad|tud)
'')
# we will just setup sdc - no tests
export TEST_SUITE=""
-
- # this is mandatory
ENABLE_SIMULATOR="--simulator"
+ # this is mandatory
;;
*)
- usage
- exit 1
+ export TEST_SUITE=""
+ ENABLE_SIMULATOR="--simulator"
+ # # usage
+ # exit 1
;;
esac
-
+echo "Lets check is simulator is enabled or not ${ENABLE_SIMULATOR}"
# Clone sdc enviroment template
mkdir -p "${WORKSPACE}/data/environments/"
mkdir -p "${WORKSPACE}/data/clone/"
if [ -d "$SDC_LOCAL_GITREPO" ] ; then
rm -rf ./sdc
cp -a "$SDC_LOCAL_GITREPO" ./sdc
+ # echo "[skipping copying git repo of sdc]"
else
echo "[ERROR]: Local git repo for sdc does not exist: ${SDC_LOCAL_GITREPO}"
exit 1
--- /dev/null
+*** Settings ***
+Documentation Non-RT RIC Policy Management - polmansuite
--- /dev/null
+*** Settings ***
+Library OperatingSystem
+Library Process
+
+*** Test Cases ***
+
+Functional Test Case 1
+ [Documentation] Functional Test Case 1 - FTC1
+ Start Process ${AUTOTEST_ROOT}/FTC1.sh remote auto-clean --env-file ${TEST_ENV} shell=true cwd=${AUTOTEST_ROOT}
+ ${cli_cmd_output}= Wait For Process timeout=3600
+ Should Be Equal as Integers ${cli_cmd_output.rc} 0
+ ${ResultFileContent}= Get File ${AUTOTEST_ROOT}/.resultFTC1.txt
+ Should Be Equal As Integers ${ResultFileContent} 0
+
+Functional Test Case 2
+ [Documentation] Functional Test Case 2 - FTC150
+ Start Process ${AUTOTEST_ROOT}/FTC150.sh remote auto-clean --env-file ${TEST_ENV} shell=true cwd=${AUTOTEST_ROOT}
+ ${cli_cmd_output}= Wait For Process timeout=3600
+ Should Be Equal as Integers ${cli_cmd_output.rc} 0
+ ${ResultFileContent}= Get File ${AUTOTEST_ROOT}/.resultFTC150.txt
+ Should Be Equal As Integers ${ResultFileContent} 0
+
+
*** Variables ***
-${health_check} ${SCRIPTS}/health_check.sh
+${health_check} ${SCRIPTS}/ccsdk/healthcheck/health_check.sh
*** Test Cases ***
+++ /dev/null
-*** Settings ***
-Documentation Ccsdk Oran - Suite 1
+++ /dev/null
-*** Settings ***
-Library OperatingSystem
-Library RequestsLibrary
-
-*** Variables ***
-${MESSAGE} Hello, world!
-
-*** Test Cases ***
-String Equality Test
- Should Be Equal ${MESSAGE} Hello, world!
-
-Dir Test
- [Documentation] Check if /tmp exists
- Log ${MESSAGE}
- CheckDir /tmp
-
-Url Test
- [Documentation] Check if google.com can be reached
- CheckUrl http://www.google.com
-
-*** Keywords ***
-CheckDir
- [Arguments] ${path}
- Directory Should Exist ${path}
-
-CheckUrl
- [Arguments] ${url}
- Create Session session ${url}
- ${resp}= Get Request session /
- Should Be Equal As Integers ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Ccsdk Oran - Suite 2
+++ /dev/null
-*** Settings ***
-Library OperatingSystem
-Library RequestsLibrary
-
-*** Variables ***
-${MESSAGE} Hello, world!
-
-*** Test Cases ***
-String Equality Test
- Should Be Equal ${MESSAGE} Hello, world!
-
-Dir Test
- [Documentation] Check if /tmp exists
- Log ${MESSAGE}
- CheckDir /tmp
-
-Url Test
- [Documentation] Check if www.onap.org can be reached
- Create Session openo http://www.onap.org
- CheckUrl openo /
-
-*** Keywords ***
-CheckDir
- [Arguments] ${path}
- Directory Should Exist ${path}
-
-CheckUrl
- [Arguments] ${session} ${path}
- ${resp}= Get Request ${session} ${path}
- Should Be Equal As Integers ${resp.status_code} 200
+++ /dev/null
-*** Settings ***
-Documentation Ccsdk Oran - vCPE
+++ /dev/null
-*** Settings ***
-Suite Setup Suite Setup
-Suite Teardown Suite Teardown
-Library OperatingSystem
-Library RequestsLibrary
-Library Process
-Library ONAPLibrary.Utilities
-
-*** Variables ***
-${GLOBAL_APPLICATION_ID} csit-vCPE
-${GLOBAL_MSO_USERNAME} InfraPortalClient
-${GLOBAL_MSO_PASSWORD} password1$
-
-*** Test Cases ***
-SO ServiceInstance health check
- ${auth}= Create List ${GLOBAL_MSO_USERNAME} ${GLOBAL_MSO_PASSWORD}
- ${session}= Create Session so http://${SO_IP}:8080
- ${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
- ${resp}= Get Request so /ecomp/mso/infra/orchestrationRequests/v2 headers=${headers}
- Should Not Contain ${resp.content} null
-
-*** Keywords ***
-Run Docker
- [Arguments] ${image} ${name} ${parameters}=${EMPTY}
- ${result}= Run Process docker run --name ${name} ${parameters} -d ${image} shell=True
- Should Be Equal As Integers ${result.rc} 0
- Log ${result.stdout}
- ${result}= Run Process docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${name} shell=True
- Should Be Equal As Integers ${result.rc} 0
- Log ${result.stdout}
- [Return] ${result.stdout}
-
-Kill Docker
- [Arguments] ${name}
- ${result}= Run Process docker logs ${name} shell=True
- Should Be Equal As Integers ${result.rc} 0
- Log ${result.stdout}
- ${result}= Run Process docker kill ${name} shell=True
- Should Be Equal As Integers ${result.rc} 0
- Log ${result.stdout}
- ${result}= Run Process docker rm ${name} shell=True
- Should Be Equal As Integers ${result.rc} 0
- Log ${result.stdout}
-
-CheckUrl
- [Arguments] ${url}
- Create Session session ${url} disable_warnings=True
- ${resp}= Get Request session /
- Should Be Equal As Integers ${resp.status_code} 200
-
-Suite Setup
- ${SO_IP}= Run Docker nexus3.onap.org:10001/openecomp/mso i-so
- Wait Until Keyword Succeeds 1 min 5 sec CheckUrl http://${SO_IP}:8080
- Set Suite Variable ${SO_IP}
-
-Suite Teardown
- Kill Docker i-so
*** Variables ***
${cli_exec} docker exec cli onap
-${cli_exec_cli_10_help} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap --help"
-${cli_exec_cli_10_version} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap --version"
-${cli_exec_cli_10_schema_refresh} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap schema-refresh"
-${cli_exec_cli_10_schema_validate} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap schema-validate -i -l schema-refresh.yaml"
-${cli_exec_cli_10_schema_validate_invalid} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap schema-validate -i -l invalid-yaml-path.yaml"
-${cli_exec_cli_10_schema_validate_empty} docker exec cli bash -c "export CLI_PRODUCT_VERSION=cli-1.0 && onap schema-validate"
-
-${cli_exec_onap_11} docker exec cli bash -c "export CLI_PRODUCT_VERSION=onap-1.1 && onap"
-${cli_exec_onap_11_microservice_create} docker exec cli bash -c "export CLI_PRODUCT_VERSION=onap-1.1 && onap microservice-create --service-name test-service --service-version v1 --service-url /api/test/v1 --host-url http://${MSB_IAG_IP}:80 23.14.15.156 80"
-${cli_exec_onap_11_microservice_list} docker exec cli bash -c "export CLI_PRODUCT_VERSION=onap-1.1 && onap microservice-list --host-url http://${MSB_IAG_IP}:80 --long"
-${cli_exec_onap_11_microservice_show} docker exec cli bash -c "export CLI_PRODUCT_VERSION=onap-1.1 && onap microservice-show --service-name test-service --service-version v1 --host-url http://${MSB_IAG_IP}:80"
-${cli_exec_onap_11_microservice_delete} docker exec cli bash -c "export CLI_PRODUCT_VERSION=onap-1.1 && onap microservice-delete --service-name test-service --service-version v1 --host-url http://${MSB_IAG_IP}:80 --node-ip 23.14.15.156 --node-port 80"
+${cli_exec_cli_10_version} docker exec cli bash -c "export OPEN_CLI_PRODUCT_IN_USE=open-cli && onap --version"
*** Test Cases ***
Liveness Test
[Documentation] Check cli liveness check
- Create Session cli http://${CLI_IP}:8080
+ Create Session cli https://${CLI_IP}:443
CheckUrl cli /
-Check Cli help
- [Documentation] check cli help command
- ${cli_cmd_output}= Run Process ${cli_exec_cli_10_help} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} CLI version
-
Check Cli Version Default
[Documentation] check cli default version
${cli_cmd_output}= Run Process ${cli_exec_cli_10_version} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} : cli-1.0
-
-Check Cli Scheam Refresh
- [Documentation] check cli schema-refresh command
- ${cli_cmd_output}= Run Process ${cli_exec_cli_10_schema_refresh} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} sl-no
- Should Contain ${cli_cmd_output.stdout} command
- Should Contain ${cli_cmd_output.stdout} product-version
- Should Contain ${cli_cmd_output.stdout} schema
- Should Contain ${cli_cmd_output.stdout} version
-
-Check Cli Schema Validate With Valid Path
- [Documentation] check cli schema-validate command with valid path
- ${cli_cmd_output}= Run Process ${cli_exec_cli_10_schema_validate} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} sl-no
- Should Contain ${cli_cmd_output.stdout} error
-
-Check Cli Scheam Validate With Invalid Path
- [Documentation] check cli schema-validate command with invalid path
- ${cli_cmd_output}= Run Process ${cli_exec_cli_10_schema_validate_invalid} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 1
- Should Contain ${cli_cmd_output.stdout} 0xb001
-
-Check Cli Scheam Validate Empty Argument
- [Documentation] check cli schema-validate with empty argument
- ${cli_cmd_output}= Run Process ${cli_exec_cli_10_schema_validate_empty} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 1
- Should Contain ${cli_cmd_output.stdout} 0x7003
-
-Check Cli create microservice
- [Documentation] check create microservice
- ${cli_cmd_output}= Run Process ${cli_exec_onap_11_microservice_create} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
-
-Check Cli list microservice
- [Documentation] check list microservice
- ${cli_cmd_output}= Run Process ${cli_exec_onap_11_microservice_list} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
-
-Check Cli show microservice
- [Documentation] check show microservice
- ${cli_cmd_output}= Run Process ${cli_exec_onap_11_microservice_show} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
-
-Check Cli delete microservice
- [Documentation] check delete microservice
- ${cli_cmd_output}= Run Process ${cli_exec_onap_11_microservice_delete} shell=yes
- Log ${cli_cmd_output.stdout}
- Should Be Equal As Strings ${cli_cmd_output.rc} 0
-
+ Should Contain ${cli_cmd_output.stdout} : open-cli
*** Keywords ***
"fileBasedGP": 15,
"fileLocation": "/pm/pm.xml",
"nfFilter": {
- "swVersions": [
- "1.0.0",
- "1.0.1"
- ],
"nfNames": [
"^pnf.*",
"^vnf.*"
+ ],
+ "modelInvariantUUIDs": [
+ "7129e420-d396-4efb-af02-6b83499b12f8"
+ ],
+ "modelVersionIDs": [
+
]
},
"measurementGroups": [
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"UPDATE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
]
},
"body": [
- "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"orchestration-status\":\"Active\"}}"
+ "{\"cambria.partition\":\"AAI\",\"event-header\":{\"severity\":\"NORMAL\",\"entity-type\":\"pnf\",\"top-entity-type\":\"pnf\",\"entity-link\":\"/aai/v16/network/pnfs/pnf/pnf_newly_discovered\",\"event-type\":\"AAI-EVENT\",\"domain\":\"dev\",\"action\":\"DELETE\",\"sequence-number\":\"0\",\"id\":\"db09e090-196e-4f84-9645-e449b1cd3640\",\"source-name\":\"dcae-curl\",\"version\":\"v16\",\"timestamp\":\"20200203-15:14:08:807\"},\"entity\":{\"ipaddress-v4-oam\":\"10.10.10.37\",\"nf-role\":\"gNB\",\"equip-type\":\"val8\",\"relationship-list\":{\"relationship\":[{\"related-to\":\"service-instance\",\"relationship-data\":[{\"relationship-value\":\"Demonstration\",\"relationship-key\":\"customer.global-customer-id\"},{\"relationship-value\":\"vCPE\",\"relationship-key\":\"service-subscription.service-type\"},{\"relationship-value\":\"2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-key\":\"service-instance.service-instance-id\"}],\"related-link\":\"/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vCPE/service-instances/service-instance/2c03b2a8-e31a-4749-9e99-3089ab441400\",\"relationship-label\":\"org.onap.relationships.inventory.ComposedOf\",\"related-to-property\":[{\"property-key\":\"service-instance.service-instance-name\",\"property-value\":\"Svc6_1\"}]}]},\"equip-vendor\":\"Ericsson\",\"serial-number\":\"6061ZW3\",\"ipaddress-v6-oam\":\"2001:0db8:0:0:0:0:1428:57ab\",\"equip-model\":\"val6\",\"in-maint\":false,\"resource-version\":\"1578668956804\",\"sw-version\":\"val7\",\"pnf-id\":\"eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8\",\"pnf-name\":\"pnf_newly_discovered\",\"model-invariant-id\":\"7129e420-d396-4efb-af02-6b83499b12f8\",\"model-version-id\":\"e80a6ae3-cafd-4d24-850d-e14c084a5ca9\",\"orchestration-status\":\"Active\"}}"
]
},
"times": {
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['subscription_status']} UNLOCKED
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_name']} pnf-existing
- Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['orchestration_status']} Active
Should Be Equal As Strings ${resp.json()[0]['network_functions'][0]['nf_sub_status']} PENDING_CREATE
Verify Policy response on MR is handled
Sleep 31 seconds Ensure AAI event on MR is picked up
${resp}= Get Request pmsh_session ${SUBSCRIPTIONS_ENDPOINT}
Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['nf_name']} pnf_newly_discovered
- Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['orchestration_status']} Active
Should Be Equal As Strings ${resp.json()[0]['network_functions'][1]['nf_sub_status']} PENDING_CREATE
Verify AAI event on MR detailing PNF being deleted is handled
[Documentation] Post single event with incorrect stndDefined data
Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_STND_DEFINED_INVALID_TYPE_DATA} 202
+############################################################################################
+## Section for tests with stndDefined validation ON and schemas with refernce to other files
+############################################################################################
+Add refeerence to other schemas
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC DCAE-VESC-STNDDEFINED
+ [Documentation] Add refeerence to other schemas and Run Health Check
+ Override Collector Properties ${VES_ADD_REFERENCE_TO_OTHER_SCHEMAS}
+ Run Healthcheck ${https_basic_auth_session}
+
+
+Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and valid reference to other file
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and valid reference to ther file and expect 202 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_WITH_RFERENCE_TO_VALID_SCHEMA} 202 stndDefined-gNB-Nokia-PowerLost
+
+
+Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and invalid reference to other schema file
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and invalid reference to other schema file and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_FILE_REF} 400
+
+
+Publish Single VES VNF Measurement Event with Standard Defined Fields with certBasicAuth over HTTPS and invalid internal schema reference
+ [Tags] DCAE-VESC-R1 DCAE-VESC-HC DCAE-VESC-STNDDEFINED
+ [Documentation] Post single event with valid data with Standard Defined Fields and valid username/password to /eventListener/v7 endpoint over HTTPS and invalid internal schema reference and expect 400 Response Status Code
+ Send Request And Validate Response Publish Event To VES Collector ${https_basic_auth_session} ${VES_EVENTLISTENER_V7} ${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_INTERNAL_REF} 400
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
--- /dev/null
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_file_reference.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "href": 1,
+ "uri": "1",
+ "notificationId": 1,
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": "xyz",
+ "probableCause": 1,
+ "perceivedSeverity": "INDETERMINATE",
+ "rootCauseIndicator": false,
+ "specificProblem": "xyz",
+ "correlatedNotifications": [],
+ "backedUpStatus": true,
+ "backUpObject": "xyz",
+ "trendIndication": "MORE_SEVERE",
+ "thresholdInfo": {
+ "observedMeasurement": "new",
+ "observedValue": 123
+ },
+ "stateChangeDefinition": {
+ },
+ "monitoredAttributes": {
+ "newAtt": "new"
+ },
+ "proposedRepairActions": "xyz",
+ "additionalText": "xyz",
+ "additionalInformation": {
+ "addInfo": "new"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_internal_reference.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "href": 1,
+ "uri": "1",
+ "notificationId": 1,
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": "xyz",
+ "probableCause": 1,
+ "perceivedSeverity": "INDETERMINATE",
+ "rootCauseIndicator": false,
+ "specificProblem": "xyz",
+ "correlatedNotifications": [],
+ "backedUpStatus": true,
+ "backUpObject": "xyz",
+ "trendIndication": "MORE_SEVERE",
+ "thresholdInfo": {
+ "observedMeasurement": "new",
+ "observedValue": 123
+ },
+ "stateChangeDefinition": {
+ },
+ "monitoredAttributes": {
+ "newAtt": "new"
+ },
+ "proposedRepairActions": "xyz",
+ "additionalText": "xyz",
+ "additionalInformation": {
+ "addInfo": "new"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+{
+ "event": {
+ "commonEventHeader": {
+ "version": "4.1",
+ "vesEventListenerVersion": "7.2",
+ "domain": "stndDefined",
+ "eventId": "stndDefined-gNB_Nokia000001",
+ "eventName": "stndDefined-gNB-Nokia-PowerLost",
+ "stndDefinedNamespace": "3GPP-FaultSupervision",
+ "startEpochMicrosec": 1413378172000000,
+ "lastEpochMicrosec": 1413378172000000,
+ "reportingEntityName": "ibcx0001vm002oam001",
+ "sourceName": "scfx0001vm002cap001",
+ "sequence": 1,
+ "priority": "High"
+ },
+ "stndDefinedFields": {
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "data": {
+ "href": 1,
+ "uri": "1",
+ "notificationId": 1,
+ "notificationType": "notifyNewAlarm",
+ "eventTime": "xyz",
+ "systemDN": "xyz",
+ "probableCause": 1,
+ "perceivedSeverity": "INDETERMINATE",
+ "rootCauseIndicator": false,
+ "specificProblem": "xyz",
+ "correlatedNotifications": [],
+ "backedUpStatus": true,
+ "backUpObject": "xyz",
+ "trendIndication": "MORE_SEVERE",
+ "thresholdInfo": {
+ "observedMeasurement": "new",
+ "observedValue": 123
+ },
+ "stateChangeDefinition": {
+ },
+ "monitoredAttributes": {
+ "newAtt": "new"
+ },
+ "proposedRepairActions": "xyz",
+ "additionalText": "xyz",
+ "additionalInformation": {
+ "addInfo": "new"
+ },
+ "alarmId": "1",
+ "alarmType": "COMMUNICATIONS_ALARM"
+ },
+ "stndDefinedFieldsVersion": "1.0"
+ }
+ }
+}
\ No newline at end of file
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {},
"stndDefinedFieldsVersion": "1.0"
}
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/invalid-ref.json",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/invalid-ref.json",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS.yaml#components/schemas/NotifyNewAlarm",
"data": {
"href": 1,
"uri": "1",
"priority": "High"
},
"stndDefinedFields": {
- "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/blob/REL-16/OpenAPI/invalid-ref.json",
+ "schemaReference": "https://forge.3gpp.org/rep/sa5/data-models/tree/SA88-Rel16/OpenAPI/invalid-ref.json",
"data": {
"href": 1,
"uri": "1",
--- /dev/null
+openapi: 3.0.1
+info:
+ title: Common Type Definitions
+ version: 16.5.0
+ description: >-
+ OAS 3.0.1 specification of common type definitions in the Generic NRM
+ © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
+ All rights reserved.
+externalDocs:
+ description: 3GPP TS 28.623 V16.5.0; Generic NRM, Common Type Definitions
+ url: http://www.3gpp.org/ftp/Specs/archive/28_series/28.623/
+paths: {}
+components:
+ schemas:
+ Long:
+ type: number
+ format: long
+ Float:
+ type: number
+ format: float
+ DateTime:
+ type: string
+ format: date-Time
+ Dn:
+ type: string
+ DnList:
+ type: array
+ items:
+ $ref: '#/components/schemas/Dn'
+ Mcc:
+ type: string
+ pattern: '^[0-9]{3}$'
+ Mnc:
+ type: string
+ pattern: '^[0-9]{2,3}$'
+ Fqdn:
+ type: string
+ Uri:
+ type: string
+ Ipv4Addr:
+ type: string
+ pattern: '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$'
+ example: '198.51.100.1'
+ Ipv6Addr:
+ type: string
+ allOf:
+ - pattern: '^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))$'
+ - pattern: '^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))$'
+ example: '2001:db8:85a3::8a2e:370:7334'
+ Ipv6Prefix:
+ type: string
+ allOf:
+ - pattern: '^((:|(0?|([1-9a-f][0-9a-f]{0,3}))):)((0?|([1-9a-f][0-9a-f]{0,3})):){0,6}(:|(0?|([1-9a-f][0-9a-f]{0,3})))(\/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))$'
+ - pattern: '^((([^:]+:){7}([^:]+))|((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?))(\/.+)$'
+ example: '2001:db8:abcd:12::0/64'
+ AdministrativeState:
+ type: string
+ enum:
+ - LOCKED
+ - UNLOCKED
+ OperationalState:
+ type: string
+ enum:
+ - ENABLED
+ - DISABLED
+ UsageState:
+ type: string
+ enum:
+ - IDEL
+ - ACTIVE
+ - BUSY
+ AttributeNameValuePairSet:
+ type: object
+ minProperties: 1
+ AttributeValueChangeSet:
+ description: >-
+ The key in this map is the attribute name. The value of each key is an array.
+ When only one item is present in the array, it carries the new attribute
+ value. If two items are present, then the first item carries the old value
+ and the second item the new value. The items can be of any type including null.
+ type: object
+ additionalProperties:
+ type: array
+ minItems: 1
+ maxItems: 2
+ items:
+ nullable: true
+ Filter:
+ type: string
+ SystemDN:
+ type: string
+ NotificationId:
+ type: integer
+ NotificationType:
+ oneOf:
+ - $ref: 'faultMnS1.yaml#/components/schemas/AlarmNotificationType'
+ # more to be added
+ NotificationHeader:
+ description: >-
+ Header used for all notifications types
+ type: object
+ required:
+ - uri
+ - notificationId
+ - notificationType
+ - eventTime
+ - systemDN
+ properties:
+ uri:
+ $ref: '#/components/schemas/Uri'
+ notificationId:
+ $ref: '#/components/schemas/NotificationId'
+ notificationType:
+ $ref: '#/components/schemas/NotificationType'
+ eventTime:
+ $ref: '#/components/schemas/DateTime'
+ systemDN:
+ $ref: '#/components/schemas/SystemDN'
+ ErrorResponse:
+ description: >-
+ Default schema for the response message body in case the request
+ is not successful.
+ type: object
+ properties:
+ error:
+ type: object
+ properties:
+ errorInfo:
+ type: string
--- /dev/null
+openapi: 3.0.1
+info:
+ title: Fault Supervision MnS
+ version: 16.5.0
+ description: >-
+ OAS 3.0.1 definition of the Fault Supervision MnS
+ © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
+ All rights reserved.
+externalDocs:
+ description: 3GPP TS 28.532 V16.5.0; Generic management services
+ url: http://www.3gpp.org/ftp/Specs/archive/28_series/28.532/
+servers:
+ - url: '{MnSRoot}/FaultSupervisionMnS/{version}'
+ variables:
+ MnSRoot:
+ description: See subclause 4.4.3 of TS 32.158
+ default: http://example.com/3GPPManagement
+ version:
+ description: Version number of the OpenAPI definition
+ default: XXX
+paths:
+ /alarms:
+ get:
+ summary: Retrieve multiple alarms
+ description: >-
+ Retrieves the alarms identified by alarmAckState, baseObjectInstance
+ and filter.
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: baseObjectInstance
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Filter'
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ Returns the alarms identified in the request. The alarmId is the key
+ of the map.
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ allOf:
+ - type: object
+ properties:
+ lastNotificationHeader:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - $ref: '#/components/schemas/AlarmRecord'
+ - type: object
+ properties:
+ comments:
+ $ref: '#/components/schemas/Comments'
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge multiple alarms'
+ description: >-
+ Clears, acknowledges or unacknowledges multiple alarms using patch. Depending
+ on which action is to be performed, different merge patch documents need
+ to be used.
+ requestBody:
+ description: >-
+ Patch documents for acknowledging and unacknowledging, or clearing multiple
+ alarms. The keys in the map are the alarmIds to be patched.
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No content").
+ The response message body is empty.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FailedAlarm'
+ /alarms/alarmCount:
+ get:
+ summary: Get the alarm count per perceived severity
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ The alarm count per perceived severity is returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlarmCount'
+ default:
+ description: Response in case of error. The error case needs rework.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}:
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge a single alarm'
+ description: >-
+ Clears, acknowledges or uncknowldeges a single alarm by patching the alarm
+ information. A conditional acknowledge request based on the perceived
+ severity is not supported.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to be patched.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case (204 No content).
+ The response message body is absent.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}/comments:
+ post:
+ summary: Add a comment to a single alarm
+ description: >-
+ Adds a comment to an alarm identified by alarmId. The id of the new comment
+ is allocated by the producer.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to which the comment shall be added.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ responses:
+ '201':
+ description: >-
+ Success case (201 Created).
+ The representation of the newly created comment resource shall be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ headers:
+ Location:
+ description: URI of the newly created comment resource.
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+ /subscriptions:
+ post:
+ summary: Create a subscription
+ description: >-
+ To create a subscription the representation of the subscription is
+ POSTed on the /subscriptions collection resource.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ responses:
+ '201':
+ description: >-
+ Success case ("201 Created").
+ The representation of the newly created subscription resource shall
+ be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ headers:
+ Location:
+ description: URI of the newly created subscription resource
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ callbacks:
+ notifyNewAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyNewAlarm'
+ - $ref: '#/components/schemas/NotifyNewSecAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyClearedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyClearedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyChangedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarmGeneral:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyChangedAlarmGeneral'
+ - $ref: '#/components/schemas/NotifyChangedSecAlarmGeneral'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyCorrelatedNotificationChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyCorrelatedNotificationChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAckStateChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAckStateChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyComments:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyComments'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyPotentialFaultyAlarmList:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyPotentialFaultyAlarmList'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAlarmListRebuilt:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAlarmListRebuilt'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /subscriptions/{subscriptionId}:
+ delete:
+ summary: Delete a subscription
+ description: >-
+ The subscription is deleted by deleting the corresponding subscription
+ resource. The resource to be deleted is identified with the path
+ component of the URI.
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: Identifies the subscription to be deleted.
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The subscription resource has been deleted. The response message body
+ is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+components:
+ schemas:
+
+ #---- Definition of AlarmRecord ----------------------------------------------------#
+
+ AlarmId:
+ type: string
+ AlarmType:
+ type: string
+ enum:
+ - COMMUNICATIONS_ALARM
+ - QUALITY_OF_SERVICE_ALARM
+ - PROCESSING_ERROR_ALARM
+ - EQUIPMENT_ALARM
+ - ENVIRONMENTAL_ALARM
+ - INTEGRITY_VIOLATION
+ - OPERATIONAL_VIOLATION
+ - PHYSICAL_VIOLATION
+ - SECURITY_SERVICE_OR_MECHANISM_VIOLATION
+ - TIME_DOMAIN_VIOLATION
+ ProbableCause:
+ description: >-
+ The value of the probable cause may be a specific standardized string, or any
+ vendor provided string. Probable cause strings are not standardized in the
+ present document. They may be added in a future version. Up to then the
+ mapping of the generic probable cause strings "PROBABLE_CAUSE_001" to
+ "PROBABLE_CAUSE_005" is vendor specific.
+ The value of the probable cause may also be an integer. The mapping of integer
+ values to probable causes is vendor specific.
+ oneOf:
+ - anyOf:
+ - type: string
+ enum:
+ - PROBABLE_CAUSE_001
+ - PROBABLE_CAUSE_002
+ - PROBABLE_CAUSE_003
+ - PROBABLE_CAUSE_004
+ - PROBABLE_CAUSE_005
+ - type: string
+ - type: integer
+ SpecificProblem:
+ oneOf:
+ - type: string
+ - type: integer
+ PerceivedSeverity:
+ type: string
+ enum:
+ - INDETERMINATE
+ - CRITICAL
+ - MAJOR
+ - MINOR
+ - WARNING
+ - CLEARED
+ TrendIndication:
+ type: string
+ enum:
+ - MORE_SEVERE
+ - NO_CHANGE
+ - LESS_SEVERE
+ ThresholdHysteresis:
+ type: object
+ required:
+ - high
+ properties:
+ high:
+ oneOf:
+ - type: integer
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ low:
+ $ref: 'comDefs.yaml#/components/schemas/Float'
+ ThresholdLevelInd:
+ type: object
+ required:
+ - up
+ properties:
+ up:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ low:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ ThresholdInfo:
+ type: object
+ required:
+ - observedMeasurement
+ - observedValue
+ properties:
+ observedMeasurement:
+ type: string
+ observedValue:
+ type: integer
+ oneOf:
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ thresholdLevelInd:
+ $ref: '#/components/schemas/ThresholdLevelInd'
+ armTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ CorrelatedNotification:
+ type: object
+ required:
+ - source
+ - notificationId
+ properties:
+ sourceObjectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationIds:
+ type: array
+ items:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ CorrelatedNotifications:
+ type: array
+ items:
+ $ref: '#/components/schemas/CorrelatedNotification'
+ AckState:
+ type: string
+ enum:
+ - ACKNOWLEDGED
+ - UNACKNOWLEDGED
+
+ AlarmRecord:
+ description: >-
+ The alarmId is not a property of an alarm record. It is used as key
+ in the map of alarm records instead.
+ type: object
+ properties:
+ # alarmId:
+ # $ref: '#/components/schemas/AlarmId'
+ objectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationId:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ alarmRaisedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmChangedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmClearedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdinfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+
+ rootCauseIndicator:
+ type: boolean
+
+ ackTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+
+ #---- Definition of alarm notifications --------------------------------------------#
+
+ AlarmNotificationType:
+ type: string
+ enum:
+ - notifyNewAlarm
+ - notifyChangedAlarm
+ - notifyChangedAlarmGeneral
+ - notifyAckStateChanged
+ - notifyCorrelatedNotificationChanged
+ - notifyComments
+ - notifyClearedAlarm
+ - notifyAlarmListRebuiltAlarm
+ - notifyPotentialFaultyAlarmList
+ AlarmListAlignmentRequirement:
+ type: string
+ enum:
+ - ALIGNMENT_REQUIRED
+ - ALIGNMENT_NOT_REQUIRED
+
+ NotifyNewAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ NotifyNewSecAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ NotifyClearedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ NotifyChangedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ NotifyChangedAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyChangedSecAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyCorrelatedNotificationChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - correlatedNotifications
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ rootCauseIndicator:
+ type: boolean
+ NotifyAckStateChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - ackState
+ - ackUserId
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ NotifyComments:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - comments
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ comments:
+ $ref: '#/components/schemas/Comments'
+ NotifyPotentialFaultyAlarmList:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ NotifyAlarmListRebuilt:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ alarmListAlignmentRequirement:
+ $ref: '#/components/schemas/AlarmListAlignmentRequirement'
+
+ #---- Definition of query parameters -----------------------------------------------#
+
+ AlarmAckState:
+ type: string
+ enum:
+ - ALL_ALARMS
+ - ALL_ACTIVE_ALARMS
+ - ALL_ACTIVE_AND_ACKNOWLEDGED_ALARMS
+ - ALL_ACTIVE_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_CLEARED_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_UNACKNOWLEDGED_ALARMS
+
+ #---- Definition of patch documents ------------------------------------------------#
+
+ MergePatchAcknowledgeAlarm:
+ description: >-
+ Patch document acknowledging or unacknowledging a single alarm. For
+ acknowleding an alarm the value of ackState is ACKNOWLEDGED, for unacknowleding
+ an alarm the value of ackState is UNACKNOWLEDGED.
+ type: object
+ required:
+ - ackUserId
+ - ackState
+ properties:
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ MergePatchClearAlarm:
+ description: Patch document for clearing a single alarm
+ type: object
+ required:
+ - clearUserId
+ - perceivedSeverity
+ properties:
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ perceivedSeverity:
+ type: string
+ enum:
+ - CLEARED
+
+ #---- Definition of method responses -----------------------------------------------#
+
+ FailedAlarm:
+ type: object
+ required:
+ - alarmId
+ - failureReason
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ failureReason:
+ type: string
+
+ #---- Definition of resources ------------------------------------------------------#
+
+ AlarmCount:
+ type: object
+ required:
+ - criticalCount
+ - majorCount
+ - minorCount
+ - warningCount
+ - indeterminateCount
+ - clearedCount
+ properties:
+ criticalCount:
+ type: integer
+ majorCount:
+ type: integer
+ minorCount:
+ type: integer
+ warningCount:
+ type: integer
+ indeterminateCount:
+ type: integer
+ clearedCount:
+ type: integer
+ Comment:
+ type: object
+ properties:
+ commentTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ commentUserId:
+ type: string
+ commentSystemId:
+ type: string
+ commentText:
+ type: string
+ Comments:
+ description: >-
+ Collection of comments. The comment identifiers are allocated by the
+ MnS producer and used as key in the map.
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Comment'
+ Subscription:
+ type: object
+ properties:
+ consumerReference:
+ $ref: 'comDefs.yaml#/components/schemas/Uri'
+ timeTick:
+ $ref: 'comDefs.yaml#/components/schemas/Long'
+ filter:
+ $ref: 'comDefs.yaml#/components/schemas/Filter'
\ No newline at end of file
--- /dev/null
+openapi: 3.0.1
+info:
+ title: Fault Supervision MnS
+ version: 16.5.0
+ description: >-
+ OAS 3.0.1 definition of the Fault Supervision MnS
+ © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
+ All rights reserved.
+externalDocs:
+ description: 3GPP TS 28.532 V16.5.0; Generic management services
+ url: http://www.3gpp.org/ftp/Specs/archive/28_series/28.532/
+servers:
+ - url: '{MnSRoot}/FaultSupervisionMnS/{version}'
+ variables:
+ MnSRoot:
+ description: See subclause 4.4.3 of TS 32.158
+ default: http://example.com/3GPPManagement
+ version:
+ description: Version number of the OpenAPI definition
+ default: XXX
+paths:
+ /alarms:
+ get:
+ summary: Retrieve multiple alarms
+ description: >-
+ Retrieves the alarms identified by alarmAckState, baseObjectInstance
+ and filter.
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: baseObjectInstance
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Filter'
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ Returns the alarms identified in the request. The alarmId is the key
+ of the map.
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ allOf:
+ - type: object
+ properties:
+ lastNotificationHeader:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - $ref: '#/components/schemas/AlarmRecord'
+ - type: object
+ properties:
+ comments:
+ $ref: '#/components/schemas/Comments'
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge multiple alarms'
+ description: >-
+ Clears, acknowledges or unacknowledges multiple alarms using patch. Depending
+ on which action is to be performed, different merge patch documents need
+ to be used.
+ requestBody:
+ description: >-
+ Patch documents for acknowledging and unacknowledging, or clearing multiple
+ alarms. The keys in the map are the alarmIds to be patched.
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No content").
+ The response message body is empty.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FailedAlarm'
+ /alarms/alarmCount:
+ get:
+ summary: Get the alarm count per perceived severity
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ The alarm count per perceived severity is returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlarmCount'
+ default:
+ description: Response in case of error. The error case needs rework.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}:
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge a single alarm'
+ description: >-
+ Clears, acknowledges or uncknowldeges a single alarm by patching the alarm
+ information. A conditional acknowledge request based on the perceived
+ severity is not supported.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to be patched.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case (204 No content).
+ The response message body is absent.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}/comments:
+ post:
+ summary: Add a comment to a single alarm
+ description: >-
+ Adds a comment to an alarm identified by alarmId. The id of the new comment
+ is allocated by the producer.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to which the comment shall be added.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ responses:
+ '201':
+ description: >-
+ Success case (201 Created).
+ The representation of the newly created comment resource shall be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ headers:
+ Location:
+ description: URI of the newly created comment resource.
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+ /subscriptions:
+ post:
+ summary: Create a subscription
+ description: >-
+ To create a subscription the representation of the subscription is
+ POSTed on the /subscriptions collection resource.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ responses:
+ '201':
+ description: >-
+ Success case ("201 Created").
+ The representation of the newly created subscription resource shall
+ be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ headers:
+ Location:
+ description: URI of the newly created subscription resource
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ callbacks:
+ notifyNewAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyNewAlarm'
+ - $ref: '#/components/schemas/NotifyNewSecAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyClearedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyClearedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyChangedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarmGeneral:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyChangedAlarmGeneral'
+ - $ref: '#/components/schemas/NotifyChangedSecAlarmGeneral'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyCorrelatedNotificationChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyCorrelatedNotificationChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAckStateChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAckStateChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyComments:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyComments'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyPotentialFaultyAlarmList:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyPotentialFaultyAlarmList'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAlarmListRebuilt:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAlarmListRebuilt'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /subscriptions/{subscriptionId}:
+ delete:
+ summary: Delete a subscription
+ description: >-
+ The subscription is deleted by deleting the corresponding subscription
+ resource. The resource to be deleted is identified with the path
+ component of the URI.
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: Identifies the subscription to be deleted.
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The subscription resource has been deleted. The response message body
+ is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+components:
+ schemas:
+
+ #---- Definition of AlarmRecord ----------------------------------------------------#
+
+ AlarmId:
+ type: string
+ AlarmType:
+ type: string
+ enum:
+ - COMMUNICATIONS_ALARM
+ - QUALITY_OF_SERVICE_ALARM
+ - PROCESSING_ERROR_ALARM
+ - EQUIPMENT_ALARM
+ - ENVIRONMENTAL_ALARM
+ - INTEGRITY_VIOLATION
+ - OPERATIONAL_VIOLATION
+ - PHYSICAL_VIOLATION
+ - SECURITY_SERVICE_OR_MECHANISM_VIOLATION
+ - TIME_DOMAIN_VIOLATION
+ ProbableCause:
+ description: >-
+ The value of the probable cause may be a specific standardized string, or any
+ vendor provided string. Probable cause strings are not standardized in the
+ present document. They may be added in a future version. Up to then the
+ mapping of the generic probable cause strings "PROBABLE_CAUSE_001" to
+ "PROBABLE_CAUSE_005" is vendor specific.
+ The value of the probable cause may also be an integer. The mapping of integer
+ values to probable causes is vendor specific.
+ oneOf:
+ - anyOf:
+ - type: string
+ enum:
+ - PROBABLE_CAUSE_001
+ - PROBABLE_CAUSE_002
+ - PROBABLE_CAUSE_003
+ - PROBABLE_CAUSE_004
+ - PROBABLE_CAUSE_005
+ - type: string
+ - type: integer
+ SpecificProblem:
+ oneOf:
+ - type: string
+ - type: integer
+ PerceivedSeverity:
+ type: string
+ enum:
+ - INDETERMINATE
+ - CRITICAL
+ - MAJOR
+ - MINOR
+ - WARNING
+ - CLEARED
+ TrendIndication:
+ type: string
+ enum:
+ - MORE_SEVERE
+ - NO_CHANGE
+ - LESS_SEVERE
+ ThresholdHysteresis:
+ type: object
+ required:
+ - high
+ properties:
+ high:
+ oneOf:
+ - type: integer
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ low:
+ $ref: 'comDefs.yaml#/components/schemas/Float'
+ ThresholdLevelInd:
+ type: object
+ required:
+ - up
+ properties:
+ up:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ low:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ ThresholdInfo:
+ type: object
+ required:
+ - observedMeasurement
+ - observedValue
+ properties:
+ observedMeasurement:
+ type: string
+ observedValue:
+ type: integer
+ oneOf:
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ thresholdLevelInd:
+ $ref: '#/components/schemas/ThresholdLevelInd'
+ armTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ CorrelatedNotification:
+ type: object
+ required:
+ - source
+ - notificationId
+ properties:
+ sourceObjectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationIds:
+ type: array
+ items:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ CorrelatedNotifications:
+ type: array
+ items:
+ $ref: '#/components/schemas/CorrelatedNotification'
+ AckState:
+ type: string
+ enum:
+ - ACKNOWLEDGED
+ - UNACKNOWLEDGED
+
+ AlarmRecord:
+ description: >-
+ The alarmId is not a property of an alarm record. It is used as key
+ in the map of alarm records instead.
+ type: object
+ properties:
+ # alarmId:
+ # $ref: '#/components/schemas/AlarmId'
+ objectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationId:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ alarmRaisedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmChangedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmClearedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdinfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+
+ rootCauseIndicator:
+ type: boolean
+
+ ackTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+
+ #---- Definition of alarm notifications --------------------------------------------#
+
+ AlarmNotificationType:
+ type: string
+ enum:
+ - notifyNewAlarm
+ - notifyChangedAlarm
+ - notifyChangedAlarmGeneral
+ - notifyAckStateChanged
+ - notifyCorrelatedNotificationChanged
+ - notifyComments
+ - notifyClearedAlarm
+ - notifyAlarmListRebuiltAlarm
+ - notifyPotentialFaultyAlarmList
+ AlarmListAlignmentRequirement:
+ type: string
+ enum:
+ - ALIGNMENT_REQUIRED
+ - ALIGNMENT_NOT_REQUIRED
+
+ NotifyNewAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ NotifyNewSecAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ NotifyClearedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ NotifyChangedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ NotifyChangedAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyChangedSecAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyCorrelatedNotificationChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - correlatedNotifications
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ rootCauseIndicator:
+ type: boolean
+ NotifyAckStateChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - ackState
+ - ackUserId
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ NotifyComments:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - comments
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ comments:
+ $ref: '#/components/schemas/Comments'
+ NotifyPotentialFaultyAlarmList:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ NotifyAlarmListRebuilt:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ alarmListAlignmentRequirement:
+ $ref: '#/components/schemas/AlarmListAlignmentRequirement'
+
+ #---- Definition of query parameters -----------------------------------------------#
+
+ AlarmAckState:
+ type: string
+ enum:
+ - ALL_ALARMS
+ - ALL_ACTIVE_ALARMS
+ - ALL_ACTIVE_AND_ACKNOWLEDGED_ALARMS
+ - ALL_ACTIVE_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_CLEARED_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_UNACKNOWLEDGED_ALARMS
+
+ #---- Definition of patch documents ------------------------------------------------#
+
+ MergePatchAcknowledgeAlarm:
+ description: >-
+ Patch document acknowledging or unacknowledging a single alarm. For
+ acknowleding an alarm the value of ackState is ACKNOWLEDGED, for unacknowleding
+ an alarm the value of ackState is UNACKNOWLEDGED.
+ type: object
+ required:
+ - ackUserId
+ - ackState
+ properties:
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ MergePatchClearAlarm:
+ description: Patch document for clearing a single alarm
+ type: object
+ required:
+ - clearUserId
+ - perceivedSeverity
+ properties:
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ perceivedSeverity:
+ type: string
+ enum:
+ - CLEARED
+
+ #---- Definition of method responses -----------------------------------------------#
+
+ FailedAlarm:
+ type: object
+ required:
+ - alarmId
+ - failureReason
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ failureReason:
+ type: string
+
+ #---- Definition of resources ------------------------------------------------------#
+
+ AlarmCount:
+ type: object
+ required:
+ - criticalCount
+ - majorCount
+ - minorCount
+ - warningCount
+ - indeterminateCount
+ - clearedCount
+ properties:
+ criticalCount:
+ type: integer
+ majorCount:
+ type: integer
+ minorCount:
+ type: integer
+ warningCount:
+ type: integer
+ indeterminateCount:
+ type: integer
+ clearedCount:
+ type: integer
+ Comment:
+ type: object
+ properties:
+ commentTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ commentUserId:
+ type: string
+ commentSystemId:
+ type: string
+ commentText:
+ type: string
+ Comments:
+ description: >-
+ Collection of comments. The comment identifiers are allocated by the
+ MnS producer and used as key in the map.
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Comment'
+ Subscription:
+ type: object
+ properties:
+ consumerReference:
+ $ref: 'comDefs1.yaml#/components/schemas/Uri'
+ timeTick:
+ $ref: 'comDefs1.yaml#/components/schemas/Long'
+ filter:
+ $ref: 'comDefs1.yaml#/components/schemas/Filter'
\ No newline at end of file
--- /dev/null
+openapi: 3.0.1
+info:
+ title: Fault Supervision MnS
+ version: 16.5.0
+ description: >-
+ OAS 3.0.1 definition of the Fault Supervision MnS
+ © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
+ All rights reserved.
+externalDocs:
+ description: 3GPP TS 28.532 V16.5.0; Generic management services
+ url: http://www.3gpp.org/ftp/Specs/archive/28_series/28.532/
+servers:
+ - url: '{MnSRoot}/FaultSupervisionMnS/{version}'
+ variables:
+ MnSRoot:
+ description: See subclause 4.4.3 of TS 32.158
+ default: http://example.com/3GPPManagement
+ version:
+ description: Version number of the OpenAPI definition
+ default: XXX
+paths:
+ /alarms:
+ get:
+ summary: Retrieve multiple alarms
+ description: >-
+ Retrieves the alarms identified by alarmAckState, baseObjectInstance
+ and filter.
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: baseObjectInstance
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/Filter'
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ Returns the alarms identified in the request. The alarmId is the key
+ of the map.
+ content:
+ application/json:
+ schema:
+ type: object
+ additionalProperties:
+ type: object
+ allOf:
+ - type: object
+ properties:
+ lastNotificationHeader:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - $ref: '#/components/schemas/AlarmRecord'
+ - type: object
+ properties:
+ comments:
+ $ref: '#/components/schemas/Comments'
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge multiple alarms'
+ description: >-
+ Clears, acknowledges or unacknowledges multiple alarms using patch. Depending
+ on which action is to be performed, different merge patch documents need
+ to be used.
+ requestBody:
+ description: >-
+ Patch documents for acknowledging and unacknowledging, or clearing multiple
+ alarms. The keys in the map are the alarmIds to be patched.
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - type: object
+ additionalProperties:
+ $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No content").
+ The response message body is empty.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/FailedAlarm'
+ /alarms/alarmCount:
+ get:
+ summary: Get the alarm count per perceived severity
+ parameters:
+ - name: alarmAckState
+ in: query
+ required: false
+ schema:
+ $ref: '#/components/schemas/AlarmAckState'
+ - name: filter
+ in: query
+ required: false
+ schema:
+ type: string
+ responses:
+ '200':
+ description: >-
+ Success case ("200 OK").
+ The alarm count per perceived severity is returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/AlarmCount'
+ default:
+ description: Response in case of error. The error case needs rework.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}:
+ patch:
+ summary: 'Clear, acknowledge or unacknowledge a single alarm'
+ description: >-
+ Clears, acknowledges or uncknowldeges a single alarm by patching the alarm
+ information. A conditional acknowledge request based on the perceived
+ severity is not supported.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to be patched.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/merge-patch+json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/MergePatchAcknowledgeAlarm'
+ - $ref: '#/components/schemas/MergePatchClearAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case (204 No content).
+ The response message body is absent.
+ default:
+ description: Response in case of error.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /alarms/{alarmId}/comments:
+ post:
+ summary: Add a comment to a single alarm
+ description: >-
+ Adds a comment to an alarm identified by alarmId. The id of the new comment
+ is allocated by the producer.
+ parameters:
+ - name: alarmId
+ in: path
+ description: Identifies the alarm to which the comment shall be added.
+ required: true
+ schema:
+ type: string
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ responses:
+ '201':
+ description: >-
+ Success case (201 Created).
+ The representation of the newly created comment resource shall be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Comment'
+ headers:
+ Location:
+ description: URI of the newly created comment resource.
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+ /subscriptions:
+ post:
+ summary: Create a subscription
+ description: >-
+ To create a subscription the representation of the subscription is
+ POSTed on the /subscriptions collection resource.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ responses:
+ '201':
+ description: >-
+ Success case ("201 Created").
+ The representation of the newly created subscription resource shall
+ be returned.
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Subscription'
+ headers:
+ Location:
+ description: URI of the newly created subscription resource
+ required: true
+ schema:
+ type: string
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ callbacks:
+ notifyNewAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyNewAlarm'
+ - $ref: '#/components/schemas/NotifyNewSecAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyClearedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyClearedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarm:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyChangedAlarm'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyChangedAlarmGeneral:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ oneOf:
+ - $ref: '#/components/schemas/NotifyChangedAlarmGeneral'
+ - $ref: '#/components/schemas/NotifyChangedSecAlarmGeneral'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyCorrelatedNotificationChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyCorrelatedNotificationChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAckStateChanged:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAckStateChanged'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyComments:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyComments'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyPotentialFaultyAlarmList:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyPotentialFaultyAlarmList'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ notifyAlarmListRebuilt:
+ '{request.body#/consumerReference}':
+ post:
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/NotifyAlarmListRebuilt'
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The notification is successfully delivered. The response message
+ body is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+ /subscriptions/{subscriptionId}:
+ delete:
+ summary: Delete a subscription
+ description: >-
+ The subscription is deleted by deleting the corresponding subscription
+ resource. The resource to be deleted is identified with the path
+ component of the URI.
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: Identifies the subscription to be deleted.
+ required: true
+ schema:
+ type: string
+ responses:
+ '204':
+ description: >-
+ Success case ("204 No Content").
+ The subscription resource has been deleted. The response message body
+ is absent.
+ default:
+ description: Error case.
+ content:
+ application/json:
+ schema:
+ $ref: 'comDefs.yaml#/components/schemas/ErrorResponse'
+
+components:
+ schemas:
+
+ #---- Definition of AlarmRecord ----------------------------------------------------#
+
+ AlarmId:
+ type: string
+ AlarmType:
+ type: string
+ enum:
+ - COMMUNICATIONS_ALARM
+ - QUALITY_OF_SERVICE_ALARM
+ - PROCESSING_ERROR_ALARM
+ - EQUIPMENT_ALARM
+ - ENVIRONMENTAL_ALARM
+ - INTEGRITY_VIOLATION
+ - OPERATIONAL_VIOLATION
+ - PHYSICAL_VIOLATION
+ - SECURITY_SERVICE_OR_MECHANISM_VIOLATION
+ - TIME_DOMAIN_VIOLATION
+ ProbableCause:
+ description: >-
+ The value of the probable cause may be a specific standardized string, or any
+ vendor provided string. Probable cause strings are not standardized in the
+ present document. They may be added in a future version. Up to then the
+ mapping of the generic probable cause strings "PROBABLE_CAUSE_001" to
+ "PROBABLE_CAUSE_005" is vendor specific.
+ The value of the probable cause may also be an integer. The mapping of integer
+ values to probable causes is vendor specific.
+ oneOf:
+ - anyOf:
+ - type: string
+ enum:
+ - PROBABLE_CAUSE_001
+ - PROBABLE_CAUSE_002
+ - PROBABLE_CAUSE_003
+ - PROBABLE_CAUSE_004
+ - PROBABLE_CAUSE_005
+ - type: string
+ - type: integer
+ SpecificProblem:
+ oneOf:
+ - type: string
+ - type: integer
+ PerceivedSeverity:
+ type: string
+ enum:
+ - INDETERMINATE
+ - CRITICAL
+ - MAJOR
+ - MINOR
+ - WARNING
+ - CLEARED
+ TrendIndication:
+ type: string
+ enum:
+ - MORE_SEVERE
+ - NO_CHANGE
+ - LESS_SEVERE
+ ThresholdHysteresis:
+ type: object
+ required:
+ - high
+ properties:
+ high:
+ oneOf:
+ - type: integer
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ low:
+ $ref: 'comDefs.yaml#/components/schemas/Float'
+ ThresholdLevelInd:
+ type: object
+ required:
+ - up
+ properties:
+ up:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ low:
+ $ref: '#/components/schemas/ThresholdHysteresis'
+ ThresholdInfo:
+ type: object
+ required:
+ - observedMeasurement
+ - observedValue
+ properties:
+ observedMeasurement:
+ type: string
+ observedValue:
+ type: integer
+ oneOf:
+ - $ref: 'comDefs.yaml#/components/schemas/Float'
+ thresholdLevelInd:
+ $ref: '#/components/schemas/ThresholdLevelInd'
+ armTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ CorrelatedNotification:
+ type: object
+ required:
+ - source
+ - notificationId
+ properties:
+ sourceObjectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationIds:
+ type: array
+ items:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ CorrelatedNotifications:
+ type: array
+ items:
+ $ref: '#/components/schemas/CorrelatedNotification'
+ AckState:
+ type: string
+ enum:
+ - ACKNOWLEDGED
+ - UNACKNOWLEDGED
+
+ AlarmRecord:
+ description: >-
+ The alarmId is not a property of an alarm record. It is used as key
+ in the map of alarm records instead.
+ type: object
+ properties:
+ # alarmId:
+ # $ref: '#/components/schemas/AlarmId'
+ objectInstance:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ notificationId:
+ $ref: 'comDefs.yaml#/components/schemas/NotificationId'
+ alarmRaisedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmChangedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmClearedTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdinfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+
+ rootCauseIndicator:
+ type: boolean
+
+ ackTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+
+ #---- Definition of alarm notifications --------------------------------------------#
+
+ AlarmNotificationType:
+ type: string
+ enum:
+ - notifyNewAlarm
+ - notifyChangedAlarm
+ - notifyChangedAlarmGeneral
+ - notifyAckStateChanged
+ - notifyCorrelatedNotificationChanged
+ - notifyComments
+ - notifyClearedAlarm
+ - notifyAlarmListRebuiltAlarm
+ - notifyPotentialFaultyAlarmList
+ AlarmListAlignmentRequirement:
+ type: string
+ enum:
+ - ALIGNMENT_REQUIRED
+ - ALIGNMENT_NOT_REQUIRED
+
+ NotifyNewAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ NotifyNewSecAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ NotifyClearedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ NotifyChangedAlarm:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ NotifyChangedAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ specificProblem:
+ $ref: '#/components/schemas/SpecificProblem'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ backedUpStatus:
+ type: boolean
+ backUpObject:
+ $ref: 'comDefs.yaml#/components/schemas/Dn'
+ trendIndication:
+ $ref: '#/components/schemas/TrendIndication'
+ thresholdInfo:
+ $ref: '#/components/schemas/ThresholdInfo'
+ stateChangeDefinition:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeValueChangeSet'
+ monitoredAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ proposedRepairActions:
+ type: string
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyChangedSecAlarmGeneral:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - serviceUser
+ - serviceProvider
+ - securityAlarmDetector
+ - changedAlarmAttributes
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ additionalText:
+ type: string
+ additionalInformation:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ rootCauseIndicator:
+ type: boolean
+ serviceUser:
+ type: string
+ serviceProvider:
+ type: string
+ securityAlarmDetector:
+ type: string
+ changedAlarmAttributes:
+ $ref: 'comDefs.yaml#/components/schemas/AttributeNameValuePairSet'
+ NotifyCorrelatedNotificationChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - correlatedNotifications
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ correlatedNotifications:
+ $ref: '#/components/schemas/CorrelatedNotifications'
+ rootCauseIndicator:
+ type: boolean
+ NotifyAckStateChanged:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - ackState
+ - ackUserId
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmI'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ NotifyComments:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - alarmId
+ - alarmType
+ - probableCause
+ - perceivedSeverity
+ - comments
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ alarmType:
+ $ref: '#/components/schemas/AlarmType'
+ probableCause:
+ $ref: '#/components/schemas/ProbableCause'
+ perceivedSeverity:
+ $ref: '#/components/schemas/PerceivedSeverity'
+ comments:
+ $ref: '#/components/schemas/Comments'
+ NotifyPotentialFaultyAlarmList:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ NotifyAlarmListRebuilt:
+ allOf:
+ - $ref: 'comDefs.yaml#/components/schemas/NotificationHeader'
+ - type: object
+ required:
+ - reason
+ properties:
+ reason:
+ type: string
+ alarmListAlignmentRequirement:
+ $ref: '#/components/schemas/AlarmListAlignmentRequirement'
+
+ #---- Definition of query parameters -----------------------------------------------#
+
+ AlarmAckState:
+ type: string
+ enum:
+ - ALL_ALARMS
+ - ALL_ACTIVE_ALARMS
+ - ALL_ACTIVE_AND_ACKNOWLEDGED_ALARMS
+ - ALL_ACTIVE_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_CLEARED_AND_UNACKNOWLEDGED_ALARMS
+ - ALL_UNACKNOWLEDGED_ALARMS
+
+ #---- Definition of patch documents ------------------------------------------------#
+
+ MergePatchAcknowledgeAlarm:
+ description: >-
+ Patch document acknowledging or unacknowledging a single alarm. For
+ acknowleding an alarm the value of ackState is ACKNOWLEDGED, for unacknowleding
+ an alarm the value of ackState is UNACKNOWLEDGED.
+ type: object
+ required:
+ - ackUserId
+ - ackState
+ properties:
+ ackUserId:
+ type: string
+ ackSystemId:
+ type: string
+ ackState:
+ $ref: '#/components/schemas/AckState'
+ MergePatchClearAlarm:
+ description: Patch document for clearing a single alarm
+ type: object
+ required:
+ - clearUserId
+ - perceivedSeverity
+ properties:
+ clearUserId:
+ type: string
+ clearSystemId:
+ type: string
+ perceivedSeverity:
+ type: string
+ enum:
+ - CLEARED
+
+ #---- Definition of method responses -----------------------------------------------#
+
+ FailedAlarm:
+ type: object
+ required:
+ - alarmId
+ - failureReason
+ properties:
+ alarmId:
+ $ref: '#/components/schemas/AlarmId'
+ failureReason:
+ type: string
+
+ #---- Definition of resources ------------------------------------------------------#
+
+ AlarmCount:
+ type: object
+ required:
+ - criticalCount
+ - majorCount
+ - minorCount
+ - warningCount
+ - indeterminateCount
+ - clearedCount
+ properties:
+ criticalCount:
+ type: integer
+ majorCount:
+ type: integer
+ minorCount:
+ type: integer
+ warningCount:
+ type: integer
+ indeterminateCount:
+ type: integer
+ clearedCount:
+ type: integer
+ Comment:
+ type: object
+ properties:
+ commentTime:
+ $ref: 'comDefs.yaml#/components/schemas/DateTime'
+ commentUserId:
+ type: string
+ commentSystemId:
+ type: string
+ commentText:
+ type: string
+ Comments:
+ description: >-
+ Collection of comments. The comment identifiers are allocated by the
+ MnS producer and used as key in the map.
+ type: object
+ additionalProperties:
+ $ref: '#/components/schemas/Comment'
+ Subscription:
+ type: object
+ properties:
+ consumerReference:
+ $ref: 'comDefs.yaml#/components/schemas/Uri'
+ timeTick:
+ $ref: 'comDefs.yaml#/components/schemas/Long'
+ filter:
+ $ref: 'comDefs.yaml#/components/schemas/Filter'
\ No newline at end of file
--- /dev/null
+[
+ {
+ "publicURL": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/ves7_valid_eventWithStndDefinedFields_with_valid_schema_ref.json",
+ "localURL": "3gpp/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/ves7_valid_eventWithStndDefinedFields_with_valid_schema_ref.json"
+ },
+ {
+ "publicURL": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_file_reference.yaml",
+ "localURL": "3gpp/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_file_reference.yaml"
+ },
+ {
+ "publicURL": "https://forge.3gpp.org/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_internal_reference.yaml",
+ "localURL": "3gpp/rep/sa5/MnS/blob/SA88-Rel16/OpenAPI/faultMnS_wrong_internal_reference.yaml"
+ }
+]
\ No newline at end of file
--- /dev/null
+###############################################################################
+##
+## Collector Server config
+##
+## - Default values are shown as commented settings.
+##
+###############################################################################
+##
+## HTTP(S) service
+##
+## Normally:
+##
+## - 8080 is http service
+## - https is disabled by default
+##
+## - At this time, the server always binds to 0.0.0.0
+##
+##
+collector.service.port=8080
+
+## Authentication is only supported via secure port
+## When enabled - require valid keystore defined
+collector.service.secure.port=8443
+
+# auth.method flags:
+#
+# noAuth - default option - no security (http)
+# certBasicAuth - auth by certificate and basic auth username / password (https)
+auth.method=certBasicAuth
+
+## Combination of userid,hashPassword encoded pwd list to be supported
+## userid and pwd comma separated; pipe delimitation between each pair
+## Password is generated by crypt-password library using BCrypt algorithm stored in dcaegen2/sdk package
+## or https://nexus.onap.org/#nexus-search;quick~crypt-password
+header.authlist=sample1,$2a$10$0buh.2WeYwN868YMwnNNEuNEAMNYVU9.FSMJGyIKV3dGET/7oGOi6
+
+## The keystore must be setup per installation when secure port is configured
+collector.keystore.file.location=etc/keystore
+collector.keystore.passwordfile=etc/passwordfile
+
+collector.cert.subject.matcher=etc/certSubjectMatcher.properties
+
+## The truststore must be setup per installation when mutual tls support is configured
+collector.truststore.file.location=etc/truststore
+collector.truststore.passwordfile=etc/trustpasswordfile
+
+## Schema Validation checkflag
+## default no validation checkflag (-1)
+## If enabled (1) - schemafile location must be specified
+collector.schema.checkflag=1
+collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2_ONAP.json\"}
+
+## Schema StndDefinedFields Validation checkflag
+## default no validation checkflag (-1)
+## If enabled (1) - schema files locations must be specified, mapping file path must be specified, schema reference path
+## in event json must be specified, path to stndDefined data field in event json must be specified
+collector.externalSchema.checkflag=1
+collector.externalSchema.schemasLocation=./etc/externalRepo/
+collector.externalSchema.mappingFileLocation=./etc/externalRepo/schema-map.json
+event.externalSchema.schemaRefPath=/event/stndDefinedFields/schemaReference
+event.externalSchema.stndDefinedDataPath=/event/stndDefinedFields/data
+
+## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
+collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance
+collector.dmaapfile=./etc/DmaapConfig.json
+
+## Event transformation Flag - when set expects configurable transformation
+## defined under ./etc/eventTransform.json
+## Enabled by default; to disable set to 0
+event.transform.flag=1
+
+# Describes at what frequency (measured in minutes) should application try to fetch config from CBS
+collector.dynamic.config.update.frequency=5
[Arguments] ${keyword} ${session} ${evtpath} ${evtjson} ${error_type} @{error_content}
${evtdata}= Get Data From File ${evtjson}
${err_msg}= Run Keyword And Expect Error ${error_type} ${keyword} ${session} ${evtpath} ${evtdata}
- :FOR ${content} IN @{error_content}
- \ Should Contain ${err_msg} ${content}
+ FOR ${content} IN @{error_content}
+ Should Contain ${err_msg} ${content}
+ END
Log Recieved error message ${err_msg}
Run Healthcheck
${VES_STND_DEFINED_INVALID_TYPE_DATA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves_stdnDefined_invalid_type_data_field.json
${VES_CERT_BASIC_AUTH_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_basic_auth.properties
${VES_DISABLED_STNDDEFINED_COLLECTOR_PROPERTIES} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_stnd_defined.properties
+${VES_ADD_REFERENCE_TO_OTHER_SCHEMAS} %{WORKSPACE}/tests/dcaegen2/testcases/resources/collector_stnd_defined_new_schema_map.properties
+${VES_VALID_JSON_WITH_RFERENCE_TO_VALID_SCHEMA} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_with_valid_schema_ref.json
+${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_FILE_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_to_schema_with_wrong_file_ref.json
+${VES_VALID_JSON_V7_STND_DEF_FIELDS_WRONG_SCHEMA_INTERNAL_REF} %{WORKSPACE}/tests/dcaegen2/testcases/assets/json_events/ves7_valid_eventWithStndDefinedFields_to_schema_with_wrong_internal_ref.json
#DCAE Health Check
${CONFIG_BINDING_URL} http://localhost:8443
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2020 Nokia. 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.
+if [ $# -ne 1 ]; then
+ echo "Incorrect number of parameters"
+ exit 1
+fi
+
+LOCAL_COLLECTOR_PROPERTIES_PATH=$1
+FILENAME=$(basename $LOCAL_COLLECTOR_PROPERTIES_PATH)
+TEST_FILES_PATH=$2
+ETC_PATH=/opt/app/VESCollector/etc
+APP_CONTROLLER_PATH=/opt/app/VESCollector/bin/appController.sh
+
+docker exec vesc $APP_CONTROLLER_PATH stop
+sleep 2
+docker cp $LOCAL_COLLECTOR_PROPERTIES_PATH vesc:$ETC_PATH
+sleep 10
+docker cp $TEST_FILES_PATH vesc:$ETC_PATH
+sleep 10
+docker exec vesc mv $ETC_PATH/$FILENAME $ETC_PATH/collector.properties
+docker exec vesc $APP_CONTROLLER_PATH start
+sleep 5
+echo "VES Collector Restarted with overridden collector.properties"
--- /dev/null
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass::/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore13.jks
--- /dev/null
+TRUSTSTORES_PATHS=/var/certs/truststore.jks:/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=/var/certs/truststoreJks.pass::/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore13.jks
+KEYSTORE_DESTINATION_PATHS=/var/certs/cert.jks
--- /dev/null
+wgg2_fLSQ8I4sLfyUOCC7uYn
\ No newline at end of file
--- /dev/null
+TRUSTSTORES_PATHS=/var/certs/truststore.pem:/var/certs/truststore.p12
+TRUSTSTORES_PASSWORDS_PATHS=:/var/certs/truststoreP12.pass
+KEYSTORE_SOURCE_PATHS=/var/certs/external/keystore.jks:/var/certs/external/keystore.pass
+KEYSTORE_DESTINATION_PATHS=/var/certs/keystore.jks:/var/certs/keystore.pass
--- /dev/null
+*** Settings ***
+
+Documentation Certifcate Post Processors test case scenarios
+Library RequestsLibrary
+Resource ./resources/test-keywords.robot
+
+*** Test Cases ***
+
+Cert Post Processor fails when file extension is invalid (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with invalid truststore extension env and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_FILE_EXTENSION} ${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION}
+
+Cert Post Processor fails when a variable is empty (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with empty truststore password path env and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_EMPTY_PASSWORDS} ${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION}
+
+Cert Post Processor fails when truststore and passwords envs not provided (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with invalid empty envs and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_EMPTY} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Cert Post Processor fails when list sizes are different (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with different truststore and password envs size and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_FILE_LIST_SIZE} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Cert Post Processor fails when truststore paths are invalid (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with invalid truststore path and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_TRUSTSTORE_PATHS} ${EXITCODE_TRUSTSTORE_FILE_FACTORY_EXCEPTION}
+
+Cert Post Processor fails when password path is invalid (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with invalid password path and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_PASSWORD_PATHS} ${EXITCODE_PASSWORD_READER_EXCEPTION}
+
+Cert Post Processor fails when password file pair is invalid (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with incorrect password env and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_PASSWORD} ${EXITCODE_TRUSTSTORE_LOAD_FILE_EXCEPTION}
+
+Cert Post Processor fails when pem does not contain cert (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with empty pem truststore and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_EMPTY_CERTS} ${EXITCODE_MISSING_TRUSTSTORE_EXCEPTIONSUCCESS}
+
+Cert Post Processor fails when aliases are duplicated (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with duplicated aliases in truststores and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_DUPLICATED_ALIASES} ${EXITCODE_ALIAS_CONFLICT_EXCEPTION}
+
+Cert Post Processor merges successfully jks pem p12 (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with valid env file and expect merged certs from jks, pem and p12
+ Run Cert Service Post Processor And Merge Truststore Files To Jks ${ENV_FILE_JKS_PEM_P12} ${EXITCODE_SUCCESS} ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${JKS_TRUSTSTORE_EXPECTED_PATH}
+
+Cert Post Processor merges successfully pem p12 (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with valid env file and expect merged certs from pem and p12
+ Run Cert Service Post Processor And Merge Truststore Files To Pem ${ENV_FILE_PEM_P12} ${EXITCODE_SUCCESS} ${PEM_TRUSTSTORE_MOUNT_PATH} ${PEM_TRUSTSTORE_EXPECTED_PATH}
+
+Cert Post Processor ends successfully with single truststore (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with one truststore in env file and expect code 0
+ Run Cert Service Post Processor And Merge Truststore Files To Jks ${ENV_FILE_SINGLE_TRUSTSTORE} ${EXITCODE_SUCCESS} ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${TRUSTSTORE_JKS}
+
+Cert Post Processor fails when file to copy does not exist (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with invalid extra optional env as a path to file and expect error code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_INVALID_KEYSTORE_SOURCE_PATHS} ${EXITCODE_KEYSTORE_NOT_EXIST_EXCEPTION}
+
+Cert Post Processor fails when only one extra optional env is set (merger)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with empty extra optional env and expect code
+ Run Cert Service Post Processor And Expect Error ${ENV_FILE_EMPTY_KEYSTORE_DESTINATION_PATH} ${EXITCODE_CONFIGURATION_EXCEPTION}
+
+Cert Post Processor successfully backs up files (copier)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with valid env file and expect successfully backed up file
+ Run Cert Service Post Processor And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKSBAK_KEYSTORE_EXPECTED_PATH}
+
+Cert Post Processor successfully copies file (copier)
+ [Tags] OOM-CERTSERVICE-POST-PROCESSOR
+ [Documentation] Run with valid env file and expect successfully copied file
+ Run Cert Service Post Processor And Check Copied Keystore Files ${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${EXITCODE_SUCCESS} ${JKS_KEYSTORE_MOUNT_PATH} ${KEYSTORE_JKS_PASS} ${JKS_KEYSTORE_EXPECTED_PATH}
+
--- /dev/null
+
+import jks
+
+class JksValidator:
+
+ def get_jks_entries(self, jks_path, password_path):
+ store = jks.KeyStore.load(jks_path, open(password_path, 'rb').read())
+ return store.entries
+
+ def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
+ result_keys = self.get_jks_entries(result_truststore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_truststore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].cert == expected_keys[k].cert):
+ return False
+ return True
+
+ def assert_jks_keystores_equal(self, result_keystore_path, password_path, expected_keystore_path):
+ result_keys = self.get_jks_entries(result_keystore_path, password_path)
+ expected_keys = self.get_jks_entries(expected_keystore_path, password_path)
+ if len(result_keys) != len(expected_keys):
+ return False
+ for k in result_keys:
+ if not (k in expected_keys and result_keys[k].pkey == expected_keys[k].pkey):
+ return False
+ return True
ARCHIVES_PATH = os.getenv("WORKSPACE") + "/archives/"
-class TrustMergerManager:
+class PostProcessorDockerContainerUtils:
def __init__(self, mount_path, truststores_path):
self.mount_path = mount_path
self.truststores_path = truststores_path
- def run_merger_container(self, merger_image, merger_name, path_to_env):
+ def run_container(self, docker_image, image_name, path_to_env):
self.remove_mount_dir()
shutil.copytree(self.truststores_path, self.mount_path)
client = docker.from_env()
environment = EnvsReader().read_env_list_from_file(path_to_env)
container = client.containers.run(
- image=merger_image,
- name=merger_name,
+ image=docker_image,
+ name=image_name,
environment=environment,
user='root', # Run container as root to avoid permission issues with volume mount access
mounts=[Mount(target='/var/certs', source=self.mount_path, type='bind')],
if os.path.exists(self.mount_path):
shutil.rmtree(self.mount_path)
- def remove_merger_container_and_save_logs(self, container_name, log_file_name):
+ def remove_container_and_save_logs(self, container_name, log_file_name):
client = docker.from_env()
container = client.containers.get(container_name)
- text_file = open(ARCHIVES_PATH + "merger_container_" + log_file_name + ".log", "w")
+ text_file = open(ARCHIVES_PATH + "certservice_postprocessor_container_" + log_file_name + ".log", "w")
text_file.write(container.logs())
text_file.close()
container.remove()
--- /dev/null
+*** Settings ***
+
+Resource ../../../common.robot
+Resource ./test-properties.robot
+Library ../libraries/PostProcessorDockerContainerUtils.py ${MOUNT_PATH} ${TRUSTSTORES_PATH}
+Library ../libraries/JksValidator.py
+Library ../libraries/PemTruststoreValidator.py
+
+*** Keywords ***
+
+Run Cert Service Post Processor And Expect Error
+ [Documentation] Run Cert Service Post Processor Container And Validate Exit Code
+ [Arguments] ${env_file} ${expected_exit_code}
+ ${exit_code}= Run Container ${CERT_POST_PROCESSOR_DOCKER_IMAGE} ${CERT_POST_PROCESSOR_CONTAINER_NAME} ${env_file}
+ Remove Container And Save Logs ${CERT_POST_PROCESSOR_CONTAINER_NAME} negative_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+
+Run Cert Service Post Processor And Merge Truststore Files To Jks
+ [Documentation] Run Cert Service Post Processor Container And Validate Exit Code And Provided Truststore Files
+ [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
+ ${exit_code}= Run Container ${CERT_POST_PROCESSOR_DOCKER_IMAGE} ${CERT_POST_PROCESSOR_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Jks Truststores Equal ${jks_path} ${jks_password} ${expected_jks_path}
+ Remove Container And Save Logs ${CERT_POST_PROCESSOR_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
+Run Cert Service Post Processor And Check Copied Keystore Files
+ [Documentation] Run Cert Service Post Processor Container And Validate Exit Code And Provided Keystore Files
+ [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
+ ${exit_code}= Run Container ${CERT_POST_PROCESSOR_DOCKER_IMAGE} ${CERT_POST_PROCESSOR_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Jks Keystores Equal ${jks_path} ${jks_password} ${expected_jks_path}
+ Remove Container And Save Logs ${CERT_POST_PROCESSOR_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
+Run Cert Service Post Processor And Merge Truststore Files To Pem
+ [Documentation] Run Cert Service Post Processor Container And Validate Exit Code And Files
+ [Arguments] ${env_file} ${expected_exit_code} ${pem_path} ${expected_pem_path}
+ ${exit_code}= Run Container ${CERT_POST_PROCESSOR_DOCKER_IMAGE} ${CERT_POST_PROCESSOR_CONTAINER_NAME} ${env_file}
+ ${files_equal}= Assert Pem Truststores Equal ${pem_path} ${expected_pem_path}
+ Remove Container And Save Logs ${CERT_POST_PROCESSOR_CONTAINER_NAME} positive_path
+ Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
+ Should Be True ${files_equal}
+
--- /dev/null
+*** Variables ***
+
+${CERT_POST_PROCESSOR_DOCKER_IMAGE} nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:latest
+${CERT_POST_PROCESSOR_CONTAINER_NAME} %{CertServicePostProcessorContainerName}
+${BASE_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/postprocessor
+${MOUNT_PATH} ${BASE_PATH}/tmp
+${TRUSTSTORES_PATH} ${BASE_PATH}/assets/truststores
+${EXPECTED_TRUSTSTORES_PATH} ${BASE_PATH}/assets/expected_truststores
+
+${JKS_TRUSTSTORE_MOUNT_PATH} ${BASE_PATH}/tmp/truststore.jks
+${JKS_PASSWORD_MOUNT_PATH} ${BASE_PATH}/tmp/truststoreJks.pass
+${P12_TRUSTSTORE_MOUNT_PATH} ${BASE_PATH}/tmp/truststore.p12
+${P12_PASSWORD_MOUNT_PATH} ${BASE_PATH}/tmp/truststoreP12.pass
+${PEM_TRUSTSTORE_MOUNT_PATH} ${BASE_PATH}/tmp/truststore.pem
+${JKS_KEYSTORE_MOUNT_PATH} ${BASE_PATH}/tmp/external/keystore.jks
+
+${JKS_TRUSTSTORE_EXPECTED_PATH} ${BASE_PATH}/assets/expected_truststores/jksAndPemAndP12.jks
+${PEM_TRUSTSTORE_EXPECTED_PATH} ${BASE_PATH}/assets/expected_truststores/pemAndP12.pem
+${JKSBAK_KEYSTORE_EXPECTED_PATH} ${BASE_PATH}/assets/expected_keystores/keystore.jks.bak
+${JKS_KEYSTORE_EXPECTED_PATH} ${BASE_PATH}/assets/expected_keystores/keystore.jks
+
+${ENV_FILE_EMPTY} ${BASE_PATH}/assets/invalid_empty_file.env
+${ENV_FILE_INVALID_FILE_LIST_SIZE} ${BASE_PATH}/assets/invalid_different_lists_size.env
+${ENV_FILE_EMPTY_PASSWORDS} ${BASE_PATH}/assets/invalid_empty_passwords.env
+${ENV_FILE_INVALID_PASSWORD_PATHS} ${BASE_PATH}/assets/invalid_password_path.env
+${ENV_FILE_INVALID_TRUSTSTORE_PATHS} ${BASE_PATH}/assets/invalid_truststore_paths.env
+${ENV_FILE_INVALID_PASSWORD} ${BASE_PATH}/assets/invalid_file_password_pair.env
+${ENV_FILE_INVALID_FILE_EXTENSION} ${BASE_PATH}/assets/invalid_extension.env
+${ENV_FILE_DUPLICATED_ALIASES} ${BASE_PATH}/assets/invalid_duplicated_aliases.env
+${ENV_FILE_EMPTY_CERTS} ${BASE_PATH}/assets/invalid_empty_certs.env
+${ENV_FILE_JKS_PEM_P12} ${BASE_PATH}/assets/valid_jks_pem_p12.env
+${ENV_FILE_PEM_P12} ${BASE_PATH}/assets/valid_pem_p12.env
+${ENV_FILE_SINGLE_TRUSTSTORE} ${BASE_PATH}/assets/valid_single_truststore.env
+${ENV_FILE_INVALID_KEYSTORE_SOURCE_PATHS} ${BASE_PATH}/assets/invalid_keystore_source_paths.env
+${ENV_FILE_EMPTY_KEYSTORE_DESTINATION_PATH} ${BASE_PATH}/assets/invalid_empty_keystore_destination_path.env
+${ENV_FILE_EXTRA_OPTIONAL_ENVS} ${BASE_PATH}/assets/valid_envs_and_extra_optional.env
+
+${KEYSTORE_JKS} ${BASE_PATH}/assets/truststores/external/keystore.jks
+${KEYSTORE_JKS_PASS} ${BASE_PATH}/assets/truststores/external/keystore.pass
+${TRUSTSTORE_JKS} ${BASE_PATH}/assets/truststores/truststore.jks
+${TRUSTSTORE_JKS_PASS} ${BASE_PATH}/assets/truststores/truststoreJks.pass
+${TRUSTSTORE_P12} ${BASE_PATH}/assets/truststores/truststore.p12
+${TRUSTSTORE_P12_PASS} ${BASE_PATH}/assets/truststores/truststore.pass
+${TRUSTSTORE_PEM} ${BASE_PATH}/assets/truststores/truststore.pem
+
+${EXITCODE_SUCCESS} 0
+${EXITCODE_CERTIFICATES_PATHS_VALIDATION_EXCEPTION} 1
+${EXITCODE_CONFIGURATION_EXCEPTION} 2
+${EXITCODE_TRUSTSTORE_FILE_FACTORY_EXCEPTION} 3
+${EXITCODE_PASSWORD_READER_EXCEPTION} 4
+${EXITCODE_CREATE_BACKUP_EXCEPTION} 5
+${EXITCODE_KEYSTORE_INSTANCE_EXCEPTION} 6
+${EXITCODE_TRUSTSTORE_LOAD_FILE_EXCEPTION} 7
+${EXITCODE_TRUSTSTORE_DATA_OPERATION_EXCEPTION} 8
+${EXITCODE_MISSING_TRUSTSTORE_EXCEPTIONSUCCESS} 9
+${EXITCODE_ALIAS_CONFLICT_EXCEPTION} 10
+${EXITCODE_WRITE_TRUSTSTORE_FILE_EXCEPTION} 11
+${EXITCODE_KEYSTORE_FILE_COPY_EXCEPTION} 12
+${EXITCODE_KEYSTORE_NOT_EXIST_EXCEPTION} 13
+${EXITCODE_UNEXPECTED_EXCEPTION} 99
+
+
+++ /dev/null
-
-import jks
-
-class JksTruststoreValidator:
-
- def get_truststore(self, truststore_path, password_path):
- truststore = jks.KeyStore.load(truststore_path, open(password_path, 'rb').read())
- return truststore.certs
-
- def assert_jks_truststores_equal(self, result_truststore_path, password_path, expected_truststore_path):
- result_certs = self.get_truststore(result_truststore_path, password_path)
- expected_certs = self.get_truststore(expected_truststore_path, password_path)
- if len(result_certs) != len(expected_certs):
- return False
- for k in result_certs:
- if not (k in expected_certs and result_certs[k].cert == expected_certs[k].cert):
- return False
- return True
+++ /dev/null
-*** Settings ***
-
-Resource ../../../common.robot
-Resource ./trust-merger-properties.robot
-Library ../libraries/TrustMergerManager.py ${MOUNT_PATH} ${TRUSTSTORES_PATH}
-Library ../libraries/JksTruststoreValidator.py
-Library ../libraries/PemTruststoreValidator.py
-
-*** Keywords ***
-
-Run Trust Merger And Expect Error
- [Documentation] Run Truststore Merger Container And Validate Exit Code
- [Arguments] ${env_file} ${expected_exit_code}
- ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
- Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} negative_path
- Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
-
-Run Trust Merger And Merge Truststore Files To Jks
- [Documentation] Run Truststore Merger Container And Validate Exit Code And Files
- [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path}
- ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
- ${files_equal}= Assert Jks Truststores Equal ${jks_path} ${jks_password} ${expected_jks_path}
- Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
- Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
- Should Be True ${files_equal}
-
-Run Trust Merger And Merge Truststore Files To Pem
- [Documentation] Run Truststore Merger Container And Validate Exit Code And Files
- [Arguments] ${env_file} ${expected_exit_code} ${pem_path} ${expected_pem_path}
- ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file}
- ${files_equal}= Assert Pem Truststores Equal ${pem_path} ${expected_pem_path}
- Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path
- Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code}
- Should Be True ${files_equal}
+++ /dev/null
-*** Variables ***
-
-${DOCKER_MERGER_IMAGE} nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-truststore-merger:latest
-${MERGER_CONTAINER_NAME} %{MergerContainerName}
-${MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp
-${TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores
-${EXPECTED_TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores
-
-${JKS_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.jks
-${JKS_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreJks.pass
-${P12_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.p12
-${P12_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreP12.pass
-${PEM_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.pem
-
-${JKS_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks
-${PEM_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem
-
-${INVALID_ENV_EMPTY_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env
-${INVALID_ENV_LIST_SIZE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env
-${INVALID_ENV_EMPTY_PASSWORDS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env
-${INVALID_PASSWORD_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env
-${INVALID_ENV_TRUSTSTORE_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env
-${INVALID_ENV_FILE_PASSWORD} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env
-${INVALID_ENV_EXTENSION} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env
-${INVALID_ENV_DUPLICATED_ALIASES} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env
-${INVALID_ENV_EMPTY_CERTS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env
-${VALID_ENV_JKS_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env
-${VALID_ENV_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env
-${VALID_ENV_SINGLE_TRUSTSTORE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env
-
-${TRUSTSTORE_JKS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks
-${TRUSTSTORE_JKS_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass
-${TRUSTSTORE_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12
-${TRUSTSTORE_P12_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pass
-${TRUSTSTORE_PEM} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem
+++ /dev/null
-*** Settings ***
-
-Documentation Truststore merger test case scenarios
-Library RequestsLibrary
-Resource ./resources/trust-merger-keywords.robot
-
-*** Test Cases ***
-
-Trust Merger fails when file extension is invalid
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with invalid truststore extension env and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_EXTENSION} 1
-
-Trust Merger fails when truststore and passwords envs not provided
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with invalid empty envs and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_FILE} 1
-
-Trust Merger fails when list sizes are different
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with different truststore and password envs size and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_LIST_SIZE} 2
-
-Trust Merger fails when a variable is empty
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with empty truststore password path env and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_PASSWORDS} 2
-
-Trust Merger fails when truststore paths are invalid
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with invalid truststore path and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_TRUSTSTORE_PATHS} 3
-
-Trust Merger fails when password path is invalid
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with invalid password path and expect error code
- Run Trust Merger And Expect Error ${INVALID_PASSWORD_PATHS} 4
-
-Trust Merger fails when password file pair is invalid
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with incorrect password env and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_FILE_PASSWORD} 7
-
-Trust Merger fails when pem does not contain cert
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with empty pem truststore and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_CERTS} 9
-
-Trust Merger fails when aliases are duplicated
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with duplicated aliases in truststores and expect error code
- Run Trust Merger And Expect Error ${INVALID_ENV_DUPLICATED_ALIASES} 10
-
-Trust Merger merges successfully jks pem p12
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with valid env file and expect merged certs from jks, pem and p12
- Run Trust Merger And Merge Truststore Files To Jks ${VALID_ENV_JKS_PEM_P12} 0 ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${JKS_TRUSTSTORE_EXPECTED_PATH}
-
-Trust Merger merges successfully pem p12
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with valid env file and expect merged certs from pem and p12
- Run Trust Merger And Merge Truststore Files To Pem ${VALID_ENV_PEM_P12} 0 ${PEM_TRUSTSTORE_MOUNT_PATH} ${PEM_TRUSTSTORE_EXPECTED_PATH}
-
-Trust Merger ends successfully with single truststore
- [Tags] OOM-TRUST-STORE-MERGER
- [Documentation] Run with one truststore in env file and expect code 0
- Run Trust Merger And Merge Truststore Files To Jks ${VALID_ENV_SINGLE_TRUSTSTORE} 0 ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${TRUSTSTORE_JKS}
CreateNewMonitoringPolicyV1
[Documentation] Create a new Monitoring TCA policy version 1
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
SimpleCreateNewMonitoringPolicyV1
[Documentation] Create a new Monitoring TCA policiy version 1 using simple endpoint. Trying to create an existing policy with any change and same version should cause error.
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1_2.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.v1_2.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
SimpleCreateNewMonitoringPolicyV2
[Documentation] Create a new Monitoring TCA policiy version 2 using simple endpoint
${auth}= Create List healthcheck zb!XztG34
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v2.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.v2.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
RetrievePoliciesOfType
[Documentation] Retrieve all Policies Created for a specific Policy Type
${auth}= Create List healthcheck zb!XztG34
- ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
RetrieveAllPolicies
[Documentation] Retrieve all Policies
${auth}= Create List healthcheck zb!XztG34
- ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
RetrieveSpecificPolicy
[Documentation] Retrieve a specific Policy named 'onap.restart.tca' and version '1.0.0'
${auth}= Create List healthcheck zb!XztG34
- ${expjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.v1.json
+ ${expjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.tcagen2",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca.policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.tcagen2",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "description": "monitoring policy",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca.policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.tcagen2",
- "version": "2.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca.policy" : {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
Log Creating session https://${DROOLS_IP}:9696
${session}= Create Session policy https://${DROOLS_IP}:9696 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Get Request policy /policy/pdp/engine/controllers/frankfurt/drools/facts headers=${headers}
+ ${resp}= Get Request policy /policy/pdp/engine/controllers/usecases/drools/facts headers=${headers}
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
- Should Be Equal As Strings ${resp.json()['frankfurt']} 0
+ Should Be Equal As Strings ${resp.json()['usecases']} 0
MakeTopics
[Documentation] Creates the Policy topics
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.tcagen2",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca.policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
Log Creating session https://${POLICY_API_IP}:6969
${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json
+ ${postjson}= Get file ${DATA}/vCPE.policy.monitoring.input.tosca.json
${resp}= Post Request policy /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/1.0.0/policies data=${postjson} headers=${headers}
Log Received response from API ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
{
"ONAPName": "SDNC",
- "ONAPComponent": "SNDC-component",
+ "ONAPComponent": "SDNC-component",
"ONAPInstance": "SDNC-component-instance",
"requestId": "unique-request-sdnc-1",
"action": "naming",
+++ /dev/null
-{
- "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
- "topology_template": {
- "policies": [
- {
- "onap.restart.tca": {
- "type": "onap.policies.monitoring.tcagen2",
- "version": "1.0.0",
- "type_version": "1.0.0",
- "metadata": {
- "policy-id": "onap.restart.tca"
- },
- "properties": {
- "tca.policy": {
- "domain": "measurementsForVfScaling",
- "metricsPerEventName": [
- {
- "eventName": "Measurement_vGMUX",
- "controlLoopSchemaType": "VNF",
- "policyScope": "DCAE",
- "policyName": "DCAE.Config_tca-hi-lo",
- "policyVersion": "v0.0.1",
- "thresholds": [
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "EQUAL",
- "severity": "MAJOR",
- "closedLoopEventStatus": "ABATED"
- },
- {
- "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
- "version": "1.0.2",
- "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
- "thresholdValue": 0,
- "direction": "GREATER",
- "severity": "CRITICAL",
- "closedLoopEventStatus": "ONSET"
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
- }
-}
--- /dev/null
+*** Settings ***
+Documentation sdc-workflow-D
--- /dev/null
+*** Settings ***
+Documentation store all properties that can change or are used in multiple places here
+... format is all caps with underscores between words and prepended with GLOBAL
+... make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
+
+
+*** Variables ***
+${GLOBAL_APPLICATION_ID} robot-ete
+${GLOBAL_SO_STATUS_PATH} /onap/so/infra/orchestrationRequests/v6/
+${GLOBAL_SELENIUM_BROWSER} chrome
+${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} Create Dictionary
+${GLOBAL_SELENIUM_DELAY} 0
+${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} 5
+${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} 15
+${GLOBAL_OPENSTACK_HEAT_SERVICE_TYPE} orchestration
+${GLOBAL_OPENSTACK_CINDER_SERVICE_TYPE} volume
+${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} compute
+${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network
+${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image
+${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity
+${GLOBAL_OPENSTACK_STACK_DEPLOYMENT_TIMEOUT} 600s
+${GLOBAL_AAI_CLOUD_OWNER} CloudOwner
+${GLOBAL_AAI_CLOUD_OWNER_DEFINED_TYPE} OwnerType
+${GLOBAL_AAI_COMPLEX_NAME} clli1
+${GLOBAL_AAI_PHYSICAL_LOCATION_ID} clli1
+${GLOBAL_AAI_AVAILABILITY_ZONE_NAME} nova
+${GLOBAL_BUILD_NUMBER} 0
+${GLOBAL_OWNING_ENTITY_NAME} OE-Demonstration
+${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s
+${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s
+${GLOBAL_VID_UI_TIMEOUT_LONG} 120s
+${GLOBAL_AAI_INDEX_PATH} /aai/v14
+${GLOBAL_AAI_ZONE_ID} nova1
+${GLOBAL_AAI_ZONE_NAME} nova
+${GLOBAL_AAI_DESIGN_TYPE} integration
+${GLOBAL_AAI_ZONE_CONTEXT} labs
+${GLOBAL_TEMPLATE_FOLDER} robot/assets/templates
+${GLOBAL_ASSETS_FOLDER} robot/assets
+${GLOBAL_SERVICE_MAPPING_DIRECTORY} ./demo/service_mapping
+${GLOBAL_SO_HEALTH_CHECK_PATH} /manage/health
+${GLOBAL_SO_CLOUD_CONFIG_PATH} /cloudSite
+${GLOBAL_SO_CLOUD_CONFIG_TEMPLATE} so/create_cloud_config.jinja
+${GLOBAL_SO_ORCHESTRATION_REQUESTS_PATH} /onap/so/infra/orchestrationRequests/v7
--- /dev/null
+*** Settings ***
+Documentation This is the basic test for workflow designer
+Library RequestsLibrary
+Library Collections
+Library SeleniumLibrary
+Resource global_properties.robot
+
+*** Variables ***
+${HOMEPAGE} http://localhost:8285
+${HEADLESS} True
+
+***Keywords***
+
+Open SDC GUI
+ [Documentation] Logs in to SDC GUI
+ [Arguments] ${PATH}
+ ## Setup Browever now being managed by the test case
+ ##Setup Browser
+ Go To ${HOMEPAGE}${PATH}
+ Maximize Browser Window
+
+ # Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT}
+ # Log Logging in to ${SDC_FE_ENDPOINT}${PATH}
+ Wait Until Page Contains Jimmy
+ # Log Logged in to ${SDC_FE_ENDPOINT}${PATH}
+
+Setup Browser
+ [Documentation] Sets up browser based upon the value of ${GLOBAL_SELENIUM_BROWSER}
+ Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'firefox' Setup Browser Firefox
+ Run Keyword If '${GLOBAL_SELENIUM_BROWSER}' == 'chrome' Setup Browser Chrome
+ Log Running with ${GLOBAL_SELENIUM_BROWSER}
+
+Setup Browser Firefox
+ ${caps}= Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys
+ Set To Dictionary ${caps} marionette=
+ Set To Dictionary ${caps} elementScrollBehavior 1
+ ${wd}= Create WebDriver Firefox capabilities=${caps}
+ Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${caps}
+
+
+Setup Browser Chrome
+ ${chrome options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
+ Call Method ${chrome options} add_argument no-sandbox
+ Call Method ${chrome options} add_argument ignore-certificate-errors
+ Run Keyword If ${HEADLESS}==True Call Method ${chrome options} add_argument headless
+ ${dc} Evaluate sys.modules['selenium.webdriver'].DesiredCapabilities.CHROME sys, selenium.webdriver
+ Set To Dictionary ${dc} elementScrollBehavior 1
+ Set To Dictionary ${dc} ACCEPT_SSL_CERTS True
+ Create Webdriver Chrome chrome_options=${chrome_options} desired_capabilities=${dc}
+ Set Global Variable ${GLOBAL_SELENIUM_BROWSER_CAPABILITIES} ${dc}
+
+Input Username
+ [Arguments] ${username}
+ Input Text name=userId ${username}
+
+Input Password
+ [Arguments] ${password}
+ Input Text name=password ${password}
+
+Input Name
+ [Arguments] ${workflowName}
+ Input Text id=workflowName ${workflowName}
+
+Input Description
+ [Arguments] ${description}
+ Input Text xpath=/html/body/div[2]/div/div[2]/div/form/div/div[1]/div[2]/div/textarea ${description}
+
+Input WFdescription
+ [Arguments] ${description}
+ Input Text xpath=//*[@id="root"]/div[1]/div/div[2]/div[2]/div/div[1]/div/textarea
+
+Submit Login Button
+ Click Element xpath=/html/body/form/input[3]
+
+Submit WorkFlow Button
+ Click Element xpath=/html/body/div/home-page/div/top-nav/nav/ul/li[5]/a
+
+Add WorkFlow
+ Click Element xpath=//*[@id="root"]/div[1]/div/div[2]/div/div[2]/div[1]
+ # Click Element xpath=//*[@id="root"]/div[1]/div/div[2]/div/div[2]/div[1]/div[1]/div/svg
+
+Create Workflow
+ Click Element xpath=/html/body/div[2]/div/div[2]/div/form/div/div[2]/button[1]
+
+Goto Frame
+ Select Frame xpath=/html/body/div/plugin-tab-view/div/plugin-frame/div/div/iframe
+
+Save WorkFlow
+ Click Element xpath=//*[@id="root"]/div[1]/div/div[1]/div[2]/div[2]/div/div/div[2]/div/div/span
+
+*** Test Cases ***
+Workflow Designer Testing
+ [Documentation] User can homepage and see the tag line
+ Setup Browser
+ Open SDC GUI /login
+ Input Username cs0008
+ Input Password 123123a
+ Submit Login Button
+ Wait Until Page Contains WORKFLOW
+ Submit WorkFlow Button
+ BuiltIn.Sleep 5s
+ Goto Frame
+ Add WorkFlow
+ BuiltIn.Sleep 5s
+ Input Name testing7
+ Input Description first test through selenium
+ Create Workflow
+ # Wait Until Page Contains General
+ # Input Description2 write some dummy description
+ # Save WorkFlow
+ # BuiltIn.Sleep 5s
+ Close Browser
\ No newline at end of file
SET GLOBAL VARIABLE ${service_instance_Id}
${actual_request_state}= Set Variable ""
- : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
- \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
- \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
- \ log to console ${orchestration_status_request.content}
- \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json
- \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
- \ Log To Console Received actual repsonse status:${actual_request_state}
- \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
- \ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds
- \ SLEEP ${SLEEP_INTERVAL_SEC}s
+ FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
+ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
+ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
+ log to console ${orchestration_status_request.content}
+ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json
+ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
+ Log To Console Received actual repsonse status:${actual_request_state}
+ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
Log To Console final repsonse status received: ${actual_request_state}
Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
${vnf_instance_Id}= Set Variable ${vnf_instantiate_json_response}[requestReferences][instanceId]
SET GLOBAL VARIABLE ${vnf_instance_Id}
- : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
- \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
- \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
- \ Log To Console ${orchestration_status_request.content}
- \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json
- \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
- \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
- \ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
- \ SLEEP ${SLEEP_INTERVAL_SEC}s
+ FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
+ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
+ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
+ Log To Console ${orchestration_status_request.content}
+ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json
+ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
+ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
${service_instance_Id}= SET VARIABLE ${orchestration_json_response}[request][instanceReferences][serviceInstanceId]
Log To Console final repsonse status received: ${actual_request_state}
Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
Should Be Equal As Strings '${actual_request_state}' 'COMPLETE'
-Invoke VNF Notification for SOL002
- Create Session ve-vnfm-adapter-session http://${REPO_IP}:9098
- ${data}= Get Binary File ${CURDIR}${/}data${/}notification.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json Authorization=Basic YWRtaW46YTRiM2MyZDE=
- ${notification_request}= Post Request ve-vnfm-adapter-session /lcm/v1/vnf/instances/notifications data=${data} headers=${headers}
- Log To Console ${notification_request}
- Run Keyword If '${notification_request.status_code}' == '200' Log To Console \nexecuted with expected result
- Should Be Equal As Strings '${notification_request.status_code}' '200'
-
Delete VNF Instance
Run Keyword If "${vnf_instance_Id}" != "${EMPTY}" Log to Console VNF Instance ID :${vnf_instance_Id} received
... ELSE Fail Log to Console Invalid VNF Instance ID :${vnf_instance_Id} recieved
${request_ID}= Set Variable ${vnf_delete_json_response}[requestReferences][requestId]
${actual_request_state}= Set Variable ""
- : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
- \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
- \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
- \ Log To Console ${orchestration_status_request.content}
- \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""") json
- \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
- \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
- \ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
- \ SLEEP ${SLEEP_INTERVAL_SEC}s
+ FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
+ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
+ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
+ Log To Console ${orchestration_status_request.content}
+ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""") json
+ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
+ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
Log To Console final repsonse status received: ${actual_request_state}
Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
${request_ID}= Set Variable ${service_delete_json_response}[requestReferences][requestId]
${actual_request_state}= Set Variable ""
- : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
- \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
- \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
- \ Log To Console ${orchestration_status_request.content}
- \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""") json
- \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
- \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
- \ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
- \ SLEEP ${SLEEP_INTERVAL_SEC}s
+ FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
+ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID}
+ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result
+ Log To Console ${orchestration_status_request.content}
+ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""") json
+ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState]
+ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ Log To Console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
Log To Console final repsonse status received: ${actual_request_state}
Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
--- /dev/null
+*** Settings ***
+Resource ./resources/vnfsdk_keywords.robot
+
+*** Test Cases ***
+
+Perform vnf refrepo healthcheck
+ [Documentation] Check if vnf refrepo is up and running
+
+ Create Session refrepo ${base_url}
+ ${response}= Get Request refrepo /PackageResource/healthcheck
+ Should Be Equal As Strings ${response.status_code} 200
+
+Validate correct, no security CSAR
+ [Documentation] Valid CSAR with no security should PASS validation and should return no error
+
+ ${response}= Validate CSAR usign Post request ${csar_valid_no_security} ${execute_no_security_csar_validation}
+ # Removing strings that are causing errors during evaluation,
+ # those strings are dependent on validation response and may need to be changed if vnf refrepo response changes
+ ${response}= Remove String ${response} \\\\ \\u003c \\u003e \\"
+ ${json_response}= evaluate json.loads('''${response}''') json
+ Should Be Equal As Strings ${json_response[0]["results"]["criteria"]} PASS
+ FOR ${resault} IN @{json_response[0]["results"]["results"]}
+ Should Be Equal As Strings ${resault["errors"]} []
+ Should Be Equal As Strings ${resault["passed"]} True
+ END
+
+
+Validate CSAR using rule r130206 and use get method to receive outcome
+ [Documentation] Validate CSAR with invalid PM_Dictionary (r130206) using rule r130206 , then use get method with validation id to receive valdiation outcome
+
+ ${response}= Validate CSAR usign Post request ${csar_invalid_pm_dictionary} ${execute_invalid_pm_dictionary_r130206_validation}
+ # Removing strings that are causing errors during evaluation,
+ # those strings are dependent on validation response and may need to be changed if vnf refrepo response changes
+ ${response}= Remove String ${response} \\\\ \\u003c \\u003e \\"
+ ${json_response}= evaluate json.loads('''${response}''') json
+
+ ${get_response}= Get validation result using GET request ${json_response[0]["executionId"]}
+ # Removing strings that are causing errors during evaluation,
+ # those strings are dependent on validation response and may need to be changed if vnf refrepo response changes
+ ${get_response}= Remove String ${get_response} \\\\ \\u0027
+ ${json_get_response}= evaluate json.loads('''${get_response}''') json
+ Should Be Equal As Strings ${json_get_response[0]["status"]} failed
+ ${errors_number}= Get Length ${json_get_response[0]["results"]}
+ Should Be Equal As Strings ${errors_number} 4
+ FOR ${error} IN @{json_get_response[0]["results"]}
+ Should Contain ${error["code"]} R130206
+ END
+
+Validate CSAR using all rule and use get method to receive outcome
+ [Documentation] Validate CSAR with invalid PM_Dictionary (r130206) using all rules, then use get method with validation id to receive valdiation outcome
+
+ ${response}= Validate CSAR usign Post request ${csar_invalid_pm_dictionary} ${execute_invalid_pm_dictionary_validation}
+ # Removing strings that are causing errors during evaluation,
+ # those strings are dependent on validation response and may need to be changed if vnf refrepo response changes
+ ${response}= Remove String ${response} \\\\ \\u003c \\u003e \\"
+ ${json_response}= evaluate json.loads('''${response}''') json
+
+ ${get_response}= Get validation result using GET request ${json_response[0]["executionId"]}
+ # Removing strings that are causing errors during evaluation,
+ # those strings are dependent on validation response and may need to be changed if vnf refrepo response changes
+ ${get_response}= Remove String ${get_response} \\\\ \\u0027 \\u003c \\u003e \\"
+ ${json_get_response}= evaluate json.loads('''${get_response}''') json
+ Should Be Equal As Strings ${json_response[0]["results"]["criteria"]} FAILED
+ FOR ${resault} IN @{json_response[0]["results"]["results"]}
+ Should Be Equal As Strings ${resault["warnings"]} []
+ Run keyword if "${resault["vnfreqName"]}" == "r130206"
+ ... Should Be Equal As Strings ${resault["passed"]} False
+ END
--- /dev/null
+*** Settings ***
+Resource ./vnfsdk_properties.robot
+
+Library OperatingSystem
+Library Process
+Library String
+Library Collections
+Library RequestsLibrary
+Library json
+
+*** Keywords ***
+
+Validate CSAR usign Post request
+ [Documentation] Perform POST Request to vnfsdk marketplace with CSAR and execution options, in order to perfvorm CSAR validation
+ [Arguments] ${csar_name} ${execution_json}
+ ${response}= Run curl -s --location --request POST '${base_url}/vtp/executions' --header 'Content-Type: multipart/form-data' --header 'Accept: application/json' --form 'file=@${csarpath}/${csar_name}' --form 'executions=${execution_json}'
+ ${response}= String.Replace String ${response} \\n ${SPACE}
+ [Return] ${response}
+
+Get validation result using GET request
+ [Documentation] Perform GET request to vnfsdk marketplace with request id or execution id, in order to get that request/execution result
+ [Arguments] ${requestId}
+ ${response}= Run curl -s --location --request GET '${base_url}/vtp/executions?requestId=${requestId}' --header 'Accept: application/json'
+ ${response}= String.Replace String ${response} \\n ${SPACE}
+ [Return] ${response}
--- /dev/null
+*** Variables ***
+${base_url}= http://${REFREPO_IP}:8702/onapapi/vnfsdk-marketplace/v1
+
+${csarpath}= ${SCRIPTS}/../tests/vnfsdk-refrepo/csar
+
+${csar_valid_no_security}= valid_no_security.csar
+${execute_no_security_csar_validation}= [{"scenario": "onap-dublin","testSuiteName": "validation","testCaseName": "csar-validate","parameters": {"csar": "file://${csar_valid_no_security}","pnf":"true"}}]
+
+${csar_invalid_pm_dictionary}= invalid_pm_dictionary.csar
+${execute_invalid_pm_dictionary_r130206_validation}= [{"scenario": "onap-dublin","testSuiteName": "validation","testCaseName": "csar-validate-r130206","parameters": {"csar": "file://${csar_invalid_pm_dictionary}","pnf":"true"}}]
+${execute_invalid_pm_dictionary_validation}= [{"scenario": "onap-dublin","testSuiteName": "validation","testCaseName": "csar-validate","parameters": {"csar": "file://${csar_invalid_pm_dictionary}","pnf":"true"}}]
+