vagrant-openstack-provider 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +12 -5
  3. data/CHANGELOG.md +18 -0
  4. data/Gemfile +3 -2
  5. data/{LICENSE.txt → LICENSE} +2 -1
  6. data/lib/vagrant-openstack-provider/action.rb +3 -2
  7. data/lib/vagrant-openstack-provider/action/provision.rb +60 -0
  8. data/lib/vagrant-openstack-provider/action/read_ssh_info.rb +4 -0
  9. data/lib/vagrant-openstack-provider/client/domain.rb +2 -2
  10. data/lib/vagrant-openstack-provider/client/keystone.rb +17 -6
  11. data/lib/vagrant-openstack-provider/client/nova.rb +14 -3
  12. data/lib/vagrant-openstack-provider/command/abstract_command.rb +1 -0
  13. data/lib/vagrant-openstack-provider/command/main.rb +1 -3
  14. data/lib/vagrant-openstack-provider/config.rb +3 -3
  15. data/lib/vagrant-openstack-provider/config_resolver.rb +46 -16
  16. data/lib/vagrant-openstack-provider/errors.rb +15 -0
  17. data/lib/vagrant-openstack-provider/plugin.rb +7 -1
  18. data/lib/vagrant-openstack-provider/version.rb +11 -1
  19. data/lib/vagrant-openstack-provider/version_checker.rb +76 -0
  20. data/locales/en.yml +21 -4
  21. data/spec/vagrant-openstack-provider/action/connect_openstack_spec.rb +17 -19
  22. data/spec/vagrant-openstack-provider/action/create_server_spec.rb +19 -18
  23. data/spec/vagrant-openstack-provider/action/create_stack_spec.rb +4 -6
  24. data/spec/vagrant-openstack-provider/action/delete_server_spec.rb +4 -6
  25. data/spec/vagrant-openstack-provider/action/delete_stack_spec.rb +1 -2
  26. data/spec/vagrant-openstack-provider/action/message_spec.rb +1 -2
  27. data/spec/vagrant-openstack-provider/action/provision_spec.rb +104 -0
  28. data/spec/vagrant-openstack-provider/action/read_ssh_info_spec.rb +1 -3
  29. data/spec/vagrant-openstack-provider/action/read_state_spec.rb +1 -2
  30. data/spec/vagrant-openstack-provider/action/resume_server_spec.rb +1 -2
  31. data/spec/vagrant-openstack-provider/action/start_server_spec.rb +1 -2
  32. data/spec/vagrant-openstack-provider/action/stop_server_spec.rb +1 -2
  33. data/spec/vagrant-openstack-provider/action/suspend_server_spec.rb +1 -2
  34. data/spec/vagrant-openstack-provider/action/sync_folders_spec.rb +1 -2
  35. data/spec/vagrant-openstack-provider/action/wait_accessible_spec.rb +1 -2
  36. data/spec/vagrant-openstack-provider/action/wait_active_spec.rb +3 -4
  37. data/spec/vagrant-openstack-provider/action/wait_stop_spec.rb +3 -4
  38. data/spec/vagrant-openstack-provider/action_spec.rb +0 -1
  39. data/spec/vagrant-openstack-provider/client/cinder_spec.rb +5 -8
  40. data/spec/vagrant-openstack-provider/client/glance_spec.rb +69 -70
  41. data/spec/vagrant-openstack-provider/client/heat_spec.rb +24 -28
  42. data/spec/vagrant-openstack-provider/client/keystone_spec.rb +34 -16
  43. data/spec/vagrant-openstack-provider/client/neutron_spec.rb +76 -80
  44. data/spec/vagrant-openstack-provider/client/nova_spec.rb +198 -168
  45. data/spec/vagrant-openstack-provider/client/utils_spec.rb +1 -3
  46. data/spec/vagrant-openstack-provider/command/flavor_list_spec.rb +1 -2
  47. data/spec/vagrant-openstack-provider/command/floatingip_list_spec.rb +1 -2
  48. data/spec/vagrant-openstack-provider/command/image_list_spec.rb +1 -6
  49. data/spec/vagrant-openstack-provider/command/network_list_spec.rb +1 -3
  50. data/spec/vagrant-openstack-provider/command/reset_spec.rb +1 -2
  51. data/spec/vagrant-openstack-provider/command/subnet_list_spec.rb +1 -2
  52. data/spec/vagrant-openstack-provider/command/volume_list_spec.rb +1 -2
  53. data/spec/vagrant-openstack-provider/config_resolver_spec.rb +100 -6
  54. data/spec/vagrant-openstack-provider/config_spec.rb +2 -6
  55. data/spec/vagrant-openstack-provider/e2e_spec.rb.save +27 -0
  56. data/spec/vagrant-openstack-provider/spec_helper.rb +1 -0
  57. data/spec/vagrant-openstack-provider/utils_spec.rb +1 -2
  58. data/spec/vagrant-openstack-provider/version_checker_spec.rb +39 -0
  59. data/vagrant-openstack-provider.gemspec +4 -2
  60. metadata +29 -9
  61. data/gemfiles/latest_stable.gemfile +0 -10
  62. data/gemfiles/minimal_release.gemfile +0 -10
  63. data/gemfiles/previous_release.gemfile +0 -10
@@ -0,0 +1,39 @@
1
+ require 'vagrant-openstack-provider/spec_helper'
2
+
3
+ describe VagrantPlugins::Openstack::VersionChecker do
4
+ let(:version) do
5
+ double('version')
6
+ end
7
+
8
+ before :each do
9
+ @checker = VersionChecker.instance
10
+ @checker.status = nil
11
+ Gem.should_receive(:latest_spec_for)
12
+ .with('vagrant-openstack-provider')
13
+ .and_return(OpenStruct.new.tap { |v| v.version = version })
14
+ end
15
+
16
+ describe 'check' do
17
+ it { assert_version_is :latest, '1.2.3', '1.2.3' }
18
+ it { assert_version_is :latest, '999.999.999', '999.999.999' }
19
+ it { assert_version_is :unstable, '9999.999.999', '9999.999.999' }
20
+ it { assert_version_is :unstable, '999.9999.999', '999.9999.999' }
21
+ it { assert_version_is :unstable, '999.999.9999', '999.999.9999' }
22
+ it { assert_version_is :unstable, '1.2', '1.2' }
23
+ it { assert_version_is :outdated, '1.2.3', '1.2.2' }
24
+ it { assert_version_is :outdated, '1.8.999', '1.8.998' }
25
+ it { assert_version_is :outdated, '1.9.0', '1.8.999' }
26
+ it { assert_version_is :outdated, '2.0.0', '1.999.999' }
27
+ end
28
+
29
+ private
30
+
31
+ def assert_version_is(expected_status, latest, current)
32
+ stub_const('VagrantPlugins::Openstack::VERSION', current)
33
+ version.stub(:version) { latest }
34
+ @checker.stub(:print)
35
+ expect(@checker).to receive(:print) unless expected_status == :latest
36
+ @checker.check
37
+ expect(@checker.status).to eq(expected_status)
38
+ end
39
+ end
@@ -7,9 +7,10 @@ Gem::Specification.new do |gem|
7
7
  gem.version = VagrantPlugins::Openstack::VERSION
8
8
  gem.authors = ['Guillaume Giamarchi', 'Julien Vey']
9
9
  gem.email = ['guillaume.giamarchi@gmail.com', 'vey.julien@gmail.com']
10
- gem.description = 'Enables Vagrant to manage machines in Openstack Cloud.'
11
- gem.summary = 'Enables Vagrant to manage machines in Openstack Cloud.'
10
+ gem.description = 'Enables Vagrant to manage machines in OpenStack Cloud.'
11
+ gem.summary = 'Enables Vagrant to manage machines in OpenStack Cloud.'
12
12
  gem.homepage = 'https://github.com/ggiamarchi/vagrant-openstack-provider'
13
+ gem.license = 'MIT'
13
14
 
14
15
  gem.add_dependency 'json', '1.7.7'
15
16
  gem.add_dependency 'rest-client', '~> 1.6.0'
@@ -20,6 +21,7 @@ Gem::Specification.new do |gem|
20
21
  gem.add_development_dependency 'rake'
21
22
  gem.add_development_dependency 'rspec', '~> 3.1.0'
22
23
  gem.add_development_dependency 'rspec-its', '~> 1.0.1'
24
+ gem.add_development_dependency 'rspec-expectations', '~> 3.1.2'
23
25
  gem.add_development_dependency 'webmock', '~> 1.18.0'
24
26
  gem.add_development_dependency 'fakefs', '~> 0.5.2'
25
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-openstack-provider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Giamarchi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-30 00:00:00.000000000 Z
12
+ date: 2015-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ~>
124
124
  - !ruby/object:Gem::Version
125
125
  version: 1.0.1
126
+ - !ruby/object:Gem::Dependency
127
+ name: rspec-expectations
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 3.1.2
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ~>
138
+ - !ruby/object:Gem::Version
139
+ version: 3.1.2
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: webmock
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +165,7 @@ dependencies:
151
165
  - - ~>
152
166
  - !ruby/object:Gem::Version
153
167
  version: 0.5.2
154
- description: Enables Vagrant to manage machines in Openstack Cloud.
168
+ description: Enables Vagrant to manage machines in OpenStack Cloud.
155
169
  email:
156
170
  - guillaume.giamarchi@gmail.com
157
171
  - vey.julien@gmail.com
@@ -163,7 +177,7 @@ files:
163
177
  - .rubocop.yml
164
178
  - CHANGELOG.md
165
179
  - Gemfile
166
- - LICENSE.txt
180
+ - LICENSE
167
181
  - RELEASE.md
168
182
  - Rakefile
169
183
  - Vagrantfile
@@ -174,9 +188,6 @@ files:
174
188
  - functional_tests/keys/vagrant-openstack
175
189
  - functional_tests/keys/vagrant-openstack.pub
176
190
  - functional_tests/run_tests.sh
177
- - gemfiles/latest_stable.gemfile
178
- - gemfiles/minimal_release.gemfile
179
- - gemfiles/previous_release.gemfile
180
191
  - lib/vagrant-openstack-provider.rb
181
192
  - lib/vagrant-openstack-provider/action.rb
182
193
  - lib/vagrant-openstack-provider/action/abstract_action.rb
@@ -186,6 +197,7 @@ files:
186
197
  - lib/vagrant-openstack-provider/action/delete_server.rb
187
198
  - lib/vagrant-openstack-provider/action/delete_stack.rb
188
199
  - lib/vagrant-openstack-provider/action/message.rb
200
+ - lib/vagrant-openstack-provider/action/provision.rb
189
201
  - lib/vagrant-openstack-provider/action/read_ssh_info.rb
190
202
  - lib/vagrant-openstack-provider/action/read_state.rb
191
203
  - lib/vagrant-openstack-provider/action/resume.rb
@@ -228,6 +240,7 @@ files:
228
240
  - lib/vagrant-openstack-provider/provider.rb
229
241
  - lib/vagrant-openstack-provider/utils.rb
230
242
  - lib/vagrant-openstack-provider/version.rb
243
+ - lib/vagrant-openstack-provider/version_checker.rb
231
244
  - locales/en.yml
232
245
  - spec/vagrant-openstack-provider/action/connect_openstack_spec.rb
233
246
  - spec/vagrant-openstack-provider/action/create_server_spec.rb
@@ -235,6 +248,7 @@ files:
235
248
  - spec/vagrant-openstack-provider/action/delete_server_spec.rb
236
249
  - spec/vagrant-openstack-provider/action/delete_stack_spec.rb
237
250
  - spec/vagrant-openstack-provider/action/message_spec.rb
251
+ - spec/vagrant-openstack-provider/action/provision_spec.rb
238
252
  - spec/vagrant-openstack-provider/action/read_ssh_info_spec.rb
239
253
  - spec/vagrant-openstack-provider/action/read_state_spec.rb
240
254
  - spec/vagrant-openstack-provider/action/resume_server_spec.rb
@@ -262,13 +276,16 @@ files:
262
276
  - spec/vagrant-openstack-provider/command/volume_list_spec.rb
263
277
  - spec/vagrant-openstack-provider/config_resolver_spec.rb
264
278
  - spec/vagrant-openstack-provider/config_spec.rb
279
+ - spec/vagrant-openstack-provider/e2e_spec.rb.save
265
280
  - spec/vagrant-openstack-provider/provider_spec.rb
266
281
  - spec/vagrant-openstack-provider/spec_helper.rb
267
282
  - spec/vagrant-openstack-provider/utils_spec.rb
283
+ - spec/vagrant-openstack-provider/version_checker_spec.rb
268
284
  - stackrc
269
285
  - vagrant-openstack-provider.gemspec
270
286
  homepage: https://github.com/ggiamarchi/vagrant-openstack-provider
271
- licenses: []
287
+ licenses:
288
+ - MIT
272
289
  metadata: {}
273
290
  post_install_message:
274
291
  rdoc_options: []
@@ -289,7 +306,7 @@ rubyforge_project:
289
306
  rubygems_version: 2.0.14
290
307
  signing_key:
291
308
  specification_version: 4
292
- summary: Enables Vagrant to manage machines in Openstack Cloud.
309
+ summary: Enables Vagrant to manage machines in OpenStack Cloud.
293
310
  test_files:
294
311
  - spec/vagrant-openstack-provider/action/connect_openstack_spec.rb
295
312
  - spec/vagrant-openstack-provider/action/create_server_spec.rb
@@ -297,6 +314,7 @@ test_files:
297
314
  - spec/vagrant-openstack-provider/action/delete_server_spec.rb
298
315
  - spec/vagrant-openstack-provider/action/delete_stack_spec.rb
299
316
  - spec/vagrant-openstack-provider/action/message_spec.rb
317
+ - spec/vagrant-openstack-provider/action/provision_spec.rb
300
318
  - spec/vagrant-openstack-provider/action/read_ssh_info_spec.rb
301
319
  - spec/vagrant-openstack-provider/action/read_state_spec.rb
302
320
  - spec/vagrant-openstack-provider/action/resume_server_spec.rb
@@ -324,6 +342,8 @@ test_files:
324
342
  - spec/vagrant-openstack-provider/command/volume_list_spec.rb
325
343
  - spec/vagrant-openstack-provider/config_resolver_spec.rb
326
344
  - spec/vagrant-openstack-provider/config_spec.rb
345
+ - spec/vagrant-openstack-provider/e2e_spec.rb.save
327
346
  - spec/vagrant-openstack-provider/provider_spec.rb
328
347
  - spec/vagrant-openstack-provider/spec_helper.rb
329
348
  - spec/vagrant-openstack-provider/utils_spec.rb
349
+ - spec/vagrant-openstack-provider/version_checker_spec.rb
@@ -1,10 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => "../"
4
-
5
- group :development do
6
- gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.6.5'
7
- gem 'appraisal', '1.0.0'
8
- gem 'rubocop', '0.23.0', require: false
9
- gem 'coveralls', require: false
10
- end
@@ -1,10 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => "../"
4
-
5
- group :development do
6
- gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.4.0'
7
- gem 'appraisal', '1.0.0'
8
- gem 'rubocop', '0.23.0', require: false
9
- gem 'coveralls', require: false
10
- end
@@ -1,10 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => "../"
4
-
5
- group :development do
6
- gem 'vagrant', git: 'git://github.com/mitchellh/vagrant.git', tag: 'v1.5.4'
7
- gem 'appraisal', '1.0.0'
8
- gem 'rubocop', '0.23.0', require: false
9
- gem 'coveralls', require: false
10
- end