aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-09-01 16:49:09 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-01 16:49:09 +0000
commitb49dc6b5ba9b8c893dcdbbed296a6633cefbf906 (patch)
tree56cf26ce216eee5b36f4161ed91e82dad8835441
parent549761b03ff128fc2472715c57d4afb6ddb6bea4 (diff)
parent000de533553068dae03f9e83bd285b9059b63ca3 (diff)
Merge "Add MultCloud/MultiVIM support"
-rw-r--r--bootstrap/vagrant-onap/README.md3
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile13
-rwxr-xr-xbootstrap/vagrant-onap/lib/multicloud42
-rw-r--r--bootstrap/vagrant-onap/tests/test_multicloud38
-rw-r--r--bootstrap/vagrant-onap/tools/Run.ps12
-rwxr-xr-xbootstrap/vagrant-onap/tools/run.sh4
6 files changed, 98 insertions, 4 deletions
diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md
index 9e7054c66..08c5a5756 100644
--- a/bootstrap/vagrant-onap/README.md
+++ b/bootstrap/vagrant-onap/README.md
@@ -54,7 +54,8 @@ current options include:
| sdc | Service Design & Creation |
| sdnc | Software Defined Network Controller |
| vid | Virtual Infrastructure Development |
-| vfc | Virtual Function Controller (WIP) |
+| vfc | Virtual Function Controller |
+| multicloud | Multi Cloud |
| 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 5eb22d71f..ff3590882 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -352,6 +352,19 @@ Vagrant.configure("2") do |config|
end
end
+ config.vm.define :multicloud do |multicloud|
+ multicloud.vm.hostname = 'multicloud'
+ multicloud.vm.network :private_network, ip: '192.168.50.16'
+ multicloud.vm.provider "openstack" do |v|
+ v.server_name = 'multicloud'
+ end
+ multicloud.vm.provision 'shell' do |s|
+ s.path = 'vagrant_utils/postinstall.sh'
+ s.args = ['multicloud']
+ s.env = conf
+ end
+ end
+
when 'testing'
config.vm.define :testing do |testing|
diff --git a/bootstrap/vagrant-onap/lib/multicloud b/bootstrap/vagrant-onap/lib/multicloud
new file mode 100755
index 000000000..1126d6146
--- /dev/null
+++ b/bootstrap/vagrant-onap/lib/multicloud
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+set -o xtrace
+
+source /var/onap/functions
+
+multicloud_src_folder=$git_src_folder/multicloud
+multicloud_repos=("azure" "framework" "openstack" "openstack/vmware" "openstack/windriver")
+
+# clone_multicloud_repos() - Function that clones the Multi Cloud repositories
+function clone_multicloud_repos {
+ clone_repo multicloud $multicloud_src_folder
+
+ for dirc in ${multicloud_repos[@]}; do
+ clone_repo multicloud/$dirc $multicloud_src_folder/$dirc
+ done
+}
+
+# compile_multicloud_repos() -
+function compile_multicloud_repos {
+ compile_src multicloud $multicloud_src_folder
+
+ for dirc in ${multicloud_repos[@]}; do
+ compile_src $multicloud_src_folder/$dirc
+ done
+}
+
+# install_multicloud() -
+function install_multicloud {
+ echo "pass"
+}
+
+# init_multicloud() - Function that initialize Multi Cloud services
+function init_multicloud {
+ if [[ "$clone_repo" == "True" ]]; then
+ clone_multicloud_repos
+ if [[ "$compile_repo" == "True" ]]; then
+ compile_multicloud_repos
+ fi
+ fi
+ install_multicloud
+}
diff --git a/bootstrap/vagrant-onap/tests/test_multicloud b/bootstrap/vagrant-onap/tests/test_multicloud
new file mode 100644
index 000000000..4767152e9
--- /dev/null
+++ b/bootstrap/vagrant-onap/tests/test_multicloud
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+source /var/onap_tests/_test_base
+source /var/onap/multicloud
+
+covered_functions=(
+"clone_multicloud_repos" "compile_multicloud_repos" "install_multicloud"
+)
+
+# test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly
+function test_clone_multicloud_repos {
+ clone_multicloud_repos
+
+ asserts_file_exist $multicloud_src_folder/framework/multivimbroker/pom.xml
+ asserts_file_exist $multicloud_src_folder/openstack/pom.xml
+ asserts_file_exist $multicloud_src_folder/openstack/vmware/pom.xml
+}
+
+# test_compile_multicloud_repos() -
+function test_compile_multicloud_repos {
+ clone_multicloud_repos
+ compile_multicloud_repos
+
+ asserts_file_exist $multicloud_src_folder/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip
+ asserts_file_exist $multicloud_src_folder/openstack/vmware/vio/target/multivimdriver-vio-1.1.0-SNAPSHOT.zip
+}
+
+# test_install_multicloud() - Verify the built and start of Multi Cloud services
+function test_install_multicloud {
+ clone_multicloud_repos
+ install_multicloud
+}
+
+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 4d70140c2..103dfeee1 100644
--- a/bootstrap/vagrant-onap/tools/Run.ps1
+++ b/bootstrap/vagrant-onap/tools/Run.ps1
@@ -25,7 +25,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", "testing")]
+ [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "testing")]
[Parameter(Mandatory=$True,Position=0)]
[ValidateNotNullOrEmpty()]
[String]
diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh
index c606a0998..094577fb1 100755
--- a/bootstrap/vagrant-onap/tools/run.sh
+++ b/bootstrap/vagrant-onap/tools/run.sh
@@ -12,7 +12,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 Deploy chosen service.
+ dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud Deploy chosen service.
testing Deploy in testing mode.
EOF
}
@@ -55,7 +55,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" )
+ "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "multicloud" )
export DEPLOY_MODE='individual'
;;
"testing" )