aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-08-08 16:08:19 -0500
committerVictor Morales <victor.morales@intel.com>2017-08-08 16:08:19 -0500
commit134f97ab0d999e0655c3189244cb64228ceb7e0f (patch)
tree115ed8e9550eaf6e4caf75c2061f260e52ebbc72 /bootstrap/vagrant-onap
parentece790c24e7b22b2adc53cae9d1fa168f00ba97a (diff)
Create a Run.ps1 script
It was created the Run.ps1 helper script. Windows users can create VMs through this script without having to setup environment variables Change-Id: I5e8e25d3991cbea3d753afad370c07075ba9cb0e Signed-off-by: Victor Morales <victor.morales@intel.com>
Diffstat (limited to 'bootstrap/vagrant-onap')
-rw-r--r--bootstrap/vagrant-onap/CONTRIBUTING.md5
-rw-r--r--bootstrap/vagrant-onap/tools/Run.ps121
2 files changed, 26 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/CONTRIBUTING.md b/bootstrap/vagrant-onap/CONTRIBUTING.md
index e473927e4..ab7f6ba1d 100644
--- a/bootstrap/vagrant-onap/CONTRIBUTING.md
+++ b/bootstrap/vagrant-onap/CONTRIBUTING.md
@@ -17,6 +17,11 @@ command:
$ ./tools/run.sh testing [test_suite] [function]
+or using PowerShell
+
+ PS C:\> Set-ExecutionPolicy Bypass -Scope CurrentUser
+ PS C:\> .\tools\Run.ps1 [test_suite] [function]
+
Examples
--------
diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1
new file mode 100644
index 000000000..55adc11c9
--- /dev/null
+++ b/bootstrap/vagrant-onap/tools/Run.ps1
@@ -0,0 +1,21 @@
+switch ($args[0])
+ {
+ "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" }
+ "testing"
+ {
+ $env:DEPLOY_MODE="testing"
+ $test_suite="*"
+ if (!$args[1]) { $test_suite=$args[1] }
+ $env:TEST_SUITE=$test_suite
+ $test_case="*"
+ if (!$args[2]) { $test_case=$args[2] }
+ $env:TEST_CASE=$test_case
+
+ rm ./opt/ -Recurse -Force
+ rm $HOME/.m2/ -Recurse -Force
+ }
+ }
+
+vagrant destroy -f $args[0]
+vagrant up $args[0]