vagrant-openstack-cloud-provider 1.1.6 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/vagrant-openstack-cloud-provider/action/create_server.rb +12 -4
- data/lib/vagrant-openstack-cloud-provider/config.rb +12 -0
- data/lib/vagrant-openstack-cloud-provider/version.rb +1 -1
- data/locales/en.yml +3 -1
- data/spec/vagrant-openstack-cloud-provider/config_spec.rb +5 -1
- data/vagrant-openstack-cloud-provider.gemspec +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
YWY1YmQ1OWEyMjE4Yzg1OTZiZDI0ZjQ3NWQxNzc0NGEzY2U4M2M2ZQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2b182a701fd3c8e02f164f19c6726ac2b541b4ca
|
4
|
+
data.tar.gz: bb49494f4566256877a45da8ee63a86c9cfc9608
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NGQ5MWQ2ZTkyYTc1MTZjYWY1ODgzMjBiMzJmOWJkNGExYTg3YWFkNGU1YWM1
|
11
|
-
Y2E3YTliOTk4ZjM1OWZlMmQxMTMyMmU1ZDVjY2M0ZDAzODU5ZjQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZGU4ZWU1ODU4YjY5N2NmODlhYmFmNzYzY2NjYWFhMGEyODc1OGRjNmE4MjMz
|
14
|
-
YzM3ZDZkYjZmZDdiODkyMzU1YzJmNTViOTMwOGIyZDliOTFmNzgyNzA0YWJm
|
15
|
-
NjEwZjIyMzA0YmExNmU5YTdmZTU3ODI0NWYzMzVlMzc0YTk2MTQ=
|
6
|
+
metadata.gz: 6df57c41d76339adbbfbaca7e803005fe5b59b3ffaf9eb761cfa33b75d7f9990f4fd8d4938a8f6dafe3cc177577a3de29af3d23416cd22ad78590657b95888e5
|
7
|
+
data.tar.gz: 5b88e61657a1134664e58359d24739b1305323f51824a2c2107fc78c1cae6641a62923db85e60e39859bb776a81067e309bf4ee10e0650dab56b9561049ae21f
|
@@ -100,6 +100,7 @@ module VagrantPlugins
|
|
100
100
|
end
|
101
101
|
|
102
102
|
# Create the server
|
103
|
+
launch_start_time = Time.now
|
103
104
|
server = env[:openstack_compute].servers.create(options)
|
104
105
|
|
105
106
|
# Store the ID right away so we can track it
|
@@ -114,9 +115,12 @@ module VagrantPlugins
|
|
114
115
|
|
115
116
|
# Wait for the server to be ready
|
116
117
|
begin
|
117
|
-
(1..
|
118
|
-
|
119
|
-
|
118
|
+
(1..config.instance_build_timeout).each do |n|
|
119
|
+
if config.report_progress
|
120
|
+
env[:ui].clear_line
|
121
|
+
env[:ui].report_progress(n, false)
|
122
|
+
end
|
123
|
+
|
120
124
|
server = env[:openstack_compute].servers.get(env[:machine].id)
|
121
125
|
break if self.server_to_be_available?(server)
|
122
126
|
sleep 1
|
@@ -128,6 +132,9 @@ module VagrantPlugins
|
|
128
132
|
end
|
129
133
|
end
|
130
134
|
|
135
|
+
env[:ui].info(I18n.t("vagrant_openstack.active",
|
136
|
+
:elapsed => (Time.now - launch_start_time).floor))
|
137
|
+
|
131
138
|
env[:machine].data_dir.join("cached_metadata").open("w+") do |f|
|
132
139
|
f.write(server.to_json)
|
133
140
|
end
|
@@ -136,7 +143,8 @@ module VagrantPlugins
|
|
136
143
|
# Clear the line one more time so the progress is removed
|
137
144
|
env[:ui].clear_line
|
138
145
|
ssh_is_responding?(env)
|
139
|
-
env[:ui].info(I18n.t("vagrant_openstack.ready"
|
146
|
+
env[:ui].info(I18n.t("vagrant_openstack.ready",
|
147
|
+
:elapsed => (Time.now - launch_start_time).floor))
|
140
148
|
end
|
141
149
|
|
142
150
|
@app.call(env)
|
@@ -70,6 +70,14 @@ module VagrantPlugins
|
|
70
70
|
# @return [Hash]
|
71
71
|
attr_accessor :scheduler_hints
|
72
72
|
|
73
|
+
# @return [String]
|
74
|
+
attr_accessor :instance_build_timeout
|
75
|
+
|
76
|
+
# @return [Bool]
|
77
|
+
attr_accessor :report_progress
|
78
|
+
# alias_method :report_progress?, :report_progress
|
79
|
+
|
80
|
+
|
73
81
|
def initialize
|
74
82
|
@api_key = UNSET_VALUE
|
75
83
|
@endpoint = UNSET_VALUE
|
@@ -86,6 +94,8 @@ module VagrantPlugins
|
|
86
94
|
@networks = UNSET_VALUE
|
87
95
|
@tenant = UNSET_VALUE
|
88
96
|
@scheduler_hints = UNSET_VALUE
|
97
|
+
@instance_build_timeout = UNSET_VALUE
|
98
|
+
@report_progress = UNSET_VALUE
|
89
99
|
end
|
90
100
|
|
91
101
|
def finalize!
|
@@ -111,6 +121,8 @@ module VagrantPlugins
|
|
111
121
|
@networks = [@public_network_name] if @networks == UNSET_VALUE
|
112
122
|
@tenant = nil if @tenant == UNSET_VALUE
|
113
123
|
@scheduler_hints = {} if @scheduler_hints == UNSET_VALUE
|
124
|
+
@instance_build_timeout = 120 if @instance_build_timeout == UNSET_VALUE
|
125
|
+
@report_progress = true if @report_progress == UNSET_VALUE
|
114
126
|
end
|
115
127
|
|
116
128
|
def validate(machine)
|
data/locales/en.yml
CHANGED
@@ -14,8 +14,10 @@ en:
|
|
14
14
|
Launching a server with the following settings...
|
15
15
|
not_created: |-
|
16
16
|
The server hasn't been created yet. Run `vagrant up` first.
|
17
|
+
active: |-
|
18
|
+
The server was built in %{elapsed} seconds!
|
17
19
|
ready: |-
|
18
|
-
The server is ready!
|
20
|
+
The server is ready after %{elapsed} seconds!
|
19
21
|
rsync_folder: |-
|
20
22
|
Rsyncing folder: %{hostpath} => %{guestpath}
|
21
23
|
waiting_for_build: |-
|
@@ -26,6 +26,8 @@ describe VagrantPlugins::OpenStack::Config do
|
|
26
26
|
its(:networks) { should eq(["public"]) }
|
27
27
|
its(:tenant) { should be_nil }
|
28
28
|
its(:scheduler_hints) { should eq({}) }
|
29
|
+
its(:instance_build_timeout) { should eq(120) }
|
30
|
+
its(:report_progress) { should be_true }
|
29
31
|
end
|
30
32
|
|
31
33
|
describe "overriding defaults" do
|
@@ -42,7 +44,9 @@ describe VagrantPlugins::OpenStack::Config do
|
|
42
44
|
:public_network_name,
|
43
45
|
:networks,
|
44
46
|
:tenant,
|
45
|
-
:scheduler_hints
|
47
|
+
:scheduler_hints,
|
48
|
+
:instance_build_timeout,
|
49
|
+
:report_progress].each do |attribute|
|
46
50
|
it "should not default #{attribute} if overridden" do
|
47
51
|
subject.send("#{attribute}=", "foo")
|
48
52
|
subject.finalize!
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
|
16
16
|
gem.add_runtime_dependency "fog", "~> 1.22"
|
17
17
|
|
18
|
-
gem.add_development_dependency "rake"
|
18
|
+
gem.add_development_dependency "rake", '< 11.0'
|
19
19
|
gem.add_development_dependency "rspec", "~> 2.13.0"
|
20
20
|
|
21
21
|
gem.files = `git ls-files`.split($/)
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathieu Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.22'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.22'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '11.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "<"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '11.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.13.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.13.0
|
55
55
|
description: Vagrant provider for OpenStack clouds.
|
@@ -59,8 +59,8 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
63
|
-
- .travis.yml
|
62
|
+
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
64
64
|
- AUTHORS
|
65
65
|
- Gemfile
|
66
66
|
- LICENSE.txt
|
@@ -103,12 +103,12 @@ require_paths:
|
|
103
103
|
- lib
|
104
104
|
required_ruby_version: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- -
|
106
|
+
- - ">="
|
107
107
|
- !ruby/object:Gem::Version
|
108
108
|
version: '0'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- -
|
111
|
+
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|