Fix multicloud build image process

The multicloud script was using old variables and scripts which
haven't merged yet. So this commit commented out those invalid
instructions and rename old variables.

Change-Id: I5566b2fb773f7d7c92493162b0d9e10945382280
Signed-off-by: Victor Morales <victor.morales@intel.com>o
Issue-ID: MULTICLOUD-53
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 01c6afd..31a9970 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -140,6 +140,9 @@
     :ram    => 4 * 1024,
     :groups => ["individual"],
     :args   => ["multicloud"],
+    :fwds   => [
+      { :guest => 9003, :host => 9003, :guest_ip => '192.168.50.16' },
+    ]
   },
   {
     :name   => "oom",
@@ -358,11 +361,13 @@
       config.vbguest.auto_update = false
     end
 
+    sync_type = "virtualbox"
     if provider == :libvirt
       if not Vagrant.has_plugin?('vagrant-libvirt')
         system 'vagrant plugin install vagrant-libvirt'
         raise 'vagrant-libvirt was installed but it requires to execute again'
       end
+      sync_type = "nfs"
     end
 
     if provider == :openstack
@@ -478,8 +483,8 @@
 
         # Set Sync Folder
         nodeconfig.vm.synced_folder ".", "/vagrant", disabled: true
-        nodeconfig.vm.synced_folder './opt', '/opt/', create: true, type: "nfs"
-        nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true, type: "nfs"
+        nodeconfig.vm.synced_folder './opt', '/opt/', create: true, type: sync_type
+        nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true, type: sync_type
         if !is_windows
           nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
         end
diff --git a/bootstrap/vagrant-onap/lib/multicloud b/bootstrap/vagrant-onap/lib/multicloud
index 377d4dc..d2b09f2 100755
--- a/bootstrap/vagrant-onap/lib/multicloud
+++ b/bootstrap/vagrant-onap/lib/multicloud
@@ -4,19 +4,20 @@
 
 openstack_release="newton"
 
-# _build_images() - Function that builds docker images from source code
-function _build_images {
+# _build_multicloud_images() - Function that builds docker images from source code
+function _build_multicloud_images {
     install_docker
-    install_python_requirements $multicloud_src_folder/openstack/$openstack_release
-    pushd $multicloud_src_folder/openstack/$openstack_release
-    bash build_image.sh
+    pushd ${src_folders[multicloud]}/openstack/$openstack_release
+    install_python_requirements .
+    python setup.py develop
+    #bash build_image.sh
     popd
 }
 
 # get_multicloud_images() -
 function get_multicloud_images {
     if [[ "$build_image" == "True" ]]; then
-        _build_images
+        _build_multicloud_images
     else
         pull_onap_image multicloud/openstack-$openstack_release
     fi
@@ -24,9 +25,15 @@
 
 # install_multicloud() - 
 function install_multicloud {
-    pushd $multicloud_src_folder/openstack/$openstack_release
-    /opt/docker/docker-compose up -d
-    popd
+    #pushd ${src_folders[multicloud]}/openstack/$openstack_release
+    #/opt/docker/docker-compose up -d
+    #popd
+    if [[ "$build_image" == "True" ]]; then
+        multicloud-api --port 9003 --host 0.0.0.0 &
+    else
+        docker_id=`docker images | grep onap/multicloud/openstack-$openstack_release | grep latest |  awk '{print $3; exit}'`
+        docker run -d -p 0.0.0.0:9003:9003 $docker_id
+    fi
 }
 
 # init_multicloud() - Function that initialize Multi Cloud services