aboutsummaryrefslogtreecommitdiffstats
path: root/plans
diff options
context:
space:
mode:
authorBjornMagnussonXA <bjorn.magnusson@est.tech>2020-09-16 10:16:45 +0200
committerBjornMagnussonXA <bjorn.magnusson@est.tech>2020-09-17 14:28:53 +0200
commit7330ced367b4a312fbde2ca602dc54ce51931d14 (patch)
tree7bc38574320edda501ddbbf5dd31802d40f076af /plans
parent803e49918dc80f21859b2355dcc33e179abb5fa1 (diff)
SDNC image added to policy managment CSIT
Change-Id: I1913b81311dd44a24aca10d0b7668a88e23e6ab6 Issue-ID: CCSDK-2792 Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech> Change-Id: I1a9f93975b55a80fa8e931ed18f6fc05d2a53262
Diffstat (limited to 'plans')
-rwxr-xr-xplans/ccsdk-oran/polmansuite/FTC150.sh113
-rwxr-xr-xplans/ccsdk-oran/polmansuite/setup.sh13
-rw-r--r--plans/ccsdk-oran/polmansuite/test_env.sh54
3 files changed, 124 insertions, 56 deletions
diff --git a/plans/ccsdk-oran/polmansuite/FTC150.sh b/plans/ccsdk-oran/polmansuite/FTC150.sh
new file mode 100755
index 00000000..b65b3a5f
--- /dev/null
+++ b/plans/ccsdk-oran/polmansuite/FTC150.sh
@@ -0,0 +1,113 @@
+#!/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 exclude checking pulling images for, space separated list
+EXCLUDED_IMAGES="PA CP SDNC_ONAP"
+
+. ../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"
+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
diff --git a/plans/ccsdk-oran/polmansuite/setup.sh b/plans/ccsdk-oran/polmansuite/setup.sh
index c0dfa150..10fed96f 100755
--- a/plans/ccsdk-oran/polmansuite/setup.sh
+++ b/plans/ccsdk-oran/polmansuite/setup.sh
@@ -22,13 +22,12 @@ 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
-# Temporary solution to setup the Non-RT RIC components to point to ONAP images and tags
-# Shall be removed when the Non-RT RIC test env is moved/copied to ONAP
-cp $WORKSPACE/plans/ccsdk-oran/polmansuite/test_env.sh $WORKSPACE/archives/nonrtric/test/common
-
-# Temporary solution to not test with the SDNC image
-cp $WORKSPACE/plans/ccsdk-oran/polmansuite/FTC1.sh $WORKSPACE/archives/nonrtric/test/auto-test/FTC1.sh
+#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
#Make the env vars availble to the robot scripts
-ROBOT_VARIABLES="-b debug.log -v AUTOTEST_ROOT:${AUTOTEST_ROOT}"
+ROBOT_VARIABLES="-b debug.log -v AUTOTEST_ROOT:${AUTOTEST_ROOT} -v POLMAN_PLANS:${POLMAN_PLANS}"
+
diff --git a/plans/ccsdk-oran/polmansuite/test_env.sh b/plans/ccsdk-oran/polmansuite/test_env.sh
index e3501f2a..874c8bd7 100644
--- a/plans/ccsdk-oran/polmansuite/test_env.sh
+++ b/plans/ccsdk-oran/polmansuite/test_env.sh
@@ -24,37 +24,19 @@
# the test script is started. The name format is <container-name>_IMAGE, ie with 'LOCAL' or 'REMOTE'.
-##############################################
-## Temporary fix to point to ONAP remote image
-##############################################
-# Local Policy Agent image and tag
-#POLICY_AGENT_LOCAL_IMAGE="o-ran-sc/nonrtric-policy-agent"
-#POLICY_AGENT_LOCAL_IMAGE_TAG="2.1.0-SNAPSHOT"
# 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.0-SNAPSHOT"
-#POLICY_AGENT_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent"
-#POLICY_AGENT_REMOTE_IMAGE_TAG="2.1.0"
+POLICY_AGENT_REMOTE_IMAGE_TAG="1.1.0-SNAPSHOT"
-# Control Panel local image and tag
-CONTROL_PANEL_LOCAL_IMAGE="o-ran-sc/nonrtric-controlpanel"
-CONTROL_PANEL_LOCAL_IMAGE_TAG="2.0.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"
-##############################################
-## Temporary fix to point to ONAP remote image
-##############################################
-# SDNC A1 Controller local image and tag
-#SDNC_A1_CONTROLLER_LOCAL_IMAGE="o-ran-sc/nonrtric-a1-controller"
-#SDNC_A1_CONTROLLER_LOCAL_IMAGE_TAG="2.1.0-SNAPSHOT"
+
# 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.1-STAGING-latest"
-#SDNC_A1_CONTROLLER_REMOTE_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-a1-controller"
-#SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.1.0"
+SDNC_A1_CONTROLLER_REMOTE_IMAGE_TAG="2.1.0-STAGING-latest"
#SDNC DB remote image and tag
@@ -63,20 +45,6 @@ SDNC_DB_REMOTE_IMAGE_TAG="5.6"
#No local image for DB, remote image always used
-# SDNC ONAP A1 Adapte remote image and tag
-SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE="nexus3.onap.org:10003/onap/sdnc-image"
-SDNC_ONAP_A1_ADAPTER_REMOTE_IMAGE_TAG="1.8-STAGING-latest"
-#No local image for the A1 adapter, remote image always used
-
-#ONAP A1 Adatper remote image and tag
-SDNC_ONAP_DB_REMOTE_IMAGE="mysql/mysql-server"
-SDNC_ONAP_DB_REMOTE_IMAGE_TAG="5.6"
-#No local image for DB, remote image always used
-
-
-# Near RT RIC Simulator local image and tag
-RIC_SIM_LOCAL_IMAGE="nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator"
-RIC_SIM_LOCAL_IMAGE_TAG="latest"
# 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"
@@ -90,7 +58,6 @@ CONSUL_REMOTE_IMAGE_TAG="1.7.2"
#CBS remote image and tag
CBS_REMOTE_IMAGE="nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app"
-CBS_REMOTE_IMAGE="onap/org.onap.dcaegen2.platform.configbinding.app-app"
CBS_REMOTE_IMAGE_TAG="2.3.0"
#No local image for CBS, remote image always used
@@ -156,24 +123,13 @@ export SDNC_INTERNAL_PORT=8181 # SNDC A1 Contro
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 SDNC_ONAP_APP_NAME="a1-adapter" # Name of the ONAP A1 Adapter container
-export SDNC_ONAP_EXTERNAL_PORT=8282 # ONAP A1 Adapter container external port (host -> container)
-export SDNC_ONAP_INTERNAL_PORT=8181 # ONAP A1 Adapter container internal port (container -> container)
-export SDNC_ONAP_EXTERNAL_SECURE_PORT=8443 # SNDC A1 Adapter container external securee port (host -> container)
-export SDNC_ONAP_INTERNAL_SECURE_PORT=8343 # SNDC A1 Adapter container internal secure port (container -> container)
-export SDNC_ONAP_DB_APP_NAME="sdnc-onap-db" # Name of the ONAP A1 Adapter DB container
-SDNC_ONAP_USER="admin" # ONAP A1 Adapter username
-SDNC_ONAP_PWD="Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" # ONAP A1 Adapter PWD
-SDNC_ONAP_API_URL="/restconf/operations/A1-ADAPTER-API:" # Base url path for ONAP A1 Adapter API
-SDNC_ONAP_ALIVE_URL="/apidoc/explorer/" # Base url path for ONAP A1 Adapter API docs (for alive check)
-SDNC_ONAP_PROPERTIES_FILE="/opt/onap/ccsdk/data/properties/a1-adapter-api-dg.properties"
-SDNC_ONAP_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)
@@ -188,4 +144,4 @@ RESTBASE_SECURE="https://localhost:"$POLICY_AGENT_EXTERNAL_SECURE_PORT # Base ur
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 \ No newline at end of file
+ # The values of this var is swiched between the two base url when needed