vagrant-openstack-cloud-provider 1.1.10 → 1.1.11
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 +4 -4
- data/lib/vagrant-openstack-cloud-provider/action/create_server.rb +6 -3
- data/lib/vagrant-openstack-cloud-provider/errors.rb +4 -0
- data/lib/vagrant-openstack-cloud-provider/version.rb +1 -1
- data/locales/en.yml +3 -2
- data/spec/vagrant-openstack-cloud-provider/action/create_server_spec.rb +20 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90a622141c798650755c827e3c69b274281ca800
|
4
|
+
data.tar.gz: 7199317a5e4268d3ccfc9eff91126f84edf3dd48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3b8ab12b361550eec73e978b4177572ed6f0fa913ee13ea5dea7e0cfb335cc4a6d099342b77536af29635acee728547c948c48582f75edbda6fa3f9b20f74ae
|
7
|
+
data.tar.gz: 4379ae1060288ba27cee8e29fc412f59b7f60e24667196df3c88b7f97dd4d82412ad87aa4adb00ed41045919f75c09a94afba06adcbd50e8aabf462f3e45bb50
|
@@ -156,9 +156,12 @@ module VagrantPlugins
|
|
156
156
|
end
|
157
157
|
sleep sleep_interval
|
158
158
|
end
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
unless env[:machine].communicate.ready?
|
160
|
+
raise Errors::SshWaitTimeout.new(
|
161
|
+
:seconds => sleep_interval * (timeout / sleep_interval))
|
162
|
+
end
|
163
|
+
rescue Exception => msg
|
164
|
+
raise Errors::SshUnavailable.new(:error => msg)
|
162
165
|
end
|
163
166
|
end
|
164
167
|
|
data/locales/en.yml
CHANGED
@@ -37,9 +37,10 @@ en:
|
|
37
37
|
state: '%{state}', instead of properly booting. Run `vagrant status`
|
38
38
|
to find out what can be done about this state, or `vagrant destroy`
|
39
39
|
if you want to start over.
|
40
|
+
ssh_wait_timeout: |-
|
41
|
+
The server is not ready for SSH communication after %{seconds} seconds.
|
40
42
|
ssh_unavailable: |-
|
41
|
-
The server
|
42
|
-
ssh connections.
|
43
|
+
The server's SSH failed to become available because: %{error}.
|
43
44
|
no_matching_flavor: |-
|
44
45
|
No matching flavor was found! Please check your flavor setting
|
45
46
|
to make sure you have a valid flavor chosen.
|
@@ -2,6 +2,9 @@ require 'spec_helper'
|
|
2
2
|
require 'vagrant-openstack-cloud-provider/errors'
|
3
3
|
require 'vagrant-openstack-cloud-provider/action/create_server'
|
4
4
|
|
5
|
+
I18n.load_path << File.expand_path("locales/en.yml", Pathname.new(File.expand_path("../../../../", __FILE__)))
|
6
|
+
I18n.reload!
|
7
|
+
|
5
8
|
RSpec.describe VagrantPlugins::OpenStack::Action::CreateServer do
|
6
9
|
describe '#server_to_be_available?' do
|
7
10
|
subject {
|
@@ -45,7 +48,23 @@ RSpec.describe VagrantPlugins::OpenStack::Action::CreateServer do
|
|
45
48
|
expect(machine).to receive(:communicate).at_least(:once).and_return(communicate)
|
46
49
|
|
47
50
|
env = { :ui => ui, :interrupted => false, :machine => machine }
|
48
|
-
expect { subject.send('ssh_is_responding?', env, timeout=0.005, sleep_interval=0.001) }.
|
51
|
+
expect { subject.send('ssh_is_responding?', env, timeout=0.005, sleep_interval=0.001) }.
|
52
|
+
to raise_error(VagrantPlugins::OpenStack::Errors::SshUnavailable).
|
53
|
+
with_message(I18n.t('vagrant_openstack.errors.ssh_unavailable',
|
54
|
+
:error => I18n.t('vagrant_openstack.errors.ssh_wait_timeout',
|
55
|
+
:seconds => 0.005)))
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'should show any error raised' do
|
59
|
+
expect(ui).to receive(:info).at_least(:once)
|
60
|
+
expect(communicate).to receive(:ready?).once.and_raise(Exception.new("waaaat"))
|
61
|
+
expect(machine).to receive(:communicate).at_least(:once).and_return(communicate)
|
62
|
+
|
63
|
+
env = { :ui => ui, :interrupted => false, :machine => machine }
|
64
|
+
expect { subject.send('ssh_is_responding?', env, timeout=0.005, sleep_interval=0.001) }.
|
65
|
+
to raise_error(VagrantPlugins::OpenStack::Errors::SshUnavailable).
|
66
|
+
with_message(I18n.t('vagrant_openstack.errors.ssh_unavailable',
|
67
|
+
:error => 'waaaat'))
|
49
68
|
end
|
50
69
|
end
|
51
70
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-openstack-cloud-provider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathieu Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|