Standardisation of names
Change-Id: Ib90680a1282aca5c623aa802d5c2c92dc913fff0
Issue-ID: NONRTRIC-158
Signed-off-by: maximesson <maxime.bonneau@est.tech>
diff --git a/near-rt-ric-simulator/auto-test/Dockerize_test.sh b/near-rt-ric-simulator/auto-test/Dockerize_test.sh
index f959ef8..34532c9 100755
--- a/near-rt-ric-simulator/auto-test/Dockerize_test.sh
+++ b/near-rt-ric-simulator/auto-test/Dockerize_test.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-TC_ONELINE_DESCR="dockerirze the test, setup docker container for policy agent, cbs, consul, near realtime ric simulator"
+TC_ONELINE_DESCR="dockerirze the test, setup docker container for Policy Agent, cbs, consul, Near-RT RIC simulator"
. ../common/testcase_common.sh $1 $2 $3
diff --git a/near-rt-ric-simulator/auto-test/FTC1.sh b/near-rt-ric-simulator/auto-test/FTC1.sh
index 80d1219..7c614a4 100755
--- a/near-rt-ric-simulator/auto-test/FTC1.sh
+++ b/near-rt-ric-simulator/auto-test/FTC1.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-TC_ONELINE_DESCR="Auto test for policy agent refreshing configurations from consul/cbs"
+TC_ONELINE_DESCR="Auto test for Policy Agent refreshing configurations from consul/cbs"
. ../common/testcase_common.sh $1
diff --git a/near-rt-ric-simulator/auto-test/README.md b/near-rt-ric-simulator/auto-test/README.md
index 319137a..9aac651 100644
--- a/near-rt-ric-simulator/auto-test/README.md
+++ b/near-rt-ric-simulator/auto-test/README.md
@@ -1,17 +1,17 @@
## Automated test Description
-This auto-test repo stores test script for automated test cases for policy agent.
-Each of the testcase script will bring up a containerized test enviroment for Policy Agent,
-CBS, consul, and simulator(TBD)
+This auto-test repo stores test script for automated test cases for Policy Agent.
+Each of the testcase script will bring up a containerized test enviroment for Policy Agent,
+CBS, consul, and simulator(TBD).
-### Overveiw
+### Overview
Right now, test cases are written in bash scripts. \
Each test case script(ex. `FTC1.sh)` will call functions defined in `../common`. \
The environment vriables are set in`test_env.sh`. \
-The automated test support both local build policy agent image testing and remote image stored in Nexus.
+The automated test support both local build Policy Agent image testing and remote image stored in Nexus.
```
-# Lcal image
+# Local image
export POLICY_AGENT_LOCAL_IMAGE=o-ran-sc/nonrtric-policy-agent
# Remote image
export POLICY_AGENT_REMOTE_IMAGE=nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-policy-agent
@@ -21,9 +21,9 @@
### Logs
All log files are stored at `logs/<testcase id>`. \
-The logs include the application.log and the container log from policy agent, the container logs from each simulator and the
+The logs include the application.log and the container log from Policy Agent, the container logs from each simulator and the
test case log (same as the screen output). \
-In the test cases the logs are stored with a prefix so the logs can be stored at different steps during the test.
+In the test cases the logs are stored with a prefix so the logs can be stored at different steps during the test.
All test cases contains an entry to save all logs with prefix 'END' at the end of each test case.
### Manual
@@ -38,7 +38,7 @@
### Test case file
A test case file contains a number of steps to verify a certain functionality.
-A description of the test case should be given to the ``TC_ONELINE_DESCR`` var. The description will be printed in
+A description of the test case should be given to the ``TC_ONELINE_DESCR`` var. The description will be printed in
the test result.
The empty template for a test case files looks like this:
@@ -51,7 +51,7 @@
TC_ONELINE_DESCR="<test case description>"
-. ../common/testcase_common.sh $1
+. ../common/testcase_common.sh $1
#### TEST BEGIN ####
@@ -66,5 +66,5 @@
```
-----------------------------------------------------------
-The ../common/testcase_common.sh contains all functions needed for the test case file. See the README.md file in
+The ../common/testcase_common.sh contains all functions needed for the test case file. See the README.md file in
the ../common dir for a description of all available functions.
\ No newline at end of file
diff --git a/near-rt-ric-simulator/common/README.md b/near-rt-ric-simulator/common/README.md
index 37d81ec..6defc8d 100644
--- a/near-rt-ric-simulator/common/README.md
+++ b/near-rt-ric-simulator/common/README.md
@@ -1,32 +1,32 @@
## Description for common test scripts
`test_env.sh` \
-Common env variables for test in the auto-test dir.
+Common env variables for test in the auto-test dir.
Used by the auto test cases/suites but could be used for other test script as well.
`testcase_common.sh` \
-Common functions for auto test cases in the auto-test dir.
+Common functions for auto test cases in the auto-test dir.
A subset of the functions could be used in other test scripts as well.
###Descriptions of functions in testcase_common.sh
`clean_containers` \
-Stop and remove all containers including policy agent apps and simulators
+Stop and remove all containers including Policy Agent apps and simulators
`start_simulators` \
Start all simulators in the simulator group
`consul_config_app ` \
-Configure consul with json file with app config for a policy agent instance using the policy agent
-instance id and the json file.
+Configure consul with json file with app config for a Policy Agent instance using the Policy Agent
+instance id and the json file.
`start_policy_agent` \
-Start the policy agent application.
+Start the Policy Agent application.
`check_policy_agent_logs`
-Check the Policy agent application log for WARN and ERR messages and print the count.
+Check the Policy Agent application log for WARN and ERR messages and print the count.
`store_logs`
-Store all Policy agent app and simulators log to the test case log dir. All logs get a prefix to
+Store all Policy Agent app and simulators log to the test case log dir. All logs get a prefix to
separate logs stored at different steps in the test script.
If logs need to be stored in several locations, use different prefix to easily identify the location
when the logs where taken.
diff --git a/near-rt-ric-simulator/common/test_env.sh b/near-rt-ric-simulator/common/test_env.sh
index b50a02d..82afa16 100755
--- a/near-rt-ric-simulator/common/test_env.sh
+++ b/near-rt-ric-simulator/common/test_env.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# Set the images for the Policy agent app to use for the auto tests. Do not add the image tag.
+# Set the images for the Policy Agent app to use for the auto tests. Do not add the image tag.
#
# Local Policy Agent image and tag, shall point to locally built image (non-nexus path)
export POLICY_AGENT_LOCAL_IMAGE=o-ran-sc/nonrtric-policy-agent
@@ -14,9 +14,9 @@
# Common env var for auto-test.
POLICY_AGENT_PORT=8081
-POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" #Path the application log in the policy agent container
+POLICY_AGENT_LOGPATH="/var/log/policy-agent/application.log" #Path the application log in the Policy Agent container
DOCKER_SIM_NWNAME="nonrtric-docker-net" #Name of docker private network
CONSUL_HOST="consul-server" #Host name of consul
CONSUL_PORT=8500 #Port number of consul
CONFIG_BINDING_SERVICE="config-binding-service" #Host name of CBS
-PA_APP_BASE="policy-agent" #Base name for policy agent container
+PA_APP_BASE="policy-agent" #Base name for Policy Agent container
diff --git a/near-rt-ric-simulator/common/testcase_common.sh b/near-rt-ric-simulator/common/testcase_common.sh
index 581c274..b4ceb0d 100755
--- a/near-rt-ric-simulator/common/testcase_common.sh
+++ b/near-rt-ric-simulator/common/testcase_common.sh
@@ -8,7 +8,7 @@
# This is a script that contains all the functions needed for auto test
# Arg: local | remote (1, 2, 3, 4....)
-STARTED_POLICY_AGENT="" #Policy agent app names added to this var to keep track of started container in the script
+STARTED_POLICY_AGENT="" #Policy Agent app names added to this var to keep track of started container in the script
START_ARG=$1
IMAGE_TAG="1.0.0-SNAPSHOT"
IMAGE_TAG_REMOTE="latest"
@@ -85,8 +85,8 @@
echo ""
if [ $1 != "manual-container" ] && [ $1 != "manual-app" ]; then
- #echo -e "Policy agent image tag set to: \033[1m" $IMAGE_TAG"\033[0m"
- echo "Configured image for policy agent app(s) (${1}): "$POLICY_AGENT_IMAGE
+ #echo -e "Policy Agent image tag set to: \033[1m" $IMAGE_TAG"\033[0m"
+ echo "Configured image for Policy Agent app(s) (${1}): "$POLICY_AGENT_IMAGE
tmp_im=$(docker images ${POLICY_AGENT_IMAGE} | grep -v REPOSITORY)
if [ $1 == "local" ]; then
@@ -94,12 +94,12 @@
echo "Local image (non nexus) "$POLICY_AGENT_IMAGE" does not exist in local registry, need to be built"
exit 1
else
- echo -e "Policy agent local image: \033[1m"$tmp_im"\033[0m"
- echo "If the policy agent image seem outdated, rebuild the image and run the test again."
+ echo -e "Policy Agent local image: \033[1m"$tmp_im"\033[0m"
+ echo "If the Policy Agent image seem outdated, rebuild the image and run the test again."
fi
elif [ $1 == "remote" ]; then
if [ -z "$tmp_im" ]; then
- echo "Pulling policy agent image from nexus: "$POLICY_AGENT_IMAGE
+ echo "Pulling Policy Agent image from nexus: "$POLICY_AGENT_IMAGE
docker pull $POLICY_AGENT_IMAGE > /dev/null
tmp_im=$(docker images ${POLICY_AGENT_IMAGE} | grep -v REPOSITORY)
if [ -z "$tmp_im" ]; then
@@ -109,7 +109,7 @@
echo -e "Policy Agent image: \033[1m"$tmp_im"\033[0m"
else
echo -e "Policy Agent image: \033[1m"$tmp_im"\033[0m"
- echo "!! If the Policy agent image seem outdated, consider removing it from your docker registry and run the test again."
+ echo "!! If the Policy Agent image seem outdated, consider removing it from your docker registry and run the test again."
fi
fi
fi
@@ -121,7 +121,7 @@
SIM_DIR=$(find . -type d -path "*a1-interface/near-rt-ric-simulator/scripts*" 2>/dev/null -print -quit)
if [ ! -d $SIM_DIR ]; then
echo "Trying to set env var SIM_DIR to dir 'a1-interface/near-rt-ric-simulator/scripts' in the sim repo, but failed."
- echo "It might be that you did not download the repository of the near-rt-ric simulator.In that case, run the command:"
+ echo "It might be that you did not download the repository of the Near-rt-ric simulator.In that case, run the command:"
echo "git clone 'https://gerrit.o-ran-sc.org/oransc/sim/a1-interface'"
echo "Otherwise, please set the SIM_DIR manually in the test_env.sh"
exit 1
@@ -182,7 +182,7 @@
echo "Creating docker network $DOCKER_SIM_NWNAME, if needed"
docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
- echo "start dashboard"
+ echo "start Control Panel"
curdir=$PWD
cd $SIM_GROUP
cd dashboard/
@@ -243,25 +243,25 @@
clean_containers() {
- echo "Stopping all containers, policy agent app(s) and simulators with name prefix 'policy_agent'"
+ echo "Stopping all containers, Policy Agent app(s) and simulators with name prefix 'policy-agent'"
docker stop $(docker ps -q --filter name=/policy-agent) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'policy_agent'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'policy-agent'"
docker rm $(docker ps -a -q --filter name=/policy-agent) &> /dev/null
- echo "Stopping all containers, policy agent app(s) and simulators with name prefix 'ric-simulator'"
+ echo "Stopping all containers, Policy Agent app(s) and simulators with name prefix 'ric-simulator'"
docker stop $(docker ps -q --filter name=ric-simulator) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'ric-simulator'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'ric-simulator'"
docker rm $(docker ps -a -q --filter name=ric-simulator) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'dashboard'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'dashboard'"
docker rm $(docker ps -a -q --filter name=dashboard) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'a1-controller'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'a1-controller'"
docker rm $(docker ps -a -q --filter name=a1-controller) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'sdnc_db_container'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'sdnc_db_container'"
docker rm $(docker ps -a -q --filter name=sdnc_db_container) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'cbs'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'cbs'"
docker rm $(docker ps -a -q --filter name=polman_cbs) &> /dev/null
- echo "Removing all containers, policy agent app and simulators with name prefix 'consul'"
+ echo "Removing all containers, Policy Agent app and simulators with name prefix 'consul'"
docker rm $(docker ps -a -q --filter name=polman_consul) &> /dev/null
- echo "Removing unused docker networks with substring 'policy agent' in network name"
+ echo "Removing unused docker networks with substring 'nonrtric' in network name"
docker network rm $(docker network ls -q --filter name=nonrtric)
echo ""
}
@@ -284,7 +284,7 @@
docker network ls| grep $DOCKER_SIM_NWNAME > /dev/null || docker network create $DOCKER_SIM_NWNAME
- echo "Starting policy agent: " $appname " with ports mapped to " $localport " in docker network "$DOCKER_SIM_NWNAME
+ echo "Starting Policy Agent: " $appname " with ports mapped to " $localport " in docker network "$DOCKER_SIM_NWNAME
docker run -d -p $localport":8081" --network=$DOCKER_SIM_NWNAME -e CONSUL_HOST=$CONSUL_HOST -e CONSUL_PORT=$CONSUL_PORT -e CONFIG_BINDING_SERVICE=$CONFIG_BINDING_SERVICE -e HOSTNAME=$appname --name $appname $POLICY_AGENT_IMAGE
#docker run -d -p 8081:8081 --network=nonrtric-docker-net -e CONSUL_HOST=CONSUL_HOST=$CONSUL_HOST -e CONSUL_PORT=$CONSUL_PORT -e CONFIG_BINDING_SERVICE=$CONFIG_BINDING_SERVICE -e HOSTNAME=policy-agent
sleep 3
@@ -330,7 +330,7 @@
appname=$PA_APP_BASE
tmp=$(docker ps | grep $appname)
- if ! [ -z "$tmp" ]; then #Only check logs for running policy agent apps
+ if ! [ -z "$tmp" ]; then #Only check logs for running Policy Agent apps
__check_policy_agent_log $appname
fi
@@ -365,7 +365,7 @@
__print_err "need one arg, <file-prefix>"
exit 1
fi
- echo "Storing all container logs and policy agent app log using prefix: "$1
+ echo "Storing all container logs and Policy Agent app log using prefix: "$1
docker logs polman_consul > $TESTLOGS/$ATC/$1_consul.log 2>&1
docker logs polman_cbs > $TESTLOGS/$ATC/$1_cbs.log 2>&1
diff --git a/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_config.hcl b/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_config.hcl
index 9a9c0c4..d36ae56 100644
--- a/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_config.hcl
+++ b/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_config.hcl
@@ -4,7 +4,7 @@
service {
# Name for CBS in consul, env var CONFIG_BINDING_SERVICE
- # should be passed to policy agent app with this value
+ # should be passed to Policy Agent app with this value
Name = "config-binding-service"
# Host name where CBS is running
Address = "config-binding-service"
diff --git a/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_localhost_config.hcl b/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_localhost_config.hcl
index f6f3dac..63be3d4 100644
--- a/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_localhost_config.hcl
+++ b/near-rt-ric-simulator/simulator-group/consul_cbs/consul/cbs_localhost_config.hcl
@@ -1,8 +1,8 @@
service {
# Name for CBS in consul, env var CONFIG_BINDING_SERVICE
- # should be passed to policy agent app with this value
+ # should be passed to Policy Agent app with this value
# This is only to be used when contacting cbs via local host
- # (typicall when policy agent is executed as an application without a container)
+ # (typicall when Policy Agent is executed as an application without a container)
Name = "config-binding-service-localhost"
# Host name where CBS is running
Address = "localhost"