vagrant-openstack-provider-illuin 0.11.1

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.
Files changed (115) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.rubocop.yml +40 -0
  4. data/CHANGELOG.md +276 -0
  5. data/Gemfile +22 -0
  6. data/RELEASE.md +15 -0
  7. data/Rakefile +25 -0
  8. data/Vagrantfile +20 -0
  9. data/dummy.box +0 -0
  10. data/example_box/README.md +13 -0
  11. data/example_box/metadata.json +3 -0
  12. data/functional_tests/Vagrantfile +58 -0
  13. data/functional_tests/keys/vagrant-openstack +27 -0
  14. data/functional_tests/keys/vagrant-openstack.pub +1 -0
  15. data/functional_tests/run_tests.sh +142 -0
  16. data/lib/vagrant-openstack-provider.rb +29 -0
  17. data/lib/vagrant-openstack-provider/action.rb +344 -0
  18. data/lib/vagrant-openstack-provider/action/abstract_action.rb +22 -0
  19. data/lib/vagrant-openstack-provider/action/connect_openstack.rb +60 -0
  20. data/lib/vagrant-openstack-provider/action/create_server.rb +184 -0
  21. data/lib/vagrant-openstack-provider/action/create_stack.rb +76 -0
  22. data/lib/vagrant-openstack-provider/action/delete_server.rb +53 -0
  23. data/lib/vagrant-openstack-provider/action/delete_stack.rb +73 -0
  24. data/lib/vagrant-openstack-provider/action/message.rb +19 -0
  25. data/lib/vagrant-openstack-provider/action/provision.rb +60 -0
  26. data/lib/vagrant-openstack-provider/action/read_ssh_info.rb +74 -0
  27. data/lib/vagrant-openstack-provider/action/read_state.rb +43 -0
  28. data/lib/vagrant-openstack-provider/action/resume.rb +24 -0
  29. data/lib/vagrant-openstack-provider/action/snapshot_cleanup.rb +32 -0
  30. data/lib/vagrant-openstack-provider/action/snapshot_delete.rb +32 -0
  31. data/lib/vagrant-openstack-provider/action/snapshot_list.rb +22 -0
  32. data/lib/vagrant-openstack-provider/action/snapshot_restore.rb +29 -0
  33. data/lib/vagrant-openstack-provider/action/snapshot_save.rb +51 -0
  34. data/lib/vagrant-openstack-provider/action/start_server.rb +24 -0
  35. data/lib/vagrant-openstack-provider/action/stop_server.rb +25 -0
  36. data/lib/vagrant-openstack-provider/action/suspend.rb +24 -0
  37. data/lib/vagrant-openstack-provider/action/sync_folders.rb +138 -0
  38. data/lib/vagrant-openstack-provider/action/wait_active.rb +33 -0
  39. data/lib/vagrant-openstack-provider/action/wait_stop.rb +33 -0
  40. data/lib/vagrant-openstack-provider/cap/snapshot_list.rb +15 -0
  41. data/lib/vagrant-openstack-provider/catalog/openstack_catalog.rb +90 -0
  42. data/lib/vagrant-openstack-provider/client/cinder.rb +39 -0
  43. data/lib/vagrant-openstack-provider/client/domain.rb +163 -0
  44. data/lib/vagrant-openstack-provider/client/glance.rb +65 -0
  45. data/lib/vagrant-openstack-provider/client/heat.rb +49 -0
  46. data/lib/vagrant-openstack-provider/client/http_utils.rb +116 -0
  47. data/lib/vagrant-openstack-provider/client/keystone.rb +128 -0
  48. data/lib/vagrant-openstack-provider/client/neutron.rb +48 -0
  49. data/lib/vagrant-openstack-provider/client/nova.rb +303 -0
  50. data/lib/vagrant-openstack-provider/client/openstack.rb +59 -0
  51. data/lib/vagrant-openstack-provider/client/request_logger.rb +23 -0
  52. data/lib/vagrant-openstack-provider/client/rest_utils.rb +28 -0
  53. data/lib/vagrant-openstack-provider/command/abstract_command.rb +51 -0
  54. data/lib/vagrant-openstack-provider/command/flavor_list.rb +24 -0
  55. data/lib/vagrant-openstack-provider/command/floatingip_list.rb +32 -0
  56. data/lib/vagrant-openstack-provider/command/image_list.rb +29 -0
  57. data/lib/vagrant-openstack-provider/command/main.rb +52 -0
  58. data/lib/vagrant-openstack-provider/command/network_list.rb +25 -0
  59. data/lib/vagrant-openstack-provider/command/openstack_command.rb +16 -0
  60. data/lib/vagrant-openstack-provider/command/reset.rb +20 -0
  61. data/lib/vagrant-openstack-provider/command/subnet_list.rb +22 -0
  62. data/lib/vagrant-openstack-provider/command/utils.rb +22 -0
  63. data/lib/vagrant-openstack-provider/command/volume_list.rb +25 -0
  64. data/lib/vagrant-openstack-provider/config.rb +498 -0
  65. data/lib/vagrant-openstack-provider/config/http.rb +39 -0
  66. data/lib/vagrant-openstack-provider/config_resolver.rb +334 -0
  67. data/lib/vagrant-openstack-provider/errors.rb +187 -0
  68. data/lib/vagrant-openstack-provider/logging.rb +39 -0
  69. data/lib/vagrant-openstack-provider/plugin.rb +58 -0
  70. data/lib/vagrant-openstack-provider/provider.rb +50 -0
  71. data/lib/vagrant-openstack-provider/utils.rb +36 -0
  72. data/lib/vagrant-openstack-provider/version.rb +15 -0
  73. data/lib/vagrant-openstack-provider/version_checker.rb +76 -0
  74. data/locales/en.yml +412 -0
  75. data/spec/vagrant-openstack-provider/action/connect_openstack_spec.rb +770 -0
  76. data/spec/vagrant-openstack-provider/action/create_server_spec.rb +260 -0
  77. data/spec/vagrant-openstack-provider/action/create_stack_spec.rb +99 -0
  78. data/spec/vagrant-openstack-provider/action/delete_server_spec.rb +89 -0
  79. data/spec/vagrant-openstack-provider/action/delete_stack_spec.rb +63 -0
  80. data/spec/vagrant-openstack-provider/action/message_spec.rb +33 -0
  81. data/spec/vagrant-openstack-provider/action/provision_spec.rb +97 -0
  82. data/spec/vagrant-openstack-provider/action/read_ssh_info_spec.rb +201 -0
  83. data/spec/vagrant-openstack-provider/action/read_state_spec.rb +81 -0
  84. data/spec/vagrant-openstack-provider/action/resume_server_spec.rb +49 -0
  85. data/spec/vagrant-openstack-provider/action/start_server_spec.rb +49 -0
  86. data/spec/vagrant-openstack-provider/action/stop_server_spec.rb +49 -0
  87. data/spec/vagrant-openstack-provider/action/suspend_server_spec.rb +49 -0
  88. data/spec/vagrant-openstack-provider/action/sync_folders_spec.rb +155 -0
  89. data/spec/vagrant-openstack-provider/action/wait_active_spec.rb +53 -0
  90. data/spec/vagrant-openstack-provider/action/wait_stop_spec.rb +53 -0
  91. data/spec/vagrant-openstack-provider/action_spec.rb +120 -0
  92. data/spec/vagrant-openstack-provider/client/cinder_spec.rb +129 -0
  93. data/spec/vagrant-openstack-provider/client/glance_spec.rb +145 -0
  94. data/spec/vagrant-openstack-provider/client/heat_spec.rb +130 -0
  95. data/spec/vagrant-openstack-provider/client/keystone_spec.rb +226 -0
  96. data/spec/vagrant-openstack-provider/client/neutron_spec.rb +173 -0
  97. data/spec/vagrant-openstack-provider/client/nova_spec.rb +760 -0
  98. data/spec/vagrant-openstack-provider/client/utils_spec.rb +176 -0
  99. data/spec/vagrant-openstack-provider/command/flavor_list_spec.rb +43 -0
  100. data/spec/vagrant-openstack-provider/command/floatingip_list_spec.rb +74 -0
  101. data/spec/vagrant-openstack-provider/command/image_list_spec.rb +95 -0
  102. data/spec/vagrant-openstack-provider/command/network_list_spec.rb +65 -0
  103. data/spec/vagrant-openstack-provider/command/reset_spec.rb +24 -0
  104. data/spec/vagrant-openstack-provider/command/subnet_list_spec.rb +45 -0
  105. data/spec/vagrant-openstack-provider/command/volume_list_spec.rb +40 -0
  106. data/spec/vagrant-openstack-provider/config_resolver_spec.rb +879 -0
  107. data/spec/vagrant-openstack-provider/config_spec.rb +414 -0
  108. data/spec/vagrant-openstack-provider/e2e_spec.rb.save +27 -0
  109. data/spec/vagrant-openstack-provider/provider_spec.rb +13 -0
  110. data/spec/vagrant-openstack-provider/spec_helper.rb +37 -0
  111. data/spec/vagrant-openstack-provider/utils_spec.rb +128 -0
  112. data/spec/vagrant-openstack-provider/version_checker_spec.rb +39 -0
  113. data/stackrc +25 -0
  114. data/vagrant-openstack-provider-illuin.gemspec +34 -0
  115. metadata +362 -0
@@ -0,0 +1,414 @@
1
+ require 'vagrant-openstack-provider/spec_helper'
2
+
3
+ describe VagrantPlugins::Openstack::Config do
4
+ describe 'defaults' do
5
+ let(:vagrant_public_key) { Vagrant.source_root.join('keys/vagrant.pub') }
6
+
7
+ subject do
8
+ super().tap(&:finalize!)
9
+ end
10
+
11
+ its(:password) { should be_nil }
12
+ its(:openstack_compute_url) { should be_nil }
13
+ its(:openstack_auth_url) { should be_nil }
14
+ its(:openstack_orchestration_url) { should be_nil }
15
+ its(:flavor) { should be_nil }
16
+ its(:image) { should be_nil }
17
+ its(:server_name) { should be_nil }
18
+ its(:username) { should be_nil }
19
+ its(:use_legacy_synced_folders) { should eq(false) }
20
+ its(:rsync_includes) { should be_nil }
21
+ its(:rsync_ignore_files) { should be_nil }
22
+ its(:sync_method) { should be_nil }
23
+ its(:keypair_name) { should be_nil }
24
+ its(:public_key_path) { should be_nil }
25
+ its(:availability_zone) { should be_nil }
26
+ its(:ssh_username) { should be_nil }
27
+ its(:floating_ip_pool_always_allocate) { should eq(false) }
28
+ its(:scheduler_hints) { should be_nil }
29
+ its(:security_groups) { should be_nil }
30
+ its(:user_data) { should be_nil }
31
+ its(:metadata) { should be_nil }
32
+ its(:ssl_ca_file) { should eq nil }
33
+ end
34
+
35
+ describe 'overriding defaults' do
36
+ [
37
+ :password,
38
+ :openstack_compute_url,
39
+ :openstack_auth_url,
40
+ :flavor,
41
+ :image,
42
+ :server_name,
43
+ :username,
44
+ :keypair_name,
45
+ :ssh_username,
46
+ :floating_ip_pool_always_allocate,
47
+ :scheduler_hints,
48
+ :security_groups,
49
+ :openstack_orchestration_url,
50
+ :stacks,
51
+ :user_data,
52
+ :metadata,
53
+ :availability_zone,
54
+ :public_key_path,
55
+ :ssl_ca_file].each do |attribute|
56
+ it "should not default #{attribute} if overridden" do
57
+ subject.send("#{attribute}=".to_sym, 'foo')
58
+ subject.finalize!
59
+ subject.send(attribute).should == 'foo'
60
+ end
61
+ end
62
+
63
+ describe 'use_legacy_synced_folders' do
64
+ it 'should default to true if sync_method is set' do
65
+ subject.sync_method = 'rsync'
66
+ subject.finalize!
67
+
68
+ expect(subject.use_legacy_synced_folders).to eq(true)
69
+ end
70
+
71
+ it 'should default to true if rsync_includes is non-empty' do
72
+ subject.rsync_includes = ['some/file']
73
+ subject.finalize!
74
+
75
+ expect(subject.use_legacy_synced_folders).to eq(true)
76
+ end
77
+
78
+ it 'should default to true if rsync_ignore_files is non-empty' do
79
+ subject.rsync_ignore_files = ['some/file']
80
+ subject.finalize!
81
+
82
+ expect(subject.use_legacy_synced_folders).to eq(true)
83
+ end
84
+ end
85
+
86
+ it 'should not default rsync_includes if overridden' do
87
+ inc = 'core'
88
+ subject.send(:rsync_include, inc)
89
+ subject.finalize!
90
+
91
+ expect(subject.rsync_includes).to include(inc)
92
+ expect(subject.use_legacy_synced_folders).to eq(true)
93
+ end
94
+ end
95
+
96
+ describe 'merge' do
97
+ let(:foo_class) do
98
+ Class.new(described_class) do
99
+ attr_accessor :networks
100
+ attr_accessor :floating_ip_pool
101
+ end
102
+ end
103
+
104
+ subject { foo_class.new }
105
+
106
+ context 'with original network not empty array' do
107
+ it 'should overidde the config' do
108
+ one = foo_class.new
109
+ one.networks = ['foo']
110
+
111
+ two = foo_class.new
112
+ two.networks = ['bar']
113
+
114
+ result = one.merge(two)
115
+ result.networks.should =~ ['bar']
116
+ end
117
+ end
118
+
119
+ context 'with original network empty array' do
120
+ it 'should add the network to the existing list' do
121
+ one = foo_class.new
122
+ one.networks = []
123
+
124
+ two = foo_class.new
125
+ two.networks = ['bar']
126
+
127
+ result = one.merge(two)
128
+ result.networks.should =~ ['bar']
129
+ end
130
+ end
131
+
132
+ context 'with original network not empty array and new empty array' do
133
+ it 'should keep the original network' do
134
+ one = foo_class.new
135
+ one.networks = ['foo']
136
+
137
+ two = foo_class.new
138
+ two.networks = []
139
+
140
+ result = one.merge(two)
141
+ result.networks.should =~ ['foo']
142
+ end
143
+ end
144
+
145
+ context 'with original network is a string and new empty array' do
146
+ it 'should keep the original network and wrap it into an array' do
147
+ one = foo_class.new
148
+ one.networks = 'foo'
149
+
150
+ two = foo_class.new
151
+ two.networks = []
152
+
153
+ result = one.merge(two)
154
+ result.networks.should =~ ['foo']
155
+ end
156
+ end
157
+
158
+ context 'with original network is a string and new is a string' do
159
+ it 'should overidde the config and wrap it into an array' do
160
+ one = foo_class.new
161
+ one.networks = 'foo'
162
+
163
+ two = foo_class.new
164
+ two.networks = 'bar'
165
+
166
+ result = one.merge(two)
167
+ result.networks.should =~ ['bar']
168
+ end
169
+ end
170
+
171
+ context 'with original floating_ip_pool as string' do
172
+ context 'and new as empty array' do
173
+ it 'should put original string in a single entry array' do
174
+ one = foo_class.new
175
+ one.floating_ip_pool = 'pool'
176
+
177
+ two = foo_class.new
178
+ two.floating_ip_pool = []
179
+
180
+ result = one.merge(two)
181
+ result.floating_ip_pool.should =~ ['pool']
182
+ end
183
+ end
184
+ context 'and new as empty string' do
185
+ it 'should put original string in a single entry array' do
186
+ one = foo_class.new
187
+ one.floating_ip_pool = 'pool'
188
+
189
+ two = foo_class.new
190
+ two.floating_ip_pool = ''
191
+
192
+ result = one.merge(two)
193
+ result.floating_ip_pool.should =~ ['']
194
+ end
195
+ end
196
+ context 'and new as string' do
197
+ it 'should put new string in a single entry array' do
198
+ one = foo_class.new
199
+ one.floating_ip_pool = 'pool'
200
+
201
+ two = foo_class.new
202
+ two.floating_ip_pool = 'new-pool'
203
+
204
+ result = one.merge(two)
205
+ result.floating_ip_pool.should =~ ['new-pool']
206
+ end
207
+ end
208
+ context 'and new as array' do
209
+ it 'should put new array' do
210
+ one = foo_class.new
211
+ one.floating_ip_pool = 'pool'
212
+
213
+ two = foo_class.new
214
+ two.floating_ip_pool = %w(pool-1 pool-2)
215
+
216
+ result = one.merge(two)
217
+ result.floating_ip_pool.should =~ %w(pool-1 pool-2)
218
+ end
219
+ end
220
+ end
221
+
222
+ context 'with original floating_ip_pool as array' do
223
+ context 'and new empty' do
224
+ it 'should put original array' do
225
+ one = foo_class.new
226
+ one.floating_ip_pool = %w(pool-1 pool-2)
227
+
228
+ two = foo_class.new
229
+ two.floating_ip_pool = []
230
+
231
+ result = one.merge(two)
232
+ result.floating_ip_pool.should =~ %w(pool-1 pool-2)
233
+ end
234
+ end
235
+ context 'and new as string' do
236
+ it 'should put new string in a single entry array' do
237
+ one = foo_class.new
238
+ one.floating_ip_pool = %w(pool-1 pool-2)
239
+
240
+ two = foo_class.new
241
+ two.floating_ip_pool = 'pool'
242
+
243
+ result = one.merge(two)
244
+ result.floating_ip_pool.should =~ ['pool']
245
+ end
246
+ end
247
+ context 'and new as array' do
248
+ it 'should put new array' do
249
+ one = foo_class.new
250
+ one.floating_ip_pool = %w(pool-1 pool-2)
251
+
252
+ two = foo_class.new
253
+ two.floating_ip_pool = %w(new-pool-1 new-pool-2)
254
+
255
+ result = one.merge(two)
256
+ result.floating_ip_pool.should =~ %w(new-pool-1 new-pool-2)
257
+ end
258
+ end
259
+ end
260
+ end
261
+
262
+ describe 'validation' do
263
+ let(:machine) { double('machine') }
264
+ let(:validation_errors) { subject.validate(machine)['Openstack Provider'] }
265
+ let(:error_message) { double('error message') }
266
+
267
+ let(:config) { double('config') }
268
+ let(:ssh) { double('ssh') }
269
+
270
+ before(:each) do
271
+ error_message.stub(:yellow) { 'Yellowed Error message ' }
272
+ machine.stub_chain(:env, :root_path).and_return '/'
273
+ ssh.stub(:private_key_path) { 'private key path' }
274
+ ssh.stub(:username) { 'ssh username' }
275
+ ssh.stub(:insert_key) { true }
276
+ config.stub(:ssh) { ssh }
277
+ machine.stub(:config) { config }
278
+ subject.username = 'foo'
279
+ subject.password = 'bar'
280
+ subject.tenant_name = 'tenant'
281
+ subject.keypair_name = 'keypair'
282
+ end
283
+
284
+ subject do
285
+ super().tap(&:finalize!)
286
+ end
287
+
288
+ context 'with invalid stack' do
289
+ it 'should raise an error' do
290
+ subject.stacks = [
291
+ {
292
+ name: 'test1'
293
+ }
294
+ ]
295
+ I18n.should_receive(:t).with('vagrant_openstack.config.invalid_stack').and_return error_message
296
+ validation_errors.first.should == error_message
297
+ end
298
+
299
+ it 'should raise an error' do
300
+ subject.stacks = [
301
+ {
302
+ name: 'test1',
303
+ tempslate: 'tes1'
304
+ }
305
+ ]
306
+ I18n.should_receive(:t).with('vagrant_openstack.config.invalid_stack').and_return error_message
307
+ validation_errors.first.should == error_message
308
+ end
309
+
310
+ it 'should not raise an error' do
311
+ subject.stacks = [
312
+ {
313
+ name: 'test1',
314
+ template: 'tes1'
315
+ }
316
+ ]
317
+ expect(validation_errors).to be_empty
318
+ end
319
+ end
320
+
321
+ context 'with invalid key' do
322
+ it 'should raise an error' do
323
+ subject.nonsense1 = true
324
+ subject.nonsense2 = false
325
+ I18n.should_receive(:t).with('vagrant.config.common.bad_field', fields: 'nonsense1, nonsense2').and_return error_message
326
+ validation_errors.first.should == error_message
327
+ end
328
+ end
329
+
330
+ context 'with no ssh username provider' do
331
+ it 'should raise an error' do
332
+ ssh.stub(:username) { nil }
333
+ subject.ssh_username = nil
334
+ I18n.should_receive(:t).with('vagrant_openstack.config.ssh_username_required').and_return error_message
335
+ validation_errors.first.should == error_message
336
+ end
337
+ end
338
+
339
+ context 'with good values' do
340
+ it 'should validate' do
341
+ validation_errors.should be_empty
342
+ end
343
+ end
344
+
345
+ context 'private_key_path is not set' do
346
+ context 'keypair_name or public_key_path is set' do
347
+ it 'should error if not given' do
348
+ ssh.stub(:private_key_path) { nil }
349
+ subject.public_key_path = 'public_key'
350
+ I18n.should_receive(:t).with('vagrant_openstack.config.private_key_missing').and_return error_message
351
+ validation_errors.first.should == error_message
352
+ end
353
+ end
354
+
355
+ context 'keypair_name or public_key_path is set and ssh.insert_key is false' do
356
+ it 'should not error' do
357
+ ssh.stub(:private_key_path) { nil }
358
+ ssh.stub(:insert_key) { false }
359
+ subject.public_key_path = 'public_key'
360
+ I18n.should_not_receive(:t)
361
+ validation_errors.should be_empty
362
+ end
363
+ end
364
+ end
365
+
366
+ context 'the password' do
367
+ it 'should error if not given' do
368
+ subject.password = nil
369
+ I18n.should_receive(:t).with('vagrant_openstack.config.password_required').and_return error_message
370
+ validation_errors.first.should == error_message
371
+ end
372
+ end
373
+
374
+ context 'the username' do
375
+ it 'should error if not given' do
376
+ subject.username = nil
377
+ I18n.should_receive(:t).with('vagrant_openstack.config.username_required').and_return error_message
378
+ validation_errors.first.should == error_message
379
+ end
380
+ end
381
+
382
+ context 'the tenant name' do
383
+ it 'should error if not given' do
384
+ subject.tenant_name = nil
385
+ I18n.should_receive(:t).with('vagrant_openstack.config.tenant_name_required').and_return error_message
386
+ validation_errors.first.should == error_message
387
+ end
388
+ end
389
+
390
+ context 'the ssh_timeout' do
391
+ it 'should error if do not represent an integer' do
392
+ subject.ssh_timeout = 'timeout'
393
+ I18n.should_receive(:t).with('vagrant_openstack.config.invalid_value_for_parameter',
394
+ parameter: 'ssh_timeout', value: 'timeout').and_return error_message
395
+ validation_errors.first.should == error_message
396
+ end
397
+ it 'should be parsed as integer if is a string that represent an integer' do
398
+ subject.ssh_timeout = '100'
399
+ validation_errors.size.should eq(0)
400
+ expect(subject.ssh_timeout).to eq(100)
401
+ end
402
+ end
403
+
404
+ [:openstack_compute_url, :openstack_auth_url, :openstack_orchestration_url].each do |url|
405
+ context "the #{url}" do
406
+ it 'should not validate if the URL is invalid' do
407
+ subject.send "#{url}=", 'baz'
408
+ I18n.should_receive(:t).with('vagrant_openstack.config.invalid_uri', key: url, uri: 'baz').and_return error_message
409
+ validation_errors.first.should == error_message
410
+ end
411
+ end
412
+ end
413
+ end
414
+ end
@@ -0,0 +1,27 @@
1
+ require 'vagrant-openstack-provider/spec_helper'
2
+
3
+ require 'aruba'
4
+ require 'aruba/api'
5
+
6
+ include Aruba::Api
7
+
8
+ # spec/template_spec.rb
9
+ require 'pathname'
10
+
11
+ root = Pathname.new(__FILE__).parent.parent
12
+
13
+ # Allows us to run commands directly, without worrying about the CWD
14
+ ENV['PATH'] = "#{root.join('bin').to_s}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
15
+
16
+ describe "genud" do
17
+ context "YAML templates" do
18
+ it "should emit valid YAML to STDOUT", :focus do
19
+
20
+ puts '#####################'
21
+ # Run the command with Aruba's run_simple helper
22
+ run_simple "bundle exec vagrant openstack", false, 10
23
+
24
+ # assert_exit_status(0)
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,13 @@
1
+ require 'vagrant-openstack-provider/spec_helper'
2
+
3
+ describe VagrantPlugins::Openstack::Provider do
4
+ before :each do
5
+ @provider = VagrantPlugins::Openstack::Provider.new :machine
6
+ end
7
+
8
+ describe 'to string' do
9
+ it 'should give the provider name' do
10
+ @provider.to_s.should eq('Openstack Cloud')
11
+ end
12
+ end
13
+ end