vagrant-skytap 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.byebug_history +8 -8
- data/CHANGELOG.md +5 -0
- data/lib/vagrant-skytap/action/run_environment.rb +9 -10
- data/lib/vagrant-skytap/command/up.rb +1 -2
- data/lib/vagrant-skytap/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42367c7e3c19aaeea00c74ed4756d8c54d92612f
|
4
|
+
data.tar.gz: c5b4962d7052fad5e4a7e4c90bad7799c64b92ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ac68aee81962e0729980aa6b5785413ca24780a2a149447f34ca3aec45a4cd4629c415035ff11c3acb838c69a85e5c115c47df2ea7ac24ded5655d0de8ed70c
|
7
|
+
data.tar.gz: a0fa8b2edc3ac422141d5af6d07990e18824c76443c649b2272ff0dab506124679b7fa401531e6ee215e38b5d14250a347b19d28c2c538e98ed3150190763799
|
data/.byebug_history
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
c
|
2
|
+
q
|
3
|
+
action_result[:api_client].url
|
4
|
+
action_result[:api_client].base_url
|
5
|
+
action_result[:api_client]
|
6
|
+
action_result.keys
|
7
|
+
action_result.class
|
8
|
+
action_result
|
9
|
+
c
|
2
10
|
$!
|
3
11
|
c
|
4
12
|
@env[:initial_states]
|
@@ -246,11 +254,3 @@ b 96
|
|
246
254
|
b
|
247
255
|
names
|
248
256
|
finish
|
249
|
-
$!
|
250
|
-
n
|
251
|
-
c
|
252
|
-
n
|
253
|
-
folders.count
|
254
|
-
c
|
255
|
-
folders.first
|
256
|
-
folders.count
|
data/CHANGELOG.md
CHANGED
@@ -3,12 +3,9 @@ require "log4r"
|
|
3
3
|
module VagrantPlugins
|
4
4
|
module Skytap
|
5
5
|
module Action
|
6
|
-
# Runs multiple VMs in parallel.
|
7
|
-
#
|
8
|
-
# REST calls.
|
6
|
+
# Runs multiple VMs in parallel. Ensures that the REST call happens
|
7
|
+
# only once.
|
9
8
|
class RunEnvironment
|
10
|
-
include Vagrant::Util::Retryable
|
11
|
-
|
12
9
|
attr_reader :env
|
13
10
|
|
14
11
|
def initialize(app, env)
|
@@ -18,18 +15,20 @@ module VagrantPlugins
|
|
18
15
|
end
|
19
16
|
|
20
17
|
def call(env)
|
21
|
-
|
18
|
+
environment = env[:environment]
|
19
|
+
vm_ids = vm_ids_to_run
|
20
|
+
|
21
|
+
if environment.current_vm.id == vm_ids.first
|
22
22
|
env[:ui].info(I18n.t("vagrant_skytap.running_environment"))
|
23
|
-
vm_ids = env[:machines].try(:collect, &:id)
|
24
23
|
@logger.info("Running VMs: #{vm_ids}")
|
25
|
-
|
24
|
+
environment.run!(vm_ids)
|
26
25
|
end
|
27
26
|
|
28
27
|
@app.call(env)
|
29
28
|
end
|
30
29
|
|
31
|
-
def
|
32
|
-
env[:
|
30
|
+
def vm_ids_to_run
|
31
|
+
@env[:initial_states].reject{|id, state| state == :running}.keys
|
33
32
|
end
|
34
33
|
end
|
35
34
|
end
|
@@ -94,9 +94,8 @@ module VagrantPlugins
|
|
94
94
|
|
95
95
|
initial_states = machines.inject({}) {|acc, m| acc[m.id] = m.state.id ; acc }
|
96
96
|
|
97
|
-
machines.
|
97
|
+
machines.each do |machine|
|
98
98
|
machine.action(:run_vm, options.merge(
|
99
|
-
first_machine: i == 0,
|
100
99
|
machines: machines,
|
101
100
|
initial_states: initial_states
|
102
101
|
))
|