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
@@ -3,7 +3,6 @@ require 'vagrant-openstack-provider/spec_helper'
3
3
  include VagrantPlugins::Openstack
4
4
 
5
5
  describe VagrantPlugins::Openstack::HttpUtils do
6
-
7
6
  let(:keystone) do
8
7
  double('keystone').tap do |keystone|
9
8
  keystone.stub(:authenticate).with(anything)
@@ -11,7 +10,7 @@ describe VagrantPlugins::Openstack::HttpUtils do
11
10
  end
12
11
 
13
12
  let(:env) do
14
- Hash.new.tap do |env|
13
+ {}.tap do |env|
15
14
  env[:ui] = double('ui')
16
15
  env[:ui].stub(:warn).with(anything)
17
16
  env[:openstack_client] = double('openstack_client')
@@ -37,7 +36,6 @@ describe VagrantPlugins::Openstack::HttpUtils do
37
36
  end
38
37
 
39
38
  describe 'authenticated' do
40
-
41
39
  before :each do
42
40
  TestUtils.send(:public, *TestUtils.private_instance_methods)
43
41
  @utils = TestUtils.new
@@ -2,7 +2,6 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::FlavorList do
4
4
  describe 'cmd' do
5
-
6
5
  let(:nova) do
7
6
  double('nova').tap do |nova|
8
7
  nova.stub(:get_all_flavors) do
@@ -15,7 +14,7 @@ describe VagrantPlugins::Openstack::Command::FlavorList do
15
14
  end
16
15
 
17
16
  let(:env) do
18
- Hash.new.tap do |env|
17
+ {}.tap do |env|
19
18
  env[:ui] = double('ui')
20
19
  env[:ui].stub(:info).with(anything)
21
20
  env[:openstack_client] = double
@@ -2,7 +2,6 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::FloatingIpList do
4
4
  describe 'cmd' do
5
-
6
5
  let(:nova) do
7
6
  double('nova').tap do |nova|
8
7
  nova.stub(:get_floating_ip_pools) do
@@ -37,7 +36,7 @@ describe VagrantPlugins::Openstack::Command::FloatingIpList do
37
36
  end
38
37
 
39
38
  let(:env) do
40
- Hash.new.tap do |env|
39
+ {}.tap do |env|
41
40
  env[:ui] = double('ui')
42
41
  env[:ui].stub(:info).with(anything)
43
42
  env[:openstack_client] = double
@@ -1,7 +1,6 @@
1
1
  require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::ImageList do
4
-
5
4
  let(:nova) do
6
5
  double('nova').tap do |nova|
7
6
  nova.stub(:get_all_images) do
@@ -27,7 +26,7 @@ describe VagrantPlugins::Openstack::Command::ImageList do
27
26
  end
28
27
 
29
28
  let(:env) do
30
- Hash.new.tap do |env|
29
+ {}.tap do |env|
31
30
  env[:ui] = double('ui')
32
31
  env[:ui].stub(:info).with(anything)
33
32
  env[:openstack_client] = double
@@ -42,7 +41,6 @@ describe VagrantPlugins::Openstack::Command::ImageList do
42
41
 
43
42
  describe 'cmd' do
44
43
  context 'when glance is not available' do
45
-
46
44
  let(:session) do
47
45
  double('session').tap do |s|
48
46
  s.stub(:endpoints) { {} }
@@ -50,7 +48,6 @@ describe VagrantPlugins::Openstack::Command::ImageList do
50
48
  end
51
49
 
52
50
  it 'prints image list with only the id and the name' do
53
-
54
51
  env[:openstack_client].stub(:session) { session }
55
52
  allow(@image_list_cmd).to receive(:with_target_vms).and_return(nil)
56
53
  nova.should_receive(:get_all_images).with(env)
@@ -68,7 +65,6 @@ describe VagrantPlugins::Openstack::Command::ImageList do
68
65
  end
69
66
 
70
67
  context 'when glance is available' do
71
-
72
68
  let(:session) do
73
69
  double('session').tap do |s|
74
70
  s.stub(:endpoints) do
@@ -80,7 +76,6 @@ describe VagrantPlugins::Openstack::Command::ImageList do
80
76
  end
81
77
 
82
78
  it 'prints image list with id, name and details' do
83
-
84
79
  env[:openstack_client].stub(:session) { session }
85
80
  allow(@image_list_cmd).to receive(:with_target_vms).and_return(nil)
86
81
  glance.should_receive(:get_all_images).with(env)
@@ -2,7 +2,6 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::NetworkList do
4
4
  describe 'cmd' do
5
-
6
5
  let(:neutron) do
7
6
  double('neutron').tap do |neutron|
8
7
  neutron.stub(:get_private_networks) do
@@ -22,7 +21,7 @@ describe VagrantPlugins::Openstack::Command::NetworkList do
22
21
  end
23
22
 
24
23
  let(:env) do
25
- Hash.new.tap do |env|
24
+ {}.tap do |env|
26
25
  env[:ui] = double('ui')
27
26
  env[:ui].stub(:info).with(anything)
28
27
  env[:openstack_client] = double
@@ -62,6 +61,5 @@ describe VagrantPlugins::Openstack::Command::NetworkList do
62
61
 
63
62
  @network_list_cmd.cmd('network-list', ['all'], env)
64
63
  end
65
-
66
64
  end
67
65
  end
@@ -2,9 +2,8 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::Reset do
4
4
  describe 'cmd' do
5
-
6
5
  let(:env) do
7
- Hash.new.tap do |env|
6
+ {}.tap do |env|
8
7
  env[:ui] = double('ui')
9
8
  env[:ui].stub(:info).with(anything)
10
9
  env[:machine] = double('machine')
@@ -2,7 +2,6 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::SubnetList do
4
4
  describe 'cmd' do
5
-
6
5
  let(:neutron) do
7
6
  double('neutron').tap do |neutron|
8
7
  neutron.stub(:get_subnets) do
@@ -16,7 +15,7 @@ describe VagrantPlugins::Openstack::Command::SubnetList do
16
15
  end
17
16
 
18
17
  let(:env) do
19
- Hash.new.tap do |env|
18
+ {}.tap do |env|
20
19
  env[:ui] = double('ui')
21
20
  env[:ui].stub(:info).with(anything)
22
21
  env[:openstack_client] = double
@@ -2,7 +2,6 @@ require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Command::VolumeList do
4
4
  describe 'cmd' do
5
-
6
5
  let(:cinder) do
7
6
  double('cinder').tap do |cinder|
8
7
  cinder.stub(:get_all_volumes) do
@@ -13,7 +12,7 @@ describe VagrantPlugins::Openstack::Command::VolumeList do
13
12
  end
14
13
 
15
14
  let(:env) do
16
- Hash.new.tap do |env|
15
+ {}.tap do |env|
17
16
  env[:ui] = double('ui')
18
17
  env[:ui].stub(:info).with(anything)
19
18
  env[:openstack_client] = double
@@ -1,7 +1,6 @@
1
1
  require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::ConfigResolver do
4
-
5
4
  let(:config) do
6
5
  double('config').tap do |config|
7
6
  config.stub(:tenant_name) { 'testTenant' }
@@ -75,7 +74,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
75
74
  end
76
75
 
77
76
  let(:env) do
78
- Hash.new.tap do |env|
77
+ {}.tap do |env|
79
78
  env[:ui] = double('ui')
80
79
  env[:ui].stub(:info).with(anything)
81
80
  env[:machine] = double('machine')
@@ -186,6 +185,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
186
185
  context 'with id' do
187
186
  it 'returns the specified flavor' do
188
187
  config.stub(:image) { 'img-001' }
188
+ config.stub(:volume_boot) { nil }
189
189
  nova.stub(:get_all_images).with(anything) do
190
190
  [Item.new('img-001', 'image-01'),
191
191
  Item.new('img-002', 'image-02')]
@@ -196,6 +196,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
196
196
  context 'with name' do
197
197
  it 'returns the specified flavor' do
198
198
  config.stub(:image) { 'image-02' }
199
+ config.stub(:volume_boot) { nil }
199
200
  nova.stub(:get_all_images).with(anything) do
200
201
  [Item.new('img-001', 'image-01'),
201
202
  Item.new('img-002', 'image-02')]
@@ -206,6 +207,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
206
207
  context 'with invalid identifier' do
207
208
  it 'raise an error' do
208
209
  config.stub(:image) { 'not-existing' }
210
+ config.stub(:volume_boot) { nil }
209
211
  nova.stub(:get_all_images).with(anything) do
210
212
  [Item.new('img-001', 'image-01'),
211
213
  Item.new('img-002', 'image-02')]
@@ -213,6 +215,17 @@ describe VagrantPlugins::Openstack::ConfigResolver do
213
215
  expect { @action.resolve_image(env) }.to raise_error(Errors::NoMatchingImage)
214
216
  end
215
217
  end
218
+ context 'with no images in config' do
219
+ it 'return nil' do
220
+ config.stub(:image) { nil }
221
+ config.stub(:volume_boot) { nil }
222
+ nova.stub(:get_all_images).with(anything) do
223
+ [Item.new('img-001', 'image-01'),
224
+ Item.new('img-002', 'image-02')]
225
+ end
226
+ @action.resolve_image(env).should eq(nil)
227
+ end
228
+ end
216
229
  end
217
230
 
218
231
  describe 'resolve_floating_ip' do
@@ -400,7 +413,6 @@ describe VagrantPlugins::Openstack::ConfigResolver do
400
413
  context 'neutron service is available' do
401
414
  context 'with network configured in all possible ways' do
402
415
  it 'returns normalized network list' do
403
-
404
416
  config.stub(:networks) do
405
417
  ['001',
406
418
  'net-02',
@@ -515,6 +527,10 @@ describe VagrantPlugins::Openstack::ConfigResolver do
515
527
  context 'with string volume name' do
516
528
  it 'returns normalized volume' do
517
529
  config.stub(:volume_boot) { 'vol-01' }
530
+ nova.stub(:get_all_images).with(anything) do
531
+ [Item.new('img-001', 'image-01'),
532
+ Item.new('img-002', 'image-02')]
533
+ end
518
534
  expect(@action.resolve_volume_boot(env)).to eq id: '001', device: 'vda'
519
535
  end
520
536
  end
@@ -529,6 +545,10 @@ describe VagrantPlugins::Openstack::ConfigResolver do
529
545
  context 'with hash volume name' do
530
546
  it 'returns normalized volume' do
531
547
  config.stub(:volume_boot) { { name: 'vol-01' } }
548
+ nova.stub(:get_all_images).with(anything) do
549
+ [Item.new('img-001', 'image-01'),
550
+ Item.new('img-002', 'image-02')]
551
+ end
532
552
  expect(@action.resolve_volume_boot(env)).to eq id: '001', device: 'vda'
533
553
  end
534
554
  end
@@ -543,6 +563,10 @@ describe VagrantPlugins::Openstack::ConfigResolver do
543
563
  context 'with hash volume name and device' do
544
564
  it 'returns normalized volume' do
545
565
  config.stub(:volume_boot) { { name: 'vol-01', device: 'vdb' } }
566
+ nova.stub(:get_all_images).with(anything) do
567
+ [Item.new('img-001', 'image-01'),
568
+ Item.new('img-002', 'image-02')]
569
+ end
546
570
  expect(@action.resolve_volume_boot(env)).to eq id: '001', device: 'vdb'
547
571
  end
548
572
  end
@@ -550,7 +574,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
550
574
  context 'with empty hash' do
551
575
  it 'raises an error' do
552
576
  config.stub(:volume_boot) { {} }
553
- expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictVolumeNameId)
577
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
554
578
  end
555
579
  end
556
580
 
@@ -588,6 +612,77 @@ describe VagrantPlugins::Openstack::ConfigResolver do
588
612
  expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::MultipleVolumeName)
589
613
  end
590
614
  end
615
+
616
+ context 'with hash containing a name and an image_name' do
617
+ it 'raises an error' do
618
+ config.stub(:volume_boot) { { name: 'vol-01', image: 'img_001' } }
619
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
620
+ end
621
+ end
622
+
623
+ context 'with hash containing a name and a size' do
624
+ it 'raises an error' do
625
+ config.stub(:volume_boot) { { name: 'vol-01', size: '10' } }
626
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
627
+ end
628
+ end
629
+
630
+ context 'with hash containing a name and a delete_on_destroy indication' do
631
+ it 'raises an error' do
632
+ config.stub(:volume_boot) { { name: 'vol-01', delete_on_destroy: 'true' } }
633
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
634
+ end
635
+ end
636
+
637
+ context 'with hash containing a volume_id and an image_name' do
638
+ it 'raises an error' do
639
+ config.stub(:volume_boot) { { id: 'id', image: 'img_001' } }
640
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
641
+ end
642
+ end
643
+
644
+ context 'with hash containing a volume_id and a size' do
645
+ it 'raises an error' do
646
+ config.stub(:volume_boot) { { id: 'id', size: '10' } }
647
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
648
+ end
649
+ end
650
+
651
+ context 'with hash containing a volume_id and a delete_on_destroy indication' do
652
+ it 'raises an error' do
653
+ config.stub(:volume_boot) { { id: 'id', delete_on_destroy: 'true' } }
654
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::ConflictBootVolume)
655
+ end
656
+ end
657
+
658
+ context 'with hash containing an image_name without size' do
659
+ it 'raises an error' do
660
+ config.stub(:volume_boot) { { image: 'img-001' } }
661
+ expect { @action.resolve_volume_boot(env) }.to raise_error(Errors::UnresolvedVolume)
662
+ end
663
+ end
664
+
665
+ context 'with hash containing an image_name with a size' do
666
+ it 'return normalized volume' do
667
+ config.stub(:volume_boot) { { image: 'image-01', size: '10' } }
668
+ nova.stub(:get_all_images).with(anything) do
669
+ [Item.new('img-001', 'image-01'),
670
+ Item.new('img-002', 'image-02')]
671
+ end
672
+ expect(@action.resolve_volume_boot(env)).to eq image: 'img-001', device: 'vda', size: '10', delete_on_destroy: 'true'
673
+ end
674
+ end
675
+
676
+ context 'with hash containing an image_name, size, device and delete_on_destroy' do
677
+ it 'return normalized volume' do
678
+ config.stub(:volume_boot) { { image: 'image-01', size: '10', device: 'vdb', delete_on_destroy: 'false' } }
679
+ nova.stub(:get_all_images).with(anything) do
680
+ [Item.new('img-001', 'image-01'),
681
+ Item.new('img-002', 'image-02')]
682
+ end
683
+ expect(@action.resolve_volume_boot(env)).to eq image: 'img-001', device: 'vdb', size: '10', delete_on_destroy: 'false'
684
+ end
685
+ end
591
686
  end
592
687
 
593
688
  context 'cinder service is not available' do
@@ -653,7 +748,6 @@ describe VagrantPlugins::Openstack::ConfigResolver do
653
748
  context 'cinder service is available' do
654
749
  context 'with volume attached in all possible ways' do
655
750
  it 'returns normalized volume list' do
656
-
657
751
  config.stub(:volumes) do
658
752
  ['001',
659
753
  'vol-02',
@@ -703,7 +797,7 @@ describe VagrantPlugins::Openstack::ConfigResolver do
703
797
  context 'with empty hash' do
704
798
  it 'raises an error' do
705
799
  config.stub(:volumes) { [{}] }
706
- expect { @action.resolve_volumes(env) }.to raise_error(Errors::ConflictVolumeNameId)
800
+ expect { @action.resolve_volumes(env) }.to raise_error(Errors::ConflictBootVolume)
707
801
  end
708
802
  end
709
803
 
@@ -5,9 +5,7 @@ describe VagrantPlugins::Openstack::Config do
5
5
  let(:vagrant_public_key) { Vagrant.source_root.join('keys/vagrant.pub') }
6
6
 
7
7
  subject do
8
- super().tap do |o|
9
- o.finalize!
10
- end
8
+ super().tap(&:finalize!)
11
9
  end
12
10
 
13
11
  its(:password) { should be_nil }
@@ -253,9 +251,7 @@ describe VagrantPlugins::Openstack::Config do
253
251
  end
254
252
 
255
253
  subject do
256
- super().tap do |o|
257
- o.finalize!
258
- end
254
+ super().tap(&:finalize!)
259
255
  end
260
256
 
261
257
  context 'with invalid stack' do
@@ -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
@@ -12,6 +12,7 @@ if ENV['COVERAGE'] != 'false'
12
12
  end
13
13
 
14
14
  Dir[
15
+ 'lib/vagrant-openstack-provider/version_checker.rb',
15
16
  'lib/vagrant-openstack-provider/logging.rb',
16
17
  'lib/vagrant-openstack-provider/config.rb',
17
18
  'lib/vagrant-openstack-provider/config_resolver.rb',
@@ -1,7 +1,6 @@
1
1
  require 'vagrant-openstack-provider/spec_helper'
2
2
 
3
3
  describe VagrantPlugins::Openstack::Utils do
4
-
5
4
  let(:config) do
6
5
  double('config').tap do |config|
7
6
  config.stub(:tenant_name) { 'testTenant' }
@@ -19,7 +18,7 @@ describe VagrantPlugins::Openstack::Utils do
19
18
  end
20
19
 
21
20
  let(:env) do
22
- Hash.new.tap do |env|
21
+ {}.tap do |env|
23
22
  env[:machine] = double('machine')
24
23
  env[:machine].stub(:provider_config) { config }
25
24
  env[:machine].stub(:id) { '1234id' }