From ed3d1227894f2e3313bbf4214cf3db29b410b440 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 30 Aug 2022 14:42:26 +0200 Subject: [PATCH] Update default env file for tests Change-Id: I3c8877ef23d552f9b6b5647aa9d0c8fd4eb65166 Signed-off-by: garciadeblas --- README.md | 41 +++---------------------------------- envconfig-local.rc | 44 ++++++++++++++++++++++------------------ robot-systest/envfile.rc | 28 ------------------------- 3 files changed, 27 insertions(+), 86 deletions(-) delete mode 100644 robot-systest/envfile.rc diff --git a/README.md b/README.md index aa3b58c..03d6054 100644 --- a/README.md +++ b/README.md @@ -39,50 +39,15 @@ PACKAGES_FOLDER=osm-packages git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git ${PACKAGES_FOLDER} ``` -Configure a file `envfile.rc` copying from `envconfig-local.rc` and set the required variables +## Configure the environment -```bash -# VIM Setup -OS_USERNAME= -OS_PASSWORD= -OS_TENANT_NAME= -OS_AUTH_URL= -OS_TENANT_ID= - -# OSM Setup -OSM_HOSTNAME= -VIM_TARGET= -VIM_MGMT_NET= - -# Clouds file datacenter -OS_CLOUD= -# SDNCs file -OS_SDNC= - -# K8S config file -K8S_CREDENTIALS= - -# The following set of environment variables will be used in host -# of the robot framework. Not needed for docker execution - -# Folder where Robot tests are stored -ROBOT_DEVOPS_FOLDER=robot-systest - -# Folder to save alternative DUT environments (optional) -ENVIRONMENTS_FOLDER=environments - -# Folder where all required packages are stored -PACKAGES_FOLDER=osm-packages - -# Folder where test results should be exported -ROBOT_REPORT_FOLDER=results -``` +Create a file `envfile.rc` copying from `envconfig-local.rc` and set the required variables. ## Running the tests ### From the host machine -If you have installed all the dependecnies, the way of executing the tests is via the following command: +If you have installed all the dependencies, the way of executing the tests is via the following command: ```bash source envfile.rc diff --git a/envconfig-local.rc b/envconfig-local.rc index 8bdc298..a1bbf62 100644 --- a/envconfig-local.rc +++ b/envconfig-local.rc @@ -10,27 +10,31 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Openstack Setup -OS_USERNAME= -OS_PASSWORD= -OS_TENANT_NAME= -OS_AUTH_URL= -OS_TENANT_ID= -OS_IDENTITY_API_VERSION= +# OSM target for the tests +export OSM_HOSTNAME= -# OSM Setup -OSM_HOSTNAME= -VIM_TARGET= -VIM_MGMT_NET= +# VIM to be used for the tests +export VIM_TARGET= +export VIM_MGMT_NET= -# Robot setup -ENVIRONMENTS_FOLDER=environments -PACKAGES_FOLDER=/robot-systest/osm-packages +# Variables required for tests running locally on the host (not necessary in Docker since they are already defined) +export PACKAGES_FOLDER= # path to the location of the OSM packages +export K8S_CREDENTIALS= # path to the kubeconfig file -# Clouds file datacenter -OS_CLOUD=openstack -# SDNCs file -OS_SDNC=onos +# Variables required for tests interacting with Openstack +export OS_CLOUD= # OpenStack Cloud defined in $HOME/.config/openstack/clouds.yaml or in /etc/openstack/clouds.yaml + +# Openstack variables required when using Docker to run tests (they are used to register the VIM) +export OS_USERNAME= +export OS_PASSWORD= +export OS_TENANT_NAME= +export OS_AUTH_URL= +export OS_TENANT_ID= +export OS_IDENTITY_API_VERSION= + +# SDN controller variables required for running tests with SDN controllers +export SDNC_USER= +export SDNC_PASSWORD= +export SDNC_TYPE= +export SDNC_URL= -LC_ALL=C.UTF-8 -LANG=C.UTF-8 diff --git a/robot-systest/envfile.rc b/robot-systest/envfile.rc deleted file mode 100644 index ef4ac32..0000000 --- a/robot-systest/envfile.rc +++ /dev/null @@ -1,28 +0,0 @@ -# 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 "Please set your environment variables." -# export OSM_HOSTNAME= -# export OS_CLOUD= -# export OS_SDNC= -# export VIM_TARGET= -# export VIM_MGMT_NET= -# export PACKAGES_FOLDER= -# export ROBOT_DEVOPS_FOLDER= -# export ROBOT_REPORT_FOLDER= -# K8s_01 variables - Installation of a K8s cluster from a NS -# export IP_VM1= -# export IP_VM2= -# export IP_VM3= -# export IP_VM4= -# export IP_JUJU= -# export JUJU_PASSWORD= # Could be found in ~/.local/share/juju/accounts.yaml file -- 2.25.1