vagrant-skytap 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/vagrant-skytap/action/add_vm_to_environment.rb +4 -4
- data/lib/vagrant-skytap/action/compose_environment.rb +131 -0
- data/lib/vagrant-skytap/action/create_environment.rb +3 -1
- data/lib/vagrant-skytap/action/initialize_api_client.rb +6 -5
- data/lib/vagrant-skytap/action/set_up_vm.rb +3 -1
- data/lib/vagrant-skytap/action/store_extra_data.rb +4 -2
- data/lib/vagrant-skytap/action.rb +4 -17
- data/lib/vagrant-skytap/api/environment.rb +53 -25
- data/lib/vagrant-skytap/api/vm.rb +9 -3
- data/lib/vagrant-skytap/command/up.rb +46 -30
- data/lib/vagrant-skytap/errors.rb +4 -0
- data/lib/vagrant-skytap/version.rb +1 -1
- data/locales/en.yml +5 -1
- data/spec/unit/actions/compose_environment_spec.rb +101 -0
- data/spec/unit/environment_spec.rb +26 -45
- data/spec/unit/support/shared/skytap_context.rb +5 -0
- data/vagrant-skytap.gemspec +3 -3
- metadata +9 -311
- data/.byebug_history +0 -256
- data/.project +0 -11
- data/_patches-20160112/0 +0 -388
- data/_patches-20160112/1 +0 -82
- data/_patches-20160112/2 +0 -239
- data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160112/acceptance-test-runner +0 -29
- data/_patches-20160112/ansible-1 +0 -92
- data/_patches-20160112/cache-api-client-in-up +0 -40
- data/_patches-20160112/dead-code-in-actions +0 -44
- data/_patches-20160112/debug-changes +0 -42
- data/_patches-20160112/demo-rails-app +0 -1276
- data/_patches-20160112/eng-10166-halt-spec +0 -40
- data/_patches-20160112/eng-10256 +0 -527
- data/_patches-20160112/eng-10256-2 +0 -162
- data/_patches-20160112/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160112/eng-10269-test-stuff +0 -87
- data/_patches-20160112/eng-10269-wtf +0 -119
- data/_patches-20160112/eng-10369 +0 -143
- data/_patches-20160112/eng-10369-tmp +0 -60
- data/_patches-20160112/eng-10919 +0 -56
- data/_patches-20160112/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160112/eng-11442 +0 -4
- data/_patches-20160112/eng-11616 +0 -403
- data/_patches-20160112/eng-11616-2 +0 -67
- data/_patches-20160112/eng-11616-actual +0 -184
- data/_patches-20160112/eng-11625a +0 -4
- data/_patches-20160112/eng-11711 +0 -85
- data/_patches-20160112/eng-12232-command-spec +0 -236
- data/_patches-20160112/eng-12235 +0 -83
- data/_patches-20160112/eng-12235-override-refactor +0 -140
- data/_patches-20160112/eng-12240 +0 -103
- data/_patches-20160112/eng-12249 +0 -40
- data/_patches-20160112/eng-12301 +0 -50
- data/_patches-20160112/eng-12843 +0 -95
- data/_patches-20160112/env-source +0 -112
- data/_patches-20160112/frickin-vagrant-spec +0 -163
- data/_patches-20160112/gem-pre-version +0 -14
- data/_patches-20160112/gems-old +0 -9
- data/_patches-20160112/googles-specs +0 -713
- data/_patches-20160112/local-configs-ignore +0 -61
- data/_patches-20160112/misc +0 -79
- data/_patches-20160112/network-unreachable +0 -31
- data/_patches-20160112/new-boxfile +0 -288
- data/_patches-20160112/parallelization-maybe +0 -198
- data/_patches-20160112/read-state +0 -23
- data/_patches-20160112/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160112/series +0 -60
- data/_patches-20160112/status +0 -12
- data/_patches-20160112/test-move-env-data +0 -231
- data/_patches-20160112/test-vagrantfile-vm1 +0 -167
- data/_patches-20160112/the_version_in_0.1.13.pre1 +0 -598
- data/_patches-20160112/vagrant-spec-mock-api +0 -137
- data/_patches-20160112/vagrant-vmware-plugin +0 -233
- data/_patches-20160112/vagrantfile +0 -403
- data/_patches-20160112/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160112/vagrantfile-for-nick +0 -95
- data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160112/vm-vanished +0 -42
- data/_patches-20160112a/01 +0 -148
- data/_patches-20160112a/2 +0 -239
- data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160112a/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160112a/acceptance-test-runner +0 -29
- data/_patches-20160112a/ansible-1 +0 -92
- data/_patches-20160112a/cache-api-client-in-up +0 -40
- data/_patches-20160112a/dead-code-in-actions +0 -44
- data/_patches-20160112a/debug-changes +0 -42
- data/_patches-20160112a/demo-rails-app +0 -1276
- data/_patches-20160112a/eng-10166-halt-spec +0 -40
- data/_patches-20160112a/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160112a/eng-10269-test-stuff +0 -87
- data/_patches-20160112a/eng-10269-wtf +0 -119
- data/_patches-20160112a/eng-10369 +0 -143
- data/_patches-20160112a/eng-10369-tmp +0 -60
- data/_patches-20160112a/eng-10919 +0 -56
- data/_patches-20160112a/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160112a/eng-11442 +0 -4
- data/_patches-20160112a/eng-11616 +0 -403
- data/_patches-20160112a/eng-11616-2 +0 -67
- data/_patches-20160112a/eng-11616-actual +0 -184
- data/_patches-20160112a/eng-11625a +0 -4
- data/_patches-20160112a/eng-11711 +0 -85
- data/_patches-20160112a/eng-12232-command-spec +0 -236
- data/_patches-20160112a/eng-12235 +0 -83
- data/_patches-20160112a/eng-12235-override-refactor +0 -140
- data/_patches-20160112a/eng-12240 +0 -103
- data/_patches-20160112a/eng-12249 +0 -40
- data/_patches-20160112a/eng-12301 +0 -50
- data/_patches-20160112a/eng-12843 +0 -95
- data/_patches-20160112a/env-source +0 -112
- data/_patches-20160112a/frickin-vagrant-spec +0 -163
- data/_patches-20160112a/gem-pre-version +0 -14
- data/_patches-20160112a/gems-old +0 -9
- data/_patches-20160112a/googles-specs +0 -713
- data/_patches-20160112a/local-configs-ignore +0 -61
- data/_patches-20160112a/misc +0 -79
- data/_patches-20160112a/network-unreachable +0 -31
- data/_patches-20160112a/new-boxfile +0 -288
- data/_patches-20160112a/parallelization-maybe +0 -198
- data/_patches-20160112a/read-state +0 -23
- data/_patches-20160112a/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160112a/series +0 -58
- data/_patches-20160112a/status +0 -14
- data/_patches-20160112a/test-move-env-data +0 -231
- data/_patches-20160112a/test-vagrantfile-vm1 +0 -167
- data/_patches-20160112a/the_version_in_0.1.13.pre1 +0 -612
- data/_patches-20160112a/then-copy-the-newer-files +0 -632
- data/_patches-20160112a/vagrant-spec-mock-api +0 -137
- data/_patches-20160112a/vagrant-vmware-plugin +0 -233
- data/_patches-20160112a/vagrantfile +0 -403
- data/_patches-20160112a/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160112a/vagrantfile-for-nick +0 -95
- data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160112a/vm-vanished +0 -42
- data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160113/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160113/acceptance-test-runner +0 -29
- data/_patches-20160113/ansible-1 +0 -92
- data/_patches-20160113/cache-api-client-in-up +0 -40
- data/_patches-20160113/dead-code-in-actions +0 -44
- data/_patches-20160113/debug-changes +0 -55
- data/_patches-20160113/demo-rails-app +0 -1276
- data/_patches-20160113/eng-10166-halt-spec +0 -40
- data/_patches-20160113/eng-10256 +0 -543
- data/_patches-20160113/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160113/eng-10269-test-stuff +0 -87
- data/_patches-20160113/eng-10269-wtf +0 -119
- data/_patches-20160113/eng-10369 +0 -143
- data/_patches-20160113/eng-10369-tmp +0 -60
- data/_patches-20160113/eng-10919 +0 -56
- data/_patches-20160113/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160113/eng-11442 +0 -4
- data/_patches-20160113/eng-11616 +0 -403
- data/_patches-20160113/eng-11616-2 +0 -67
- data/_patches-20160113/eng-11616-actual +0 -184
- data/_patches-20160113/eng-11625a +0 -4
- data/_patches-20160113/eng-11711 +0 -85
- data/_patches-20160113/eng-12232-command-spec +0 -236
- data/_patches-20160113/eng-12235 +0 -83
- data/_patches-20160113/eng-12235-override-refactor +0 -140
- data/_patches-20160113/eng-12240 +0 -103
- data/_patches-20160113/eng-12249 +0 -40
- data/_patches-20160113/eng-12301 +0 -50
- data/_patches-20160113/eng-12720 +0 -47
- data/_patches-20160113/eng-12843 +0 -95
- data/_patches-20160113/env-source +0 -112
- data/_patches-20160113/frickin-vagrant-spec +0 -163
- data/_patches-20160113/gem-pre-version +0 -14
- data/_patches-20160113/gems-old +0 -9
- data/_patches-20160113/googles-specs +0 -713
- data/_patches-20160113/local-configs-ignore +0 -61
- data/_patches-20160113/misc +0 -79
- data/_patches-20160113/network-unreachable +0 -31
- data/_patches-20160113/new-boxfile +0 -288
- data/_patches-20160113/parallelization-maybe +0 -198
- data/_patches-20160113/read-state +0 -23
- data/_patches-20160113/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160113/series +0 -56
- data/_patches-20160113/status +0 -14
- data/_patches-20160113/test-move-env-data +0 -231
- data/_patches-20160113/test-vagrantfile-vm1 +0 -167
- data/_patches-20160113/vagrant-spec-mock-api +0 -137
- data/_patches-20160113/vagrant-vmware-plugin +0 -233
- data/_patches-20160113/vagrantfile +0 -403
- data/_patches-20160113/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160113/vagrantfile-for-nick +0 -95
- data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160113/vm-vanished +0 -42
- data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160118/acceptance-test-runner +0 -29
- data/_patches-20160118/ansible-1 +0 -92
- data/_patches-20160118/cache-api-client-in-up +0 -40
- data/_patches-20160118/dead-code-in-actions +0 -44
- data/_patches-20160118/debug-changes +0 -55
- data/_patches-20160118/demo-rails-app +0 -1276
- data/_patches-20160118/eng-10166-halt-spec +0 -40
- data/_patches-20160118/eng-10256 +0 -554
- data/_patches-20160118/eng-10256-cr +0 -314
- data/_patches-20160118/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160118/eng-10269-test-stuff +0 -87
- data/_patches-20160118/eng-10269-wtf +0 -119
- data/_patches-20160118/eng-10369 +0 -143
- data/_patches-20160118/eng-10369-tmp +0 -60
- data/_patches-20160118/eng-10919 +0 -56
- data/_patches-20160118/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160118/eng-11442 +0 -4
- data/_patches-20160118/eng-11616 +0 -403
- data/_patches-20160118/eng-11616-2 +0 -67
- data/_patches-20160118/eng-11616-actual +0 -184
- data/_patches-20160118/eng-11625a +0 -4
- data/_patches-20160118/eng-11711 +0 -85
- data/_patches-20160118/eng-12232-command-spec +0 -236
- data/_patches-20160118/eng-12235 +0 -83
- data/_patches-20160118/eng-12235-override-refactor +0 -140
- data/_patches-20160118/eng-12240 +0 -103
- data/_patches-20160118/eng-12249 +0 -40
- data/_patches-20160118/eng-12301 +0 -50
- data/_patches-20160118/eng-12720 +0 -74
- data/_patches-20160118/eng-12843 +0 -95
- data/_patches-20160118/eng-13040 +0 -291
- data/_patches-20160118/env-source +0 -112
- data/_patches-20160118/frickin-vagrant-spec +0 -163
- data/_patches-20160118/gem-pre-version +0 -14
- data/_patches-20160118/gems-old +0 -9
- data/_patches-20160118/googles-specs +0 -713
- data/_patches-20160118/local-configs-ignore +0 -61
- data/_patches-20160118/misc +0 -79
- data/_patches-20160118/network-unreachable +0 -31
- data/_patches-20160118/new-boxfile +0 -288
- data/_patches-20160118/parallelization-maybe +0 -198
- data/_patches-20160118/port-forwarding-processes +0 -87
- data/_patches-20160118/read-state +0 -23
- data/_patches-20160118/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160118/series +0 -59
- data/_patches-20160118/status +0 -13
- data/_patches-20160118/test-move-env-data +0 -231
- data/_patches-20160118/test-vagrantfile-vm1 +0 -167
- data/_patches-20160118/vagrant-spec-mock-api +0 -137
- data/_patches-20160118/vagrant-vmware-plugin +0 -233
- data/_patches-20160118/vagrantfile +0 -403
- data/_patches-20160118/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160118/vagrantfile-for-nick +0 -95
- data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160118/vm-vanished +0 -42
- data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/CR-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/CR-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/WIP-ABOVE-THIS-LINE +0 -4
- data/_patches-20160118a/WIP-BELOW-THIS-LINE +0 -4
- data/_patches-20160118a/acceptance-test-runner +0 -29
- data/_patches-20160118a/ansible-1 +0 -92
- data/_patches-20160118a/bar +0 -189
- data/_patches-20160118a/cache-api-client-in-up +0 -40
- data/_patches-20160118a/dead-code-in-actions +0 -44
- data/_patches-20160118a/debug-changes +0 -55
- data/_patches-20160118a/demo-rails-app +0 -1276
- data/_patches-20160118a/eng-10166-halt-spec +0 -40
- data/_patches-20160118a/eng-10256 +0 -554
- data/_patches-20160118a/eng-10256-cr +0 -314
- data/_patches-20160118a/eng-10256-ubuntu-testing +0 -88
- data/_patches-20160118a/eng-10269-test-stuff +0 -87
- data/_patches-20160118a/eng-10269-wtf +0 -119
- data/_patches-20160118a/eng-10369 +0 -143
- data/_patches-20160118a/eng-10369-tmp +0 -60
- data/_patches-20160118a/eng-10919 +0 -56
- data/_patches-20160118a/eng-11177-fix-actions-requires +0 -44
- data/_patches-20160118a/eng-11442 +0 -4
- data/_patches-20160118a/eng-11616 +0 -403
- data/_patches-20160118a/eng-11616-2 +0 -67
- data/_patches-20160118a/eng-11616-actual +0 -184
- data/_patches-20160118a/eng-11625a +0 -4
- data/_patches-20160118a/eng-11711 +0 -85
- data/_patches-20160118a/eng-12232-command-spec +0 -236
- data/_patches-20160118a/eng-12235 +0 -83
- data/_patches-20160118a/eng-12235-override-refactor +0 -140
- data/_patches-20160118a/eng-12240 +0 -103
- data/_patches-20160118a/eng-12249 +0 -40
- data/_patches-20160118a/eng-12301 +0 -50
- data/_patches-20160118a/eng-12720 +0 -74
- data/_patches-20160118a/eng-12843 +0 -95
- data/_patches-20160118a/eng-13040 +0 -291
- data/_patches-20160118a/env-source +0 -112
- data/_patches-20160118a/foo +0 -169
- data/_patches-20160118a/frickin-vagrant-spec +0 -163
- data/_patches-20160118a/gem-pre-version +0 -14
- data/_patches-20160118a/gems-old +0 -9
- data/_patches-20160118a/googles-specs +0 -713
- data/_patches-20160118a/guestport-madness +0 -59
- data/_patches-20160118a/local-configs-ignore +0 -61
- data/_patches-20160118a/misc +0 -79
- data/_patches-20160118a/network-unreachable +0 -31
- data/_patches-20160118a/new-boxfile +0 -288
- data/_patches-20160118a/parallelization-maybe +0 -198
- data/_patches-20160118a/port-forwarding-processes +0 -87
- data/_patches-20160118a/read-state +0 -23
- data/_patches-20160118a/refactor-to-use-public_address-cap +0 -25
- data/_patches-20160118a/series +0 -62
- data/_patches-20160118a/status +0 -14
- data/_patches-20160118a/test-move-env-data +0 -231
- data/_patches-20160118a/test-vagrantfile-vm1 +0 -167
- data/_patches-20160118a/vagrant-spec-mock-api +0 -137
- data/_patches-20160118a/vagrant-vmware-plugin +0 -233
- data/_patches-20160118a/vagrantfile +0 -403
- data/_patches-20160118a/vagrantfile-for-acceptance-tests +0 -29
- data/_patches-20160118a/vagrantfile-for-nick +0 -95
- data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +0 -134
- data/_patches-20160118a/vm-vanished +0 -42
@@ -1,61 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 9e196ca30da26298aa093d37c9baa3016113de9e
|
3
|
-
# Parent 813456f18a2d7810c0785efa925e2516a7fa5729
|
4
|
-
local configs. Ready to commit below this line -----------------------------------------
|
5
|
-
|
6
|
-
diff -r 813456f18a2d .agignore
|
7
|
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
8
|
-
+++ b/.agignore Fri Jan 08 11:51:56 2016 -0800
|
9
|
-
@@ -0,0 +1,8 @@
|
10
|
-
+#syntax: glob
|
11
|
-
+.hg
|
12
|
-
+.vagrant*
|
13
|
-
+dotvagrant
|
14
|
-
+*.diff
|
15
|
-
+_patches*
|
16
|
-
+.byebug*
|
17
|
-
+eng-*
|
18
|
-
diff -r 813456f18a2d .hgignore
|
19
|
-
--- a/.hgignore Tue Jan 05 13:24:28 2016 -0800
|
20
|
-
+++ b/.hgignore Fri Jan 08 11:51:56 2016 -0800
|
21
|
-
@@ -14,9 +14,16 @@
|
22
|
-
^Gemfile\.lock$
|
23
|
-
|
24
|
-
# Vagrant
|
25
|
-
-^\.vagrant$
|
26
|
-
-^Vagrantfile$
|
27
|
-
+^\.vagrant
|
28
|
-
+^dotvagrant
|
29
|
-
+#^Vagrantfile$
|
30
|
-
#!example_box/Vagrantfile
|
31
|
-
|
32
|
-
# RVM files for gemset/ruby setting
|
33
|
-
\.ruby-version$
|
34
|
-
+
|
35
|
-
+^\.project
|
36
|
-
+\.diff
|
37
|
-
+^_patches
|
38
|
-
+^\.byebug
|
39
|
-
+^eng-
|
40
|
-
diff -r 813456f18a2d Gemfile
|
41
|
-
--- a/Gemfile Tue Jan 05 13:24:28 2016 -0800
|
42
|
-
+++ b/Gemfile Fri Jan 08 11:51:56 2016 -0800
|
43
|
-
@@ -1,6 +1,7 @@
|
44
|
-
source "https://rubygems.org"
|
45
|
-
|
46
|
-
gemspec
|
47
|
-
+gem "byebug"
|
48
|
-
|
49
|
-
group :development do
|
50
|
-
# We depend on Vagrant for development, but we don't add it as a
|
51
|
-
@@ -10,9 +11,8 @@
|
52
|
-
gem 'vagrant', path: "../vagrant"
|
53
|
-
else
|
54
|
-
# TODO test against tip
|
55
|
-
- gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :tag => 'v1.7.2'
|
56
|
-
+ gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :tag => 'v1.7.4'
|
57
|
-
end
|
58
|
-
- gem "byebug"
|
59
|
-
|
60
|
-
|
61
|
-
if File.exist?(File.expand_path("../../vagrant-spec", __FILE__))
|
data/_patches-20160118/misc
DELETED
@@ -1,79 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 0dabf10f761d085b4fb8833f84c1b3a438015087
|
3
|
-
G.D. acceptance test(s)!
|
4
|
-
|
5
|
-
diff --git a/spec/acceptance/provider/status_spec.rb b/spec/acceptance/provider/status_spec.rb
|
6
|
-
new file mode 100644
|
7
|
-
--- /dev/null
|
8
|
-
+++ b/spec/acceptance/provider/status_spec.rb
|
9
|
-
@@ -0,0 +1,26 @@
|
10
|
-
+shared_examples 'provider/status' do |provider, options|
|
11
|
-
+ if !options[:box]
|
12
|
-
+ raise ArgumentError,
|
13
|
-
+ "box option must be specified for provider: #{provider}"
|
14
|
-
+ end
|
15
|
-
+
|
16
|
-
+ include_context 'acceptance'
|
17
|
-
+
|
18
|
-
+ before do
|
19
|
-
+ environment.skeleton('generic')
|
20
|
-
+ assert_execute('vagrant', 'box', 'add', 'skytap-dummy', options[:box])
|
21
|
-
+ #assert_execute('vagrant', 'up', "--provider=#{provider}")
|
22
|
-
+ end
|
23
|
-
+
|
24
|
-
+ after do
|
25
|
-
+ assert_execute('vagrant', 'destroy', '--force')
|
26
|
-
+ end
|
27
|
-
+
|
28
|
-
+ it 'should show status' do
|
29
|
-
+ status("Test: can show status")
|
30
|
-
+ result = execute("vagrant", "status")
|
31
|
-
+ expect(result).to exit_with(0)
|
32
|
-
+ #expect(result.stdout).to match(/vm1\s+not created/)
|
33
|
-
+ expect(result.stdout).to match(/vm1\s+not created \(skytap\)/)
|
34
|
-
+ end
|
35
|
-
+end
|
36
|
-
diff --git a/spec/acceptance/skeletons/generic/Vagrantfile b/spec/acceptance/skeletons/generic/Vagrantfile
|
37
|
-
--- a/spec/acceptance/skeletons/generic/Vagrantfile
|
38
|
-
+++ b/spec/acceptance/skeletons/generic/Vagrantfile
|
39
|
-
@@ -2,14 +2,16 @@
|
40
|
-
config.vm.box = "skytap-dummy"
|
41
|
-
|
42
|
-
config.vm.provider :skytap do |skytap, override|
|
43
|
-
- skytap.username = "user"
|
44
|
-
- skytap.api_token = "9999999999999999999999"
|
45
|
-
- skytap.base_url = "https://example.com/"
|
46
|
-
+ skytap.username = "vagrant_provider_admin"
|
47
|
-
+ skytap.api_token = "7c5718531a32eb90e92c804ce1f73da98be22cdf"
|
48
|
-
+ skytap.base_url = "https://test.skytap.com/"
|
49
|
-
end
|
50
|
-
|
51
|
-
config.vm.define "vm1" do |ubuntu|
|
52
|
-
ubuntu.vm.provider :skytap do |box|
|
53
|
-
- box.vm_url = "https://example.com/vms/1"
|
54
|
-
+ box.vm_url = "https://test.skytap.com/vms/6863190"
|
55
|
-
end
|
56
|
-
+ config.ssh.host = '127.0.0.1'
|
57
|
-
+ config.ssh.port = "22"
|
58
|
-
end
|
59
|
-
end
|
60
|
-
diff --git a/spec/acceptance/skeletons/generic/skytap-dummy b/spec/acceptance/skeletons/generic/skytap-dummy
|
61
|
-
new file mode 100644
|
62
|
-
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9eefb302ee552c8d3c6ad929f4946988d2857fd
|
63
|
-
GIT binary patch
|
64
|
-
literal 167
|
65
|
-
zc$|~(=3sc`<q^Wb{Pw&f*C7Le)`#n=yCyK7F!7B3VAi;7K~nTA4UdoS!nm8dcWEpA
|
66
|
-
zx&O@2fG7W);?HC1`>l`dJH1U&X=?GSnWdrogU%S~=d9#<+#?tswQ`Ecxm!lTn*!(a
|
67
|
-
zPoMF}BK&2Ik7Dc9y_IWo_uq-M3w-}aICx!JmBjDY3pp3x)0Xw${)Bz*{m=2!nHiA5
|
68
|
-
Qnkt6NmOI}uXfQAU04kYD3;+NC
|
69
|
-
|
70
|
-
diff --git a/spec/acceptance/skeletons/generic/skytap-dummy.box b/spec/acceptance/skeletons/generic/skytap-dummy.box
|
71
|
-
new file mode 100644
|
72
|
-
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f9eefb302ee552c8d3c6ad929f4946988d2857fd
|
73
|
-
GIT binary patch
|
74
|
-
literal 167
|
75
|
-
zc$|~(=3sc`<q^Wb{Pw&f*C7Le)`#n=yCyK7F!7B3VAi;7K~nTA4UdoS!nm8dcWEpA
|
76
|
-
zx&O@2fG7W);?HC1`>l`dJH1U&X=?GSnWdrogU%S~=d9#<+#?tswQ`Ecxm!lTn*!(a
|
77
|
-
zPoMF}BK&2Ik7Dc9y_IWo_uq-M3w-}aICx!JmBjDY3pp3x)0Xw${)Bz*{m=2!nHiA5
|
78
|
-
Qnkt6NmOI}uXfQAU04kYD3;+NC
|
79
|
-
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 3ea4ed6d64784874bd83eec8022c452858582802
|
3
|
-
The error message for ENETUNREACH, in case we ever need it
|
4
|
-
|
5
|
-
diff -r 3ea4ed6d6478 -r 07650da5cc24 lib/vagrant-skytap/errors.rb
|
6
|
-
--- a/lib/vagrant-skytap/errors.rb Thu Nov 05 19:23:56 2015 -0800
|
7
|
-
+++ b/lib/vagrant-skytap/errors.rb Thu Nov 05 19:24:09 2015 -0800
|
8
|
-
@@ -66,6 +66,10 @@
|
9
|
-
class NoConnectionOptions < VagrantSkytapError
|
10
|
-
error_key(:no_connection_options)
|
11
|
-
end
|
12
|
-
+
|
13
|
-
+ class NetworkUnreachable < VagrantSkytapError
|
14
|
-
+ error_key(:network_unreachable)
|
15
|
-
+ end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
diff -r 3ea4ed6d6478 -r 07650da5cc24 locales/en.yml
|
20
|
-
--- a/locales/en.yml Thu Nov 05 19:23:56 2015 -0800
|
21
|
-
+++ b/locales/en.yml Thu Nov 05 19:24:09 2015 -0800
|
22
|
-
@@ -73,6 +73,9 @@
|
23
|
-
Host path: %{hostpath}
|
24
|
-
Error: %{err}
|
25
|
-
|
26
|
-
+ network_unreachable: |-
|
27
|
-
+ The network was unreachable. This can occur when an environment is first created.
|
28
|
-
+
|
29
|
-
does_not_exist: |-
|
30
|
-
%{object_name} was not found.
|
31
|
-
|
@@ -1,288 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent 04af363aa9954a577b32c915fdd5f25c11e6510c
|
3
|
-
# Parent aa27fbed31fcb99c72b098e9b66df848cd8ff73e
|
4
|
-
[mq]: new-boxfile
|
5
|
-
|
6
|
-
diff --git a/Vagrantfile b/Vagrantfile
|
7
|
-
--- a/Vagrantfile
|
8
|
-
+++ b/Vagrantfile
|
9
|
-
@@ -1,67 +1,83 @@
|
10
|
-
Vagrant.configure(2) do |config|
|
11
|
-
- config.vm.box = "skytap-dummy"
|
12
|
-
- config.vm.synced_folder ".", "/vagrant", disabled: true
|
13
|
-
-
|
14
|
-
- config.vm.provider :skytap do |skytap, override|
|
15
|
-
- skytap.username = "etrue"
|
16
|
-
- skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
|
17
|
-
- skytap.base_url = "https://cloud.skytap.com/"
|
18
|
-
- #skytap.username = "vagrant_provider_admin"
|
19
|
-
- #skytap.api_token = "7c5718531a32eb90e92c804ce1f73da98be22cdf"
|
20
|
-
- #skytap.base_url = "https://test.skytap.com/"
|
21
|
-
- #skytap.username = "jsmith"
|
22
|
-
- #skytap.api_token = "754be5220955f35840498340606b4dfa89f7eb61"
|
23
|
-
- #skytap.base_url = "https://cloud.skytap.dev/"
|
24
|
-
+ config.vm.define "vm1" do |server|
|
25
|
-
+ server.vm.box = "skytap/vm-3157858"
|
26
|
-
+ server.vm.provider :skytap do |box|
|
27
|
-
+ box.cpus = 1
|
28
|
-
+ end
|
29
|
-
end
|
30
|
-
-
|
31
|
-
- GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
|
32
|
-
- # for test user
|
33
|
-
- #GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/4840008'
|
34
|
-
- # local user
|
35
|
-
- #GENERIC_UBUNTU = 'https://cloud.skytap.dev/vms/374'
|
36
|
-
-
|
37
|
-
- UBUNTU1 = "https://cloud.skytap.com/vms/7285844"
|
38
|
-
- UBUNTU2 = "https://cloud.skytap.com/vms/7285846"
|
39
|
-
- UBUNTU_WITH_VAGRANT = "https://cloud.skytap.com/vms/7397734"
|
40
|
-
-
|
41
|
-
-
|
42
|
-
- # separate template
|
43
|
-
- # another ubuntu = 'https://cloud.skytap.com/vms/7242466'
|
44
|
-
- WINDOWS_WINRM_CONFIGURED = 'https://cloud.skytap.com/vms/7242468'
|
45
|
-
-
|
46
|
-
- config.vm.define "vm1" do |ubuntu|
|
47
|
-
- ubuntu.vm.hostname = "vm1"
|
48
|
-
- ubuntu.vm.provider :skytap do |box|
|
49
|
-
- box.vm_url = UBUNTU1#GENERIC_UBUNTU
|
50
|
-
- #box.cpus = 1
|
51
|
-
- #box.cpuspersocket = 1
|
52
|
-
- #box.ram = 1024
|
53
|
-
- #box.guestos = "ubuntu"
|
54
|
-
+ config.vm.define "vm2" do |server|
|
55
|
-
+ server.vm.box = "skytap/vm-7285844"
|
56
|
-
+ server.vm.provider :skytap do |box|
|
57
|
-
+ box.cpus = 1
|
58
|
-
end
|
59
|
-
- ubuntu.vm.synced_folder "~/test1", "/synced", type: :nfs
|
60
|
-
- ubuntu.vm.communicator = :ssh
|
61
|
-
- ubuntu.ssh.username = "skytap"
|
62
|
-
- ubuntu.ssh.password = "ChangeMe!"
|
63
|
-
- end
|
64
|
-
-
|
65
|
-
- config.vm.define "vm2" do |windows|
|
66
|
-
- windows.vm.provider :skytap do |box, override|
|
67
|
-
- box.vm_url = WINDOWS_WINRM_CONFIGURED
|
68
|
-
- override.vm.guest = "windows"
|
69
|
-
- end
|
70
|
-
- windows.vm.communicator = :winrm
|
71
|
-
- end
|
72
|
-
- config.winrm.username = 'Administrator'
|
73
|
-
- config.winrm.password = 'admin'
|
74
|
-
-
|
75
|
-
- config.vm.define "vm3" do |ubuntu|
|
76
|
-
- ubuntu.vm.hostname = "vm3"
|
77
|
-
- ubuntu.vm.provider :skytap do |box|
|
78
|
-
- box.vm_url = UBUNTU2#GENERIC_UBUNTU
|
79
|
-
- end
|
80
|
-
- ubuntu.vm.communicator = :ssh
|
81
|
-
- ubuntu.ssh.username = "skytap"
|
82
|
-
- ubuntu.ssh.password = "CarpYe$$$"
|
83
|
-
- ubuntu.vm.synced_folder "~/test2", "/synced", type: :nfs
|
84
|
-
end
|
85
|
-
end
|
86
|
-
+
|
87
|
-
+
|
88
|
-
+#Vagrant.configure(2) do |config|
|
89
|
-
+# config.vm.box = "skytap/empty"
|
90
|
-
+# config.vm.synced_folder ".", "/vagrant", disabled: true
|
91
|
-
+#
|
92
|
-
+# config.vm.provider :skytap do |skytap, override|
|
93
|
-
+# skytap.username = "etrue"
|
94
|
-
+# skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
|
95
|
-
+# #skytap.username = "vagrant_provider_admin"
|
96
|
-
+# #skytap.api_token = "7c5718531a32eb90e92c804ce1f73da98be22cdf"
|
97
|
-
+# #skytap.base_url = "https://test.skytap.com/"
|
98
|
-
+# #skytap.username = "jsmith"
|
99
|
-
+# #skytap.api_token = "754be5220955f35840498340606b4dfa89f7eb61"
|
100
|
-
+# #skytap.base_url = "https://cloud.skytap.dev/"
|
101
|
-
+# end
|
102
|
-
+#
|
103
|
-
+# GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
|
104
|
-
+# # for test user
|
105
|
-
+# #GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/4840008'
|
106
|
-
+# # local user
|
107
|
-
+# #GENERIC_UBUNTU = 'https://cloud.skytap.dev/vms/374'
|
108
|
-
+#
|
109
|
-
+# UBUNTU1 = "https://cloud.skytap.com/vms/7285844"
|
110
|
-
+# UBUNTU2 = "https://cloud.skytap.com/vms/7285846"
|
111
|
-
+# UBUNTU_WITH_VAGRANT = "https://cloud.skytap.com/vms/7397734"
|
112
|
-
+# UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_A = "https://cloud.skytap.com/vms/7457184"
|
113
|
-
+# UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_B = "https://cloud.skytap.com/vms/7468766"
|
114
|
-
+#
|
115
|
-
+# # separate template
|
116
|
-
+# # another ubuntu = 'https://cloud.skytap.com/vms/7242466'
|
117
|
-
+# WINDOWS_WINRM_CONFIGURED = 'https://cloud.skytap.com/vms/7242468'
|
118
|
-
+#
|
119
|
-
+# config.vm.define "vm1" do |ubuntu|
|
120
|
-
+# ubuntu.vm.hostname = "vm1"
|
121
|
-
+# ubuntu.vm.provider :skytap do |box|
|
122
|
-
+# box.vm_url = UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_A#GENERIC_UBUNTU
|
123
|
-
+# #box.cpus = 1
|
124
|
-
+# #box.cpuspersocket = 1
|
125
|
-
+# #box.ram = 1024
|
126
|
-
+# #box.guestos = "ubuntu"
|
127
|
-
+# end
|
128
|
-
+# ubuntu.vm.synced_folder "~/test1", "/synced", type: :nfs
|
129
|
-
+# ubuntu.vm.communicator = :ssh
|
130
|
-
+# ubuntu.ssh.username = "skytap"
|
131
|
-
+# ubuntu.ssh.password = "ChangeMe!"
|
132
|
-
+# end
|
133
|
-
+##
|
134
|
-
+## config.vm.define "vm2" do |windows|
|
135
|
-
+## windows.vm.provider :skytap do |box, override|
|
136
|
-
+## box.vm_url = WINDOWS_WINRM_CONFIGURED
|
137
|
-
+## override.vm.guest = "windows"
|
138
|
-
+## end
|
139
|
-
+## windows.vm.communicator = :winrm
|
140
|
-
+## end
|
141
|
-
+## config.winrm.username = 'Administrator'
|
142
|
-
+## config.winrm.password = 'admin'
|
143
|
-
+#
|
144
|
-
+# config.vm.define "vm3" do |ubuntu|
|
145
|
-
+# ubuntu.vm.hostname = "vm3"
|
146
|
-
+# ubuntu.vm.provider :skytap do |box|
|
147
|
-
+# box.vm_url = UBUNTU_STOPPED_ENVIRONMENT_SOURCE_VM_B#GENERIC_UBUNTU
|
148
|
-
+# end
|
149
|
-
+# ubuntu.vm.communicator = :ssh
|
150
|
-
+# ubuntu.ssh.username = "skytap"
|
151
|
-
+# ubuntu.ssh.password = "CarpYe$$$"
|
152
|
-
+# ubuntu.vm.synced_folder "~/test2", "/synced", type: :nfs
|
153
|
-
+# end
|
154
|
-
+#end
|
155
|
-
diff --git a/example_box/Vagrantfile b/example_box/Vagrantfile
|
156
|
-
--- a/example_box/Vagrantfile
|
157
|
-
+++ b/example_box/Vagrantfile
|
158
|
-
@@ -1,8 +1,5 @@
|
159
|
-
-# -*- mode: ruby -*-
|
160
|
-
-# vi: set ft=ruby :
|
161
|
-
-
|
162
|
-
-Vagrant.configure("2") do |config|
|
163
|
-
- config.vm.provider :aws do |aws|
|
164
|
-
- aws.ami = "ami-7747d01e"
|
165
|
-
+Vagrant.configure(2) do |config|
|
166
|
-
+ config.vm.provider :skytap do |skytap|
|
167
|
-
+ skytap.vm_url = "https://cloud.skytap.com/vms/3157858"
|
168
|
-
end
|
169
|
-
end
|
170
|
-
diff --git a/example_box/metadata.json b/example_box/metadata.json
|
171
|
-
--- a/example_box/metadata.json
|
172
|
-
+++ b/example_box/metadata.json
|
173
|
-
@@ -1,3 +1,3 @@
|
174
|
-
{
|
175
|
-
- "provider": "aws"
|
176
|
-
+ "provider": "skytap"
|
177
|
-
}
|
178
|
-
diff --git a/example_box/skytap-3157858.box b/example_box/skytap-3157858.box
|
179
|
-
new file mode 100644
|
180
|
-
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..460c11de4737e8e8ecd2f970010212c9b7919fcc
|
181
|
-
GIT binary patch
|
182
|
-
literal 293
|
183
|
-
zc$@(x0owi_iwFQ4GdWfO1MSq!YJ@Nl2k<@n6v0z_iAmJB2>TknmY{LFtzX0_l-hT1
|
184
|
-
z)@=9CgFO_xEc|~U8O;de#|(`cZB?nPqOU{O?zX@flSx9(YbNEgGU3m?I3-+2E=A0R
|
185
|
-
zkc9Dsr|FKcO{)1}9IP^~6m89@SMpq1Rjus%Cn4AMPJ9H!347B`r&60RC*kn+ZdD%!
|
186
|
-
zpTVt*gU!+CNga)9ZFQ>Ge*eGtt^WnjuKgb;nd|>pX6XNaaryeR=-TRZ9F2YukEHC#
|
187
|
-
z>@Uo2Jot!C4gH=HB=<97N%Y~o%n={E)aTLE<Uqm~Yx^OOqN47`l3uopu8F2*h+>{*
|
188
|
-
r`*a_=TXkCo=i}C|0{{R3000000000000000;O=|@^bNPb04M+e$=j0|
|
189
|
-
|
190
|
-
diff --git a/lib/vagrant-skytap/action.rb b/lib/vagrant-skytap/action.rb
|
191
|
-
--- a/lib/vagrant-skytap/action.rb
|
192
|
-
+++ b/lib/vagrant-skytap/action.rb
|
193
|
-
@@ -127,6 +127,7 @@
|
194
|
-
# key.
|
195
|
-
def self.action_read_state
|
196
|
-
Vagrant::Action::Builder.new.tap do |b|
|
197
|
-
+ b.use HandleBox
|
198
|
-
b.use ConfigValidate
|
199
|
-
b.use InitializeAPIClient
|
200
|
-
b.use FetchEnvironment
|
201
|
-
diff --git a/newvf1 b/newvf1
|
202
|
-
new file mode 100644
|
203
|
-
--- /dev/null
|
204
|
-
+++ b/newvf1
|
205
|
-
@@ -0,0 +1,50 @@
|
206
|
-
+# This sample Vagrantfile creates a Skytap environment
|
207
|
-
+# with two VMs from a VM in the public template library.
|
208
|
-
+# Any combination of template VMs may be used as long as
|
209
|
-
+# all are in the same region.
|
210
|
-
+
|
211
|
-
+Vagrant.configure(2) do |config|
|
212
|
-
+ config.vm.box = "skytap/empty"
|
213
|
-
+
|
214
|
-
+ config.vm.provider :skytap do |skytap|
|
215
|
-
+ # Replace these values with your Skytap username and API token
|
216
|
-
+ skytap.username = "<username>"
|
217
|
-
+ skytap.api_token = "<api_token>"
|
218
|
-
+ end
|
219
|
-
+
|
220
|
-
+ # This section defines a web server using an Ubuntu VM from
|
221
|
-
+ # public template library (specified by vm_url), with its
|
222
|
-
+ # hardware settings upgraded to a quad-core CPU and 2GB of RAM.
|
223
|
-
+ # Only the vm_url property is required.
|
224
|
-
+ config.vm.define "web" do |webserver|
|
225
|
-
+ webserver.vm.provider :skytap do |box|
|
226
|
-
+ box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
227
|
-
+ box.cpus = 4
|
228
|
-
+ box.cpuspersocket = 4
|
229
|
-
+ box.ram = 2048
|
230
|
-
+ end
|
231
|
-
+ # Uncomment the following line to mount a directory on your
|
232
|
-
+ # local machine (replace path1 with an existing directory) as
|
233
|
-
+ # an NFS share named "/synced" on the VM.
|
234
|
-
+ # webserver.vm.synced_folder "<path1>", "/synced", type: :nfs
|
235
|
-
+ end
|
236
|
-
+
|
237
|
-
+ # This section defines a second VM with different hardware
|
238
|
-
+ # settings. Although it uses the same vm_url as above, VMs
|
239
|
-
+ # from other templates (or the same template) can be combined
|
240
|
-
+ # as long as they are all in the same region.
|
241
|
-
+ config.vm.define "db" do |db_server|
|
242
|
-
+ db_server.vm.provider :skytap do |box|
|
243
|
-
+ box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
244
|
-
+ box.cpus = 8
|
245
|
-
+ box.cpuspersocket = 4
|
246
|
-
+ box.ram = 8192
|
247
|
-
+ end
|
248
|
-
+ # Uncomment the following line to mount a directory on your
|
249
|
-
+ # local machine (replace path2 with an existing directory) as
|
250
|
-
+ # an NFS share named "/synced" on the VM.
|
251
|
-
+ # db_server.vm.synced_folder "<path1>", "/synced", type: :nfs
|
252
|
-
+ end
|
253
|
-
+end
|
254
|
-
+
|
255
|
-
+
|
256
|
-
diff --git a/newvf2 b/newvf2
|
257
|
-
new file mode 100644
|
258
|
-
--- /dev/null
|
259
|
-
+++ b/newvf2
|
260
|
-
@@ -0,0 +1,28 @@
|
261
|
-
+https://docs.vagrantup.com/v2/multi-machine/
|
262
|
-
+# This sample Vagrantfile creates a Skytap
|
263
|
-
+# environment with two VMs. Each VM may be
|
264
|
-
+# created using a different vm_url.
|
265
|
-
+
|
266
|
-
+Vagrant.configure(2) do |config|
|
267
|
-
+ config.vm.box = "skytap/empty"
|
268
|
-
+
|
269
|
-
+ config.vm.provider :skytap do |skytap|
|
270
|
-
+ skytap.username = "<username>"
|
271
|
-
+ skytap.api_token = "<api_token>"
|
272
|
-
+ end
|
273
|
-
+
|
274
|
-
+ config.vm.define "web" do |web|
|
275
|
-
+ web.vm.provider :skytap do |box|
|
276
|
-
+ box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
277
|
-
+ box.ram = 4096
|
278
|
-
+ end
|
279
|
-
+ # web.vm.synced_folder "<path1>", "/synced", type: :nfs
|
280
|
-
+ end
|
281
|
-
+
|
282
|
-
+ config.vm.define "mysql" do |mysql|
|
283
|
-
+ mysql.vm.provider :skytap do |box|
|
284
|
-
+ box.vm_url = "https://cloud.skytap.com/vms/3157858"
|
285
|
-
+ box.ram = 8192
|
286
|
-
+ end
|
287
|
-
+ end
|
288
|
-
+end
|
@@ -1,198 +0,0 @@
|
|
1
|
-
# HG changeset patch
|
2
|
-
# Parent a6021cf61035f4ba44b4af13c9b2a1c17c1ea278
|
3
|
-
diff -r a6021cf61035 -r bfcc25828768 lib/vagrant-skytap/command/start_mixins.rb
|
4
|
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
5
|
-
+++ b/lib/vagrant-skytap/command/start_mixins.rb Fri Oct 23 19:10:56 2015 -0700
|
6
|
-
@@ -0,0 +1,52 @@
|
7
|
-
+# How do you access the source of another plugin?
|
8
|
-
+# It's possible that they deliberately prevent this
|
9
|
-
+#require 'plugins/commands/up/start_mixins'
|
10
|
-
+module VagrantPlugins
|
11
|
-
+ module Skytap
|
12
|
-
+ module Command
|
13
|
-
+ module StartMixins
|
14
|
-
+
|
15
|
-
+ # Would be nice to just extend this, then alias #build_start_options
|
16
|
-
+ # and add default options flag.
|
17
|
-
+ #include VagrantPlugins::CommandUp::StartMixins
|
18
|
-
+
|
19
|
-
+ # This adds the standard `start` command line flags to the given
|
20
|
-
+ # OptionParser, storing the result in the `options` dictionary.
|
21
|
-
+ #
|
22
|
-
+ # @param [OptionParser] parser
|
23
|
-
+ # @param [Hash] options
|
24
|
-
+ def build_start_options(parser, options)
|
25
|
-
+ # Setup the defaults
|
26
|
-
+ options[:provision_types] = nil
|
27
|
-
+
|
28
|
-
+ # Add the options
|
29
|
-
+ parser.on("--[no-]provision", "Enable or disable provisioning") do |p|
|
30
|
-
+ options[:provision_enabled] = p
|
31
|
-
+ options[:provision_ignore_sentinel] = true
|
32
|
-
+ end
|
33
|
-
+
|
34
|
-
+ parser.on("--provision-with x,y,z", Array,
|
35
|
-
+ "Enable only certain provisioners, by type.") do |list|
|
36
|
-
+ options[:provision_types] = list.map { |type| type.to_sym }
|
37
|
-
+ options[:provision_enabled] = true
|
38
|
-
+ options[:provision_ignore_sentinel] = true
|
39
|
-
+ end
|
40
|
-
+
|
41
|
-
+ options[:parallel] = false ### the only substantive change
|
42
|
-
+ end
|
43
|
-
+
|
44
|
-
+ # This validates the provisioner flags and raises an exception
|
45
|
-
+ # if there are invalid ones.
|
46
|
-
+ def validate_provisioner_flags!(options)
|
47
|
-
+ (options[:provision_types] || []).each do |type|
|
48
|
-
+ klass = Vagrant.plugin("2").manager.provisioners[type]
|
49
|
-
+ if !klass
|
50
|
-
+ raise Vagrant::Errors::ProvisionerFlagInvalid,
|
51
|
-
+ name: type.to_s
|
52
|
-
+ end
|
53
|
-
+ end
|
54
|
-
+ end
|
55
|
-
+ end
|
56
|
-
+ end
|
57
|
-
+ end
|
58
|
-
+end
|
59
|
-
diff -r a6021cf61035 -r bfcc25828768 lib/vagrant-skytap/command/up.rb
|
60
|
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
61
|
-
+++ b/lib/vagrant-skytap/command/up.rb Fri Oct 23 19:10:56 2015 -0700
|
62
|
-
@@ -0,0 +1,110 @@
|
63
|
-
+require 'optparse'
|
64
|
-
+require_relative 'start_mixins'
|
65
|
-
+
|
66
|
-
+module VagrantPlugins
|
67
|
-
+ module Skytap
|
68
|
-
+ module Command
|
69
|
-
+ class Up < Vagrant.plugin("2", :command)
|
70
|
-
+ include StartMixins
|
71
|
-
+
|
72
|
-
+ def self.synopsis
|
73
|
-
+ "hi mom starts and provisions the vagrant environment"
|
74
|
-
+ end
|
75
|
-
+
|
76
|
-
+ def execute
|
77
|
-
+ options = {}
|
78
|
-
+ options[:destroy_on_error] = true
|
79
|
-
+ options[:parallel] = true
|
80
|
-
+ options[:provision_ignore_sentinel] = false
|
81
|
-
+
|
82
|
-
+ opts = OptionParser.new do |o|
|
83
|
-
+ o.banner = "Usage: vagrant up [options] [name]"
|
84
|
-
+ o.separator ""
|
85
|
-
+ o.separator "Options:"
|
86
|
-
+ o.separator ""
|
87
|
-
+
|
88
|
-
+ build_start_options(o, options)
|
89
|
-
+
|
90
|
-
+ o.on("--[no-]destroy-on-error",
|
91
|
-
+ "Destroy machine if any fatal error happens (default to true)") do |destroy|
|
92
|
-
+ options[:destroy_on_error] = destroy
|
93
|
-
+ end
|
94
|
-
+
|
95
|
-
+ o.on("--[no-]parallel",
|
96
|
-
+ "Enable or disable parallelism if provider supports it") do |parallel|
|
97
|
-
+ options[:parallel] = parallel
|
98
|
-
+ end
|
99
|
-
+
|
100
|
-
+ o.on("--provider PROVIDER", String,
|
101
|
-
+ "Back the machine with a specific provider") do |provider|
|
102
|
-
+ options[:provider] = provider
|
103
|
-
+ end
|
104
|
-
+ end
|
105
|
-
+
|
106
|
-
+ # Parse the options
|
107
|
-
+ argv = parse_options(opts)
|
108
|
-
+ return if !argv
|
109
|
-
+
|
110
|
-
+ # Validate the provisioners
|
111
|
-
+ validate_provisioner_flags!(options)
|
112
|
-
+
|
113
|
-
+ # Go over each VM and bring it up
|
114
|
-
+ @logger.debug("'Up' each target VM...")
|
115
|
-
+
|
116
|
-
+ # Build up the batch job of what we'll do
|
117
|
-
+ machines = []
|
118
|
-
+ @env.batch(options[:parallel]) do |batch|
|
119
|
-
+ names = argv
|
120
|
-
+ if names.empty?
|
121
|
-
+ autostart = false
|
122
|
-
+ @env.vagrantfile.machine_names_and_options.each do |n, o|
|
123
|
-
+ autostart = true if o.key?(:autostart)
|
124
|
-
+ o[:autostart] = true if !o.key?(:autostart)
|
125
|
-
+ names << n.to_s if o[:autostart]
|
126
|
-
+ end
|
127
|
-
+
|
128
|
-
+ # If we have an autostart key but no names, it means that
|
129
|
-
+ # all machines are autostart: false and we don't start anything.
|
130
|
-
+ names = nil if autostart && names.empty?
|
131
|
-
+ end
|
132
|
-
+
|
133
|
-
+ if names
|
134
|
-
+ with_target_vms(names, provider: options[:provider]) do |machine|
|
135
|
-
+ @env.ui.info(I18n.t(
|
136
|
-
+ "vagrant.commands.up.upping",
|
137
|
-
+ name: machine.name,
|
138
|
-
+ provider: machine.provider_name))
|
139
|
-
+
|
140
|
-
+ machines << machine
|
141
|
-
+
|
142
|
-
+ batch.action(machine, :up, options)
|
143
|
-
+ end
|
144
|
-
+ end
|
145
|
-
+ end
|
146
|
-
+
|
147
|
-
+ if machines.empty?
|
148
|
-
+ @env.ui.info(I18n.t("vagrant.up_no_machines"))
|
149
|
-
+ return 0
|
150
|
-
+ end
|
151
|
-
+
|
152
|
-
+ # Output the post-up messages that we have, if any
|
153
|
-
+ machines.each do |m|
|
154
|
-
+ next if !m.config.vm.post_up_message
|
155
|
-
+ next if m.config.vm.post_up_message == ""
|
156
|
-
+
|
157
|
-
+ # Add a newline to separate things.
|
158
|
-
+ @env.ui.info("", prefix: false)
|
159
|
-
+
|
160
|
-
+ m.ui.success(I18n.t(
|
161
|
-
+ "vagrant.post_up_message",
|
162
|
-
+ name: m.name.to_s,
|
163
|
-
+ message: m.config.vm.post_up_message))
|
164
|
-
+ end
|
165
|
-
+
|
166
|
-
+ # Success, exit status 0
|
167
|
-
+ 0
|
168
|
-
+ end
|
169
|
-
+ end
|
170
|
-
+ end
|
171
|
-
+ end
|
172
|
-
+end
|
173
|
-
diff -r a6021cf61035 -r bfcc25828768 lib/vagrant-skytap/plugin.rb
|
174
|
-
--- a/lib/vagrant-skytap/plugin.rb Fri Oct 23 19:10:47 2015 -0700
|
175
|
-
+++ b/lib/vagrant-skytap/plugin.rb Fri Oct 23 19:10:56 2015 -0700
|
176
|
-
@@ -24,7 +24,7 @@
|
177
|
-
Config
|
178
|
-
end
|
179
|
-
|
180
|
-
- provider(:skytap, parallel: true) do
|
181
|
-
+ provider(:skytap, parallel: false) do
|
182
|
-
# Setup logging and i18n
|
183
|
-
setup_logging
|
184
|
-
setup_i18n
|
185
|
-
@@ -34,6 +34,13 @@
|
186
|
-
Provider
|
187
|
-
end
|
188
|
-
|
189
|
-
+ # only used for this provider, right? when you call vagrant up,
|
190
|
-
+ # the Vagrantfile tells it that skytap is the only allowable provider
|
191
|
-
+ command("up", primary: true) do
|
192
|
-
+ require_relative "command/up"
|
193
|
-
+ Command::Up
|
194
|
-
+ end
|
195
|
-
+
|
196
|
-
# This initializes the internationalization strings.
|
197
|
-
def self.setup_i18n
|
198
|
-
I18n.load_path << File.expand_path("locales/en.yml", Skytap.source_root)
|