vagrant-1cloud 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ceafeab50a53fa0db78d9834f478d57354644dae
4
- data.tar.gz: 1488e75f1439884e4e52db5e2cfc2c2efcf11769
3
+ metadata.gz: fbe9a6410b93bce54b04da148de0a96bf2d993f2
4
+ data.tar.gz: 89b2eefb75811a6639c661232f3afb4cfe4e7f11
5
5
  SHA512:
6
- metadata.gz: b9415af1a29353908d6468f1a56409e2f47824d4df15ad2585bb063f5ea888be9cdac31669a9a2c7583bf3ecfa2ed881221a384a3faeeb7c57f3fa892a3b70b1
7
- data.tar.gz: cd2489a2bb6e22a206fb37885a2321bed7f61a473143b1f6fdb4e5478506e4e4b17f3a4a984d254eca2f4716ee85701648c5690eb0563a63a76ebede1ba99963
6
+ metadata.gz: 484b7a00ece48c773c46b2470d78b9545fc1fd4dfcfa8212bc18bc6792ec38043cec51b41f439cec066403730ab15d1afa94e7eb14042ca5c40d1ef6ae509047
7
+ data.tar.gz: 5c80ea3a06a3553269dc5dfaa887dc9f5f63e1bf6035aea4a03a0f9b8adc752d3b1e80666231ffd8ea8266622a50cd12916f692d49b16a62ffa259420ac9f0b9
@@ -5,6 +5,7 @@ module VagrantPlugins
5
5
  module Actions
6
6
  class PowerOn
7
7
  include Helpers::Client
8
+ include Vagrant::Util::Retryable
8
9
 
9
10
  def initialize(app, env)
10
11
  @app = app
@@ -26,6 +27,12 @@ module VagrantPlugins
26
27
  # refresh droplet state with provider
27
28
  Provider.droplet(@machine, :refresh => true)
28
29
 
30
+ # wait for ssh to be ready
31
+ retryable(:tries => 120, :sleep => 10) do
32
+ next if env[:interrupted]
33
+ raise 'not ready' if !@machine.communicate.ready?
34
+ end
35
+
29
36
  @app.call(env)
30
37
  end
31
38
  end
@@ -5,6 +5,7 @@ module VagrantPlugins
5
5
  module Actions
6
6
  class Reload
7
7
  include Helpers::Client
8
+ include Vagrant::Util::Retryable
8
9
 
9
10
  def initialize(app, env)
10
11
  @app = app
@@ -23,6 +24,12 @@ module VagrantPlugins
23
24
  env[:ui].info I18n.t('vagrant_1cloud.info.reloading')
24
25
  @client.wait_for_event(env, @machine.id, result['body']['ID'])
25
26
 
27
+ # wait for ssh to be ready
28
+ retryable(:tries => 120, :sleep => 10) do
29
+ next if env[:interrupted]
30
+ raise 'not ready' if !@machine.communicate.ready?
31
+ end
32
+
26
33
  @app.call(env)
27
34
  end
28
35
  end
@@ -95,7 +95,7 @@ module VagrantPlugins
95
95
  if state == :Active
96
96
  power = Provider.droplet(@machine)['IsPowerOn']
97
97
  if power == false
98
- state = 'off'
98
+ state = :off
99
99
  end
100
100
  end
101
101
  long = short = state.to_s
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module OneCloud
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-1cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bulat Yusupov