aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/vagrant-onap/README.md1
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile10
-rw-r--r--bootstrap/vagrant-onap/lib/vvp59
-rw-r--r--bootstrap/vagrant-onap/tests/test_vvp55
-rw-r--r--bootstrap/vagrant-onap/tools/Run.ps16
-rwxr-xr-xbootstrap/vagrant-onap/tools/run.sh4
-rw-r--r--test/csit/plans/sdc/nightly/setup.sh37
-rw-r--r--test/csit/plans/sdc/nightly/teardown.sh22
-rw-r--r--test/csit/plans/sdc/nightly/testplan.txt3
-rw-r--r--test/csit/scripts/sdc/clone_and_setup_sdc_data.sh.orig67
-rw-r--r--test/csit/tests/sdc/nightly/__init__.robot2
-rw-r--r--test/csit/tests/sdc/nightly/test1.robot16
12 files changed, 277 insertions, 5 deletions
diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md
index e1815e7eb..7a3641e4f 100644
--- a/bootstrap/vagrant-onap/README.md
+++ b/bootstrap/vagrant-onap/README.md
@@ -56,6 +56,7 @@ current options include:
| multicloud | Multi Cloud |
| ccsdk | Common Controller SDK |
| vnfsdk | VNF SDK |
+| vpp | VNF Validation Program |
| all_in_one | All ONAP services in a VM |
| testing | Unit Test VM |
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index dc8b34768..d70cf8f8a 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -211,6 +211,16 @@ nodes = [
:groups => ["individual"],
:args => ['vid'],
},
+ {
+ :name => "vvp",
+ :ips => ['10.252.0.17', "192.168.50.17"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 4 * 1024,
+ :groups => ["individual"],
+ :args => ['vvp'],
+ },
]
run_path = 'vagrant_utils/postinstall.sh'
diff --git a/bootstrap/vagrant-onap/lib/vvp b/bootstrap/vagrant-onap/lib/vvp
new file mode 100644
index 000000000..588f32b87
--- /dev/null
+++ b/bootstrap/vagrant-onap/lib/vvp
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+set -o xtrace
+
+source /var/onap/functions
+
+vvp_src_folder=$git_src_folder/vvp
+vvp_repos=("vvp/ansible-ice-bootstrap" "vvp/cms" "vvp/devkit" "vvp/documentation" "vvp/engagementmgr" "vvp/gitlab" "vvp/image-scanner" "vvp/jenkins" "vvp/portal" "vvp/postgresql" "vvp/test-engine" "vvp/validation-scripts")
+
+# clone_all_vvp_repos() - Function that clones vvp source repo.
+function clone_all_vvp_repos {
+ for repo in ${vvp_repos[@]}; do
+ clone_repo $repo $vvp_src_folder${repo#*vvp}
+ done
+}
+
+# compile_all_vvp_repos - Function that builds vvp source repo
+function compile_all_vvp_repos {
+ for repo in ${vvp_repos[@]}; do
+ compile_src $vvp_src_folder${repo#*vvp}
+ done
+}
+
+# _build_vvp_images() - Builds VNFSDK images from source code
+function _build_vvp_images {
+ echo "pass"
+}
+
+# get_vvp_images - Function that clones vvp Docker images
+function get_vvp_images {
+ if [[ "$build_image" == "True" ]]; then
+ _build_vvp_images
+ else
+ pull_docker_image refrepo:1.0-STAGING-latest
+ pull_docker_image refrepo:latest
+ fi
+}
+
+# install_vvp - Function that installs vvp Docker images
+function install_vvp {
+ echo "pass"
+}
+
+# init_vvp() - Init VNFSDK services
+function init_vvp {
+ if [[ "$clone_repo" == "True" ]]; then
+ clone_all_vvp_repos
+ if [[ "$compile_repo" == "True" ]]; then
+ compile_all_vvp_repos
+ fi
+ fi
+
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_vvp_images
+ if [[ "$skip_install" == "False" ]]; then
+ install_vvp
+ fi
+ fi
+}
diff --git a/bootstrap/vagrant-onap/tests/test_vvp b/bootstrap/vagrant-onap/tests/test_vvp
new file mode 100644
index 000000000..f77fdf4d3
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_vvp
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/vvp
+
+covered_functions=(
+"clone_all_vvp_repos" "compile_all_vvp_repos" "get_vvp_images" "install_vvp"
+)
+
+# test_clone_all_vvp_repos() - Verify the cloning of VNFSDK source repo.
+function test_clone_all_vvp_repos {
+ clone_all_vvp_repos
+
+ asserts_file_exist $vvp_src_folder/cms/pom.xml
+ asserts_file_exist $vvp_src_folder/devkit/LICENSE.TXT
+ asserts_file_exist $vvp_src_folder/engagementmgr/pom.xml
+ asserts_file_exist $vvp_src_folder/gitlab/pom.xml
+ asserts_file_exist $vvp_src_folder/image-scanner/pom.xml
+ asserts_file_exist $vvp_src_folder/jenkins/pom.xml
+ asserts_file_exist $vvp_src_folder/portal/pom.xml
+ asserts_file_exist $vvp_src_folder/postgresql/pom.xml
+ asserts_file_exist $vvp_src_folder/test-engine/pom.xml
+ asserts_file_exist $vvp_src_folder/validation-scripts/LICENSE.txt
+}
+
+# test_compile_all_vvp_repos () - Verify if VNFSDK source repo compiles correctly.
+function test_compile_all_vvp_repos {
+ clone_all_vvp_repos
+ compile_all_vvp_repos
+
+ # asserts_file_exist $vvp_src_folder/
+}
+
+# test_get_vvp_images() - Verify that the VNFSDK images are created or retrieved
+function test_get_vvp_images {
+ clone_all_vvp_repos
+ get_vvp_images
+
+ #asserts_image refrepo:latest
+}
+
+# test_install_vvp() - Verify that VNFSDK docker images are running.
+function test_install_vvp {
+ clone_all_vvp_repos
+ get_vvp_images
+ install_vvp
+
+ #asserts_image_running refrepo:1.0-STAGING-latest
+}
+
+if [ "$1" != '*' ]; then
+ unset covered_functions
+ covered_functions=$1
+fi
+main "${covered_functions[@]}"
diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1
index 71e595bd8..a74dcb72d 100644
--- a/bootstrap/vagrant-onap/tools/Run.ps1
+++ b/bootstrap/vagrant-onap/tools/Run.ps1
@@ -31,7 +31,7 @@ https://wiki.onap.org/display/DW/ONAP+on+Vagrant
#>
Param(
- [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "testing")]
+ [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "testing")]
[Parameter(Mandatory=$True,Position=0)]
[ValidateNotNullOrEmpty()]
[String]
@@ -85,7 +85,7 @@ $env:SKIP_INSTALL=$skip_install
switch ($Command)
{
"all_in_one" { $env:DEPLOY_MODE="all-in-one" }
- { @("dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc") -contains $_ } { $env:DEPLOY_MODE="individual" }
+ { @("dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp") -contains $_ } { $env:DEPLOY_MODE="individual" }
"testing"
{
$env:DEPLOY_MODE="testing"
@@ -110,7 +110,7 @@ switch ($Command)
}
default
{
- Write-Output $"Usage: $0 {all_in_one|dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|testing}"
+ Write-Output $"Usage: $0 {all_in_one|dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk|vnfsdk|vvp|testing}"
exit 1
}
}
diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh
index 2f2743a16..eaa49431e 100755
--- a/bootstrap/vagrant-onap/tools/run.sh
+++ b/bootstrap/vagrant-onap/tools/run.sh
@@ -16,7 +16,7 @@ Optional arguments:
Test case to use in testing mode.
Commands:
all_in_one Deploy in all-in-one mode.
- dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|vnfsdk|multicloud|ccsdk Deploy chosen service.
+ dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|vnfsdk|multicloud|ccsdk|vvp Deploy chosen service.
testing Deploy in testing mode.
EOF
}
@@ -65,7 +65,7 @@ case $COMMAND in
"all_in_one" )
export DEPLOY_MODE='all-in-one'
;;
- "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "vnfsdk"| "multicloud" | "ccsdk" )
+ "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "vnfsdk"| "multicloud" | "ccsdk" | "vvp" )
export DEPLOY_MODE='individual'
;;
"testing" )
diff --git a/test/csit/plans/sdc/nightly/setup.sh b/test/csit/plans/sdc/nightly/setup.sh
new file mode 100644
index 000000000..3e4e66024
--- /dev/null
+++ b/test/csit/plans/sdc/nightly/setup.sh
@@ -0,0 +1,37 @@
+#!/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.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+# Place the scripts in run order:
+
+
+source ${WORKSPACE}/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh
+
+source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_containers.sh
+
+source ${WORKSPACE}/test/csit/scripts/sdc/docker_health.sh
+
+source ${WORKSPACE}/test/csit/scripts/sdc/start_sdc_sanity.sh
+
+
+BE_IP=`get-instance-ip.sh sdc-BE`
+echo BE_IP=${BE_IP}
+
+
+# Pass any variables required by Robot test suites in ROBOT_VARIABLES
+ROBOT_VARIABLES="-v BE_IP:${BE_IP}"
+
diff --git a/test/csit/plans/sdc/nightly/teardown.sh b/test/csit/plans/sdc/nightly/teardown.sh
new file mode 100644
index 000000000..a5f69819e
--- /dev/null
+++ b/test/csit/plans/sdc/nightly/teardown.sh
@@ -0,0 +1,22 @@
+#!/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.
+#
+# Modifications copyright (c) 2017 AT&T Intellectual Property
+#
+
+source ${WORKSPACE}/test/csit/scripts/sdc/kill_containers_and_remove_dataFolders.sh
+
+# $WORKSPACE/archives/clamp-clone deleted with archives folder when tests starts so we keep it at the end for debugging
diff --git a/test/csit/plans/sdc/nightly/testplan.txt b/test/csit/plans/sdc/nightly/testplan.txt
new file mode 100644
index 000000000..3011ad5cb
--- /dev/null
+++ b/test/csit/plans/sdc/nightly/testplan.txt
@@ -0,0 +1,3 @@
+# Test suites are relative paths under [integration.git]/test/csit/tests/.
+# Place the suites in run order.
+sdc/nightly
diff --git a/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh.orig b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh.orig
new file mode 100644
index 000000000..d54d513a8
--- /dev/null
+++ b/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh.orig
@@ -0,0 +1,67 @@
+#!/bin/bash
+#
+# ============LICENSE_START=======================================================
+# ONAP CLAMP
+# ================================================================================
+# Copyright (C) 2017 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============================================
+# ===================================================================
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+echo "This is ${WORKSPACE}/test/csit/scripts/sdc/clone_and_setup_sdc_data.sh"
+
+# Clone sdc enviroment template
+mkdir -p ${WORKSPACE}/data/environments/
+mkdir -p ${WORKSPACE}/data/clone/
+mkdir -p ${WORKSPACE}/data/logs/BE/SDC/SDC-BE
+mkdir -p ${WORKSPACE}/data/logs/FE/SDC/SDC-FE
+chmod -R 777 ${WORKSPACE}/data/logs
+<<<<<<< HEAD
+=======
+ls -lR ${WORKSPACE}/data/logs/
+>>>>>>> debug csit sanity failure
+
+
+cd ${WORKSPACE}/data/clone
+git clone --depth 1 http://gerrit.onap.org/r/sdc -b master
+
+chmod -R 775 ${WORKSPACE}/data/
+
+# set enviroment variables
+
+export ENV_NAME='CSIT'
+export MR_IP_ADDR='10.0.0.1'
+
+ifconfig
+
+#if [ -e /opt/config/public_ip.txt ]
+# then
+# IP_ADDRESS=$(cat /opt/config/public_ip.txt)
+# else
+# IP_ADDRESS=$(ifconfig ens3 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
+# fi
+
+IP_ADDRESS=`ip route get 8.8.8.8 | awk '/src/{ print $7 }'`
+export HOST_IP=$IP_ADDRESS
+
+
+ cat ${WORKSPACE}/data/clone/sdc/sdc-os-chef/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > ${WORKSPACE}/data/environments/$ENV_NAME.json
+ sed -i "s/xxx/"$ENV_NAME"/g" ${WORKSPACE}/data/environments/$ENV_NAME.json
+ sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" ${WORKSPACE}/data/environments/$ENV_NAME.json
+ sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" ${WORKSPACE}/data/environments/$ENV_NAME.json
+
+
diff --git a/test/csit/tests/sdc/nightly/__init__.robot b/test/csit/tests/sdc/nightly/__init__.robot
new file mode 100644
index 000000000..8ee10d5f6
--- /dev/null
+++ b/test/csit/tests/sdc/nightly/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Sdc - HealthCheck
diff --git a/test/csit/tests/sdc/nightly/test1.robot b/test/csit/tests/sdc/nightly/test1.robot
new file mode 100644
index 000000000..6d4dc242d
--- /dev/null
+++ b/test/csit/tests/sdc/nightly/test1.robot
@@ -0,0 +1,16 @@
+*** Settings ***
+Library Collections
+Library OperatingSystem
+Library RequestsLibrary
+Library json
+
+*** Test Cases ***
+Get Requests health check ok
+ [Tags] get
+ CreateSession sdc-be http://localhost:8080
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Get Request sdc-be /sdc2/rest/healthCheck headers=&{headers}
+ Should Be Equal As Strings ${resp.status_code} 200
+ @{ITEMS}= Copy List ${resp.json()['componentsInfo']}
+ : FOR ${ELEMENT} IN @{ITEMS}
+ \ Log ${ELEMENT['healthCheckComponent']} ${ELEMENT['healthCheckStatus']}