vagrant-libvirt 0.5.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +110 -18
  3. data/lib/vagrant-libvirt/action/clean_machine_folder.rb +2 -0
  4. data/lib/vagrant-libvirt/action/create_domain.rb +8 -1
  5. data/lib/vagrant-libvirt/action/create_domain_volume.rb +5 -0
  6. data/lib/vagrant-libvirt/action/create_network_interfaces.rb +8 -2
  7. data/lib/vagrant-libvirt/action/create_networks.rb +12 -8
  8. data/lib/vagrant-libvirt/action/destroy_domain.rb +2 -0
  9. data/lib/vagrant-libvirt/action/destroy_networks.rb +2 -0
  10. data/lib/vagrant-libvirt/action/forward_ports.rb +7 -5
  11. data/lib/vagrant-libvirt/action/halt_domain.rb +4 -34
  12. data/lib/vagrant-libvirt/action/handle_box_image.rb +3 -3
  13. data/lib/vagrant-libvirt/action/handle_storage_pool.rb +7 -1
  14. data/lib/vagrant-libvirt/action/is_created.rb +2 -0
  15. data/lib/vagrant-libvirt/action/is_running.rb +2 -0
  16. data/lib/vagrant-libvirt/action/is_suspended.rb +2 -0
  17. data/lib/vagrant-libvirt/action/message_already_created.rb +2 -0
  18. data/lib/vagrant-libvirt/action/message_not_created.rb +2 -0
  19. data/lib/vagrant-libvirt/action/message_not_running.rb +2 -0
  20. data/lib/vagrant-libvirt/action/message_not_suspended.rb +2 -0
  21. data/lib/vagrant-libvirt/action/message_will_not_destroy.rb +2 -0
  22. data/lib/vagrant-libvirt/action/package_domain.rb +133 -68
  23. data/lib/vagrant-libvirt/action/prepare_nfs_settings.rb +2 -0
  24. data/lib/vagrant-libvirt/action/prepare_nfs_valid_ids.rb +2 -0
  25. data/lib/vagrant-libvirt/action/prune_nfs_exports.rb +2 -0
  26. data/lib/vagrant-libvirt/action/read_mac_addresses.rb +2 -0
  27. data/lib/vagrant-libvirt/action/remove_libvirt_image.rb +2 -0
  28. data/lib/vagrant-libvirt/action/remove_stale_volume.rb +2 -0
  29. data/lib/vagrant-libvirt/action/resume_domain.rb +2 -0
  30. data/lib/vagrant-libvirt/action/set_boot_order.rb +2 -0
  31. data/lib/vagrant-libvirt/action/set_name_of_domain.rb +3 -1
  32. data/lib/vagrant-libvirt/action/share_folders.rb +2 -0
  33. data/lib/vagrant-libvirt/action/shutdown_domain.rb +49 -0
  34. data/lib/vagrant-libvirt/action/start_domain.rb +26 -17
  35. data/lib/vagrant-libvirt/action/suspend_domain.rb +2 -0
  36. data/lib/vagrant-libvirt/action/wait_till_up.rb +2 -0
  37. data/lib/vagrant-libvirt/action.rb +34 -4
  38. data/lib/vagrant-libvirt/cap/mount_9p.rb +2 -0
  39. data/lib/vagrant-libvirt/cap/mount_virtiofs.rb +2 -0
  40. data/lib/vagrant-libvirt/cap/nic_mac_addresses.rb +2 -0
  41. data/lib/vagrant-libvirt/cap/public_address.rb +2 -0
  42. data/lib/vagrant-libvirt/cap/synced_folder_9p.rb +5 -2
  43. data/lib/vagrant-libvirt/cap/synced_folder_virtiofs.rb +5 -2
  44. data/lib/vagrant-libvirt/config.rb +49 -25
  45. data/lib/vagrant-libvirt/driver.rb +67 -12
  46. data/lib/vagrant-libvirt/errors.rb +2 -0
  47. data/lib/vagrant-libvirt/plugin.rb +2 -0
  48. data/lib/vagrant-libvirt/provider.rb +2 -0
  49. data/lib/vagrant-libvirt/templates/domain.xml.erb +4 -2
  50. data/lib/vagrant-libvirt/templates/public_interface.xml.erb +1 -0
  51. data/lib/vagrant-libvirt/util/collection.rb +2 -0
  52. data/lib/vagrant-libvirt/util/erb_template.rb +2 -0
  53. data/lib/vagrant-libvirt/util/error_codes.rb +2 -0
  54. data/lib/vagrant-libvirt/util/network_util.rb +3 -0
  55. data/lib/vagrant-libvirt/util/nfs.rb +2 -0
  56. data/lib/vagrant-libvirt/util/storage_util.rb +1 -0
  57. data/lib/vagrant-libvirt/util/timer.rb +2 -0
  58. data/lib/vagrant-libvirt/util/ui.rb +1 -0
  59. data/lib/vagrant-libvirt/util.rb +2 -0
  60. data/lib/vagrant-libvirt/version +1 -1
  61. data/lib/vagrant-libvirt/version.rb +2 -0
  62. data/lib/vagrant-libvirt.rb +2 -0
  63. data/locales/en.yml +2 -0
  64. data/spec/spec_helper.rb +2 -0
  65. data/spec/support/binding_proc.rb +2 -0
  66. data/spec/support/environment_helper.rb +2 -0
  67. data/spec/support/libvirt_context.rb +2 -0
  68. data/spec/support/matchers/have_file_content.rb +2 -0
  69. data/spec/support/sharedcontext.rb +3 -0
  70. data/spec/support/temporary_dir.rb +12 -0
  71. data/spec/unit/action/clean_machine_folder_spec.rb +2 -0
  72. data/spec/unit/action/create_domain_spec/additional_disks_domain.xml +7 -0
  73. data/spec/unit/action/create_domain_spec/default_domain.xml +6 -0
  74. data/spec/unit/action/create_domain_spec.rb +62 -30
  75. data/spec/unit/action/create_domain_volume_spec.rb +4 -0
  76. data/spec/unit/action/destroy_domain_spec.rb +8 -2
  77. data/spec/unit/action/forward_ports_spec.rb +2 -0
  78. data/spec/unit/action/halt_domain_spec.rb +30 -57
  79. data/spec/unit/action/handle_box_image_spec.rb +6 -4
  80. data/spec/unit/action/package_domain_spec.rb +304 -0
  81. data/spec/unit/action/set_name_of_domain_spec.rb +2 -0
  82. data/spec/unit/action/shutdown_domain_spec.rb +131 -0
  83. data/spec/unit/action/start_domain_spec/existing.xml +62 -0
  84. data/spec/unit/action/start_domain_spec.rb +18 -28
  85. data/spec/unit/action/wait_till_up_spec.rb +2 -0
  86. data/spec/unit/action_spec.rb +96 -0
  87. data/spec/unit/config_spec.rb +52 -2
  88. data/spec/unit/driver_spec.rb +155 -0
  89. data/spec/unit/templates/domain_all_settings.xml +4 -0
  90. data/spec/unit/templates/domain_spec.rb +2 -0
  91. data/spec/unit/util/byte_number_spec.rb +2 -0
  92. metadata +53 -41
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'support/sharedcontext'
5
+
6
+ require 'vagrant/action/runner'
7
+
8
+ require 'vagrant-libvirt/action'
9
+
10
+
11
+ describe VagrantPlugins::ProviderLibvirt::Action do
12
+ subject { described_class }
13
+
14
+ include_context 'libvirt'
15
+ include_context 'unit'
16
+
17
+ let(:libvirt_domain) { double('libvirt_domain') }
18
+ let(:runner) { Vagrant::Action::Runner.new(env) }
19
+ let(:state) { double('state') }
20
+
21
+ before do
22
+ allow_any_instance_of(VagrantPlugins::ProviderLibvirt::Driver)
23
+ .to receive(:connection).and_return(connection)
24
+ allow(machine).to receive(:id).and_return('test-machine-id')
25
+ allow(machine).to receive(:state).and_return(state)
26
+
27
+ allow(logger).to receive(:info)
28
+ allow(logger).to receive(:debug)
29
+ allow(logger).to receive(:error)
30
+ end
31
+
32
+ def allow_action_env_result(action, *responses)
33
+ results = responses.dup
34
+
35
+ allow_any_instance_of(action).to receive(:call) do |cls, env|
36
+ app = cls.instance_variable_get(:@app)
37
+
38
+ env[:result] = results[0]
39
+ if results.length > 1
40
+ results.shift
41
+ end
42
+
43
+ app.call(env)
44
+ end
45
+ end
46
+
47
+ describe '#action_halt' do
48
+ context 'not created' do
49
+ before do
50
+ expect(state).to receive(:id).and_return(:not_created)
51
+ end
52
+
53
+ it 'should execute without error' do
54
+ expect(ui).to receive(:info).with('Domain is not created. Please run `vagrant up` first.')
55
+
56
+ expect { runner.run(subject.action_halt) }.not_to raise_error
57
+ end
58
+ end
59
+
60
+ context 'running' do
61
+ before do
62
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::IsCreated, true)
63
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::IsSuspended, false)
64
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::IsRunning, true)
65
+ end
66
+
67
+ context 'when shutdown domain works' do
68
+ before do
69
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::ShutdownDomain, true)
70
+ allow_action_env_result(Vagrant::Action::Builtin::GracefulHalt, true)
71
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::IsRunning, true, false)
72
+ end
73
+
74
+ it 'should skip calling HaltDomain' do
75
+ expect(ui).to_not receive(:info).with('Domain is not created. Please run `vagrant up` first.')
76
+ expect_any_instance_of(VagrantPlugins::ProviderLibvirt::Action::HaltDomain).to_not receive(:call)
77
+
78
+ expect { runner.run(subject.action_halt) }.not_to raise_error
79
+ end
80
+ end
81
+
82
+ context 'when shutdown domain fails' do
83
+ before do
84
+ allow_action_env_result(VagrantPlugins::ProviderLibvirt::Action::ShutdownDomain, false)
85
+ allow_action_env_result(Vagrant::Action::Builtin::GracefulHalt, false)
86
+ end
87
+
88
+ it 'should call halt' do
89
+ expect_any_instance_of(VagrantPlugins::ProviderLibvirt::Action::HaltDomain).to receive(:call)
90
+
91
+ expect { runner.run(subject.action_halt) }.not_to raise_error
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'support/binding_proc'
2
4
 
3
5
  require 'spec_helper'
@@ -190,14 +192,14 @@ describe VagrantPlugins::ProviderLibvirt::Config do
190
192
  ],
191
193
  [ # when username explicitly set without ssh
192
194
  {:username => 'my_user' },
193
- {:uri => 'qemu:///system'},
195
+ {:uri => 'qemu:///system', :username => 'my_user'},
194
196
  {
195
197
  :env => {'LIBVIRT_DEFAULT_URI' => 'qemu://session'},
196
198
  }
197
199
  ],
198
200
  [ # when username explicitly set with host but without ssh
199
201
  {:username => 'my_user', :host => 'remote'},
200
- {:uri => 'qemu://remote/system'},
202
+ {:uri => 'qemu://remote/system', :username => 'my_user'},
201
203
  {
202
204
  :env => {'LIBVIRT_DEFAULT_URI' => 'qemu://session'},
203
205
  }
@@ -433,6 +435,54 @@ describe VagrantPlugins::ProviderLibvirt::Config do
433
435
  end
434
436
  end
435
437
  end
438
+
439
+ context '@usbctl_dev' do
440
+ it 'should be empty by default' do
441
+ subject.finalize!
442
+
443
+ expect(subject.usbctl_dev).to eq({})
444
+ end
445
+
446
+ context 'when usb devices added' do
447
+ it 'should inject a default controller' do
448
+ subject.usb :vendor => '0x1234', :product => '0xabcd'
449
+
450
+ subject.finalize!
451
+
452
+ expect(subject.usbctl_dev).to eq({:model => 'qemu-xhci'})
453
+ end
454
+
455
+ context 'when user specified a controller' do
456
+ it 'should retain the user setting' do
457
+ subject.usb :vendor => '0x1234', :product => '0xabcd'
458
+ subject.usb_controller :model => 'pii3-uchi'
459
+
460
+ subject.finalize!
461
+ expect(subject.usbctl_dev).to eq({:model => 'pii3-uchi'})
462
+ end
463
+ end
464
+ end
465
+
466
+ context 'when redirdevs entries added' do
467
+ it 'should inject a default controller' do
468
+ subject.redirdev :type => 'spicevmc'
469
+
470
+ subject.finalize!
471
+
472
+ expect(subject.usbctl_dev).to eq({:model => 'qemu-xhci'})
473
+ end
474
+
475
+ context 'when user specified a controller' do
476
+ it 'should retain the user setting' do
477
+ subject.redirdev :type => 'spicevmc'
478
+ subject.usb_controller :model => 'pii3-uchi'
479
+
480
+ subject.finalize!
481
+ expect(subject.usbctl_dev).to eq({:model => 'pii3-uchi'})
482
+ end
483
+ end
484
+ end
485
+ end
436
486
  end
437
487
 
438
488
  def assert_invalid
@@ -0,0 +1,155 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require 'support/binding_proc'
5
+ require 'support/sharedcontext'
6
+
7
+ require 'vagrant-libvirt/driver'
8
+
9
+ describe VagrantPlugins::ProviderLibvirt::Driver do
10
+ include_context 'unit'
11
+
12
+ subject { described_class.new(machine) }
13
+
14
+ let(:vagrantfile) do
15
+ <<-EOF
16
+ Vagrant.configure('2') do |config|
17
+ config.vm.define :test1 do |node|
18
+ node.vm.provider :libvirt do |domain|
19
+ domain.uri = "qemu+ssh://user@remote1/system"
20
+ end
21
+ end
22
+ config.vm.define :test2 do |node|
23
+ node.vm.provider :libvirt do |domain|
24
+ domain.uri = "qemu+ssh://vms@remote2/system"
25
+ end
26
+ end
27
+ end
28
+ EOF
29
+ end
30
+ # need to override the default package iso_env as using a different
31
+ # name for the test machines above.
32
+ let(:machine) { iso_env.machine(:test1, :libvirt) }
33
+ let(:machine2) { iso_env.machine(:test2, :libvirt) }
34
+ let(:connection1) { double("connection 1") }
35
+ let(:connection2) { double("connection 2") }
36
+ let(:system_connection1) { double("system connection 1") }
37
+ let(:system_connection2) { double("system connection 2") }
38
+
39
+ describe '#connection' do
40
+ it 'should configure a separate connection per machine' do
41
+ expect(Fog::Compute).to receive(:new).with(
42
+ hash_including({:libvirt_uri => 'qemu+ssh://user@remote1/system'})).and_return(connection1)
43
+ expect(Fog::Compute).to receive(:new).with(
44
+ hash_including({:libvirt_uri => 'qemu+ssh://vms@remote2/system'})).and_return(connection2)
45
+
46
+ expect(machine.provider.driver.connection).to eq(connection1)
47
+ expect(machine2.provider.driver.connection).to eq(connection2)
48
+ end
49
+
50
+ it 'should configure the connection once' do
51
+ expect(Fog::Compute).to receive(:new).once().and_return(connection1)
52
+
53
+ expect(machine.provider.driver.connection).to eq(connection1)
54
+ expect(machine.provider.driver.connection).to eq(connection1)
55
+ expect(machine.provider.driver.connection).to eq(connection1)
56
+ end
57
+ end
58
+
59
+ describe '#system_connection' do
60
+ # note that the urls for the two tests are currently
61
+ # incorrect here as they should be the following:
62
+ # qemu+ssh://user@remote1/system
63
+ # qemu+ssh://vms@remote2/system
64
+ #
65
+ # In that the system uri should be resolved based on
66
+ # the provider uri so that for:
67
+ # uri => qemu+ssh://user@remote1/session
68
+ # system_uri should be 'qemu+ssh://user@remote1/system'
69
+ # and not 'qemu:///system'.
70
+ it 'should configure a separate connection per machine' do
71
+ expect(Libvirt).to receive(:open).with('qemu:///system').and_return(system_connection1)
72
+ expect(Libvirt).to receive(:open).with('qemu:///system').and_return(system_connection2)
73
+
74
+ expect(machine.provider.driver.system_connection).to eq(system_connection1)
75
+ expect(machine2.provider.driver.system_connection).to eq(system_connection2)
76
+ end
77
+
78
+ it 'should configure the connection once' do
79
+ expect(Libvirt).to receive(:open).with('qemu:///system').and_return(system_connection1)
80
+
81
+ expect(machine.provider.driver.system_connection).to eq(system_connection1)
82
+ expect(machine.provider.driver.system_connection).to eq(system_connection1)
83
+ expect(machine.provider.driver.system_connection).to eq(system_connection1)
84
+ end
85
+ end
86
+
87
+ describe '#state' do
88
+ let(:domain) { double('domain') }
89
+
90
+ before do
91
+ allow(subject).to receive(:get_domain).and_return(domain)
92
+ end
93
+
94
+ [
95
+ [
96
+ 'not found',
97
+ :not_created,
98
+ {
99
+ :setup => ProcWithBinding.new do
100
+ expect(subject).to receive(:get_domain).and_return(nil)
101
+ end,
102
+ }
103
+ ],
104
+ [
105
+ 'libvirt error',
106
+ :not_created,
107
+ {
108
+ :setup => ProcWithBinding.new do
109
+ expect(subject).to receive(:get_domain).and_raise(Libvirt::RetrieveError, 'missing')
110
+ end,
111
+ }
112
+ ],
113
+ [
114
+ 'terminated',
115
+ :not_created,
116
+ {
117
+ :setup => ProcWithBinding.new do
118
+ expect(domain).to receive(:state).and_return('terminated')
119
+ end,
120
+ }
121
+ ],
122
+ [
123
+ 'no IP returned',
124
+ :inaccessible,
125
+ {
126
+ :setup => ProcWithBinding.new do
127
+ expect(domain).to receive(:state).and_return('running').twice()
128
+ expect(subject).to receive(:get_domain_ipaddress).and_raise(Fog::Errors::TimeoutError)
129
+ end,
130
+ }
131
+ ],
132
+ [
133
+ 'running',
134
+ :running,
135
+ {
136
+ :setup => ProcWithBinding.new do
137
+ expect(domain).to receive(:state).and_return('running').twice()
138
+ expect(subject).to receive(:get_domain_ipaddress).and_return('192.168.121.2')
139
+ end,
140
+ }
141
+ ],
142
+ ].each do |name, expected, options|
143
+ opts = {}
144
+ opts.merge!(options) if options
145
+
146
+ it "should handle '#{name}' by returning '#{expected}'" do
147
+ if !opts[:setup].nil?
148
+ opts[:setup].apply_binding(binding)
149
+ end
150
+
151
+ expect(subject.state(machine)).to eq(expected)
152
+ end
153
+ end
154
+ end
155
+ end
@@ -44,21 +44,25 @@
44
44
  <devices>
45
45
  <emulator>/usr/bin/kvm-spice</emulator>
46
46
  <disk type='file' device='disk'>
47
+ <alias name='ua-box-volume-0'/>
47
48
  <driver name='qemu' type='qcow2' cache='unsafe' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
48
49
  <source file='/var/lib/libvirt/images/test.qcow2'/>
49
50
  <target dev='vda' bus='ide'/>
50
51
  </disk>
51
52
  <disk type='file' device='disk'>
53
+ <alias name='ua-box-volume-1'/>
52
54
  <driver name='qemu' type='qcow2' cache='unsafe' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
53
55
  <source file='/var/lib/libvirt/images/test2.qcow2'/>
54
56
  <target dev='vdb' bus='ide'/>
55
57
  </disk>
56
58
  <disk type='file' device='disk'>
59
+ <alias name='ua-disk-volume-0'/>
57
60
  <driver name='qemu' type='qcow2' cache='default'/>
58
61
  <source file='/var/lib/libvirt/images/test-disk1.qcow2'/>
59
62
  <target dev='vdb' bus='virtio'/>
60
63
  </disk>
61
64
  <disk type='file' device='disk'>
65
+ <alias name='ua-disk-volume-1'/>
62
66
  <driver name='qemu' type='qcow2' cache='default' io='threads' copy_on_read='on' discard='unmap' detect_zeroes='on'/>
63
67
  <source file='/var/lib/libvirt/images/test-disk2.qcow2'/>
64
68
  <target dev='vdc' bus='virtio'/>
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'support/sharedcontext'
2
4
 
3
5
  require 'vagrant-libvirt/config'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  require 'vagrant-libvirt/util/byte_number'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-libvirt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lukas Stanek
@@ -11,50 +11,50 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-06-11 00:00:00.000000000 Z
14
+ date: 2021-10-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rspec-core
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - "~>"
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.5.0
22
+ version: '3.5'
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 3.5.0
29
+ version: '3.5'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec-expectations
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - "~>"
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 3.5.0
36
+ version: '3.5'
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - "~>"
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 3.5.0
43
+ version: '3.5'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: rspec-mocks
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - "~>"
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.5.0
50
+ version: '3.5'
51
51
  type: :development
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - "~>"
55
+ - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: 3.5.0
57
+ version: '3.5'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: simplecov
60
60
  requirement: !ruby/object:Gem::Requirement
@@ -197,6 +197,7 @@ files:
197
197
  - lib/vagrant-libvirt/action/set_boot_order.rb
198
198
  - lib/vagrant-libvirt/action/set_name_of_domain.rb
199
199
  - lib/vagrant-libvirt/action/share_folders.rb
200
+ - lib/vagrant-libvirt/action/shutdown_domain.rb
200
201
  - lib/vagrant-libvirt/action/start_domain.rb
201
202
  - lib/vagrant-libvirt/action/suspend_domain.rb
202
203
  - lib/vagrant-libvirt/action/wait_till_up.rb
@@ -234,6 +235,7 @@ files:
234
235
  - spec/support/libvirt_context.rb
235
236
  - spec/support/matchers/have_file_content.rb
236
237
  - spec/support/sharedcontext.rb
238
+ - spec/support/temporary_dir.rb
237
239
  - spec/unit/action/clean_machine_folder_spec.rb
238
240
  - spec/unit/action/create_domain_spec.rb
239
241
  - spec/unit/action/create_domain_spec/additional_disks_domain.xml
@@ -249,14 +251,19 @@ files:
249
251
  - spec/unit/action/forward_ports_spec.rb
250
252
  - spec/unit/action/halt_domain_spec.rb
251
253
  - spec/unit/action/handle_box_image_spec.rb
254
+ - spec/unit/action/package_domain_spec.rb
252
255
  - spec/unit/action/set_name_of_domain_spec.rb
256
+ - spec/unit/action/shutdown_domain_spec.rb
253
257
  - spec/unit/action/start_domain_spec.rb
254
258
  - spec/unit/action/start_domain_spec/clock_timer_rtc.xml
255
259
  - spec/unit/action/start_domain_spec/default.xml
256
260
  - spec/unit/action/start_domain_spec/default_added_tpm_path.xml
257
261
  - spec/unit/action/start_domain_spec/default_added_tpm_version.xml
262
+ - spec/unit/action/start_domain_spec/existing.xml
258
263
  - spec/unit/action/wait_till_up_spec.rb
264
+ - spec/unit/action_spec.rb
259
265
  - spec/unit/config_spec.rb
266
+ - spec/unit/driver_spec.rb
260
267
  - spec/unit/provider_spec.rb
261
268
  - spec/unit/templates/domain_all_settings.xml
262
269
  - spec/unit/templates/domain_custom_cpu_model.xml
@@ -284,46 +291,51 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
291
  - !ruby/object:Gem::Version
285
292
  version: '0'
286
293
  requirements: []
287
- rubyforge_project:
288
- rubygems_version: 2.7.11
294
+ rubygems_version: 3.0.9
289
295
  signing_key:
290
296
  specification_version: 4
291
297
  summary: libvirt provider for Vagrant.
292
298
  test_files:
293
- - spec/unit/action/start_domain_spec.rb
294
- - spec/unit/action/create_domain_spec.rb
295
- - spec/unit/action/forward_ports_spec.rb
296
- - spec/unit/action/wait_till_up_spec.rb
297
- - spec/unit/action/clean_machine_folder_spec.rb
298
- - spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_2.xml
299
+ - spec/support/matchers/have_file_content.rb
300
+ - spec/support/binding_proc.rb
301
+ - spec/support/environment_helper.rb
302
+ - spec/support/libvirt_context.rb
303
+ - spec/support/temporary_dir.rb
304
+ - spec/support/sharedcontext.rb
305
+ - spec/unit/action/create_domain_spec/default_system_storage_pool.xml
306
+ - spec/unit/action/create_domain_spec/default_user_storage_pool.xml
307
+ - spec/unit/action/create_domain_spec/additional_disks_domain.xml
308
+ - spec/unit/action/create_domain_spec/default_domain.xml
299
309
  - spec/unit/action/create_domain_volume_spec/one_disk_in_storage.xml
300
- - spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_1.xml
301
310
  - spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_0.xml
302
- - spec/unit/action/start_domain_spec/default_added_tpm_version.xml
311
+ - spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_1.xml
312
+ - spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_2.xml
303
313
  - spec/unit/action/start_domain_spec/clock_timer_rtc.xml
304
314
  - spec/unit/action/start_domain_spec/default.xml
305
315
  - spec/unit/action/start_domain_spec/default_added_tpm_path.xml
306
- - spec/unit/action/destroy_domain_spec.rb
307
- - spec/unit/action/create_domain_spec/default_system_storage_pool.xml
308
- - spec/unit/action/create_domain_spec/default_user_storage_pool.xml
309
- - spec/unit/action/create_domain_spec/additional_disks_domain.xml
310
- - spec/unit/action/create_domain_spec/default_domain.xml
316
+ - spec/unit/action/start_domain_spec/default_added_tpm_version.xml
317
+ - spec/unit/action/start_domain_spec/existing.xml
318
+ - spec/unit/action/clean_machine_folder_spec.rb
319
+ - spec/unit/action/forward_ports_spec.rb
311
320
  - spec/unit/action/handle_box_image_spec.rb
312
321
  - spec/unit/action/set_name_of_domain_spec.rb
313
- - spec/unit/action/halt_domain_spec.rb
322
+ - spec/unit/action/wait_till_up_spec.rb
314
323
  - spec/unit/action/create_domain_volume_spec.rb
315
- - spec/unit/config_spec.rb
316
- - spec/unit/util/byte_number_spec.rb
317
- - spec/unit/provider_spec.rb
318
- - spec/unit/templates/domain_defaults.xml
319
- - spec/unit/templates/domain_all_settings.xml
320
- - spec/unit/templates/domain_spec.rb
324
+ - spec/unit/action/start_domain_spec.rb
325
+ - spec/unit/action/destroy_domain_spec.rb
326
+ - spec/unit/action/halt_domain_spec.rb
327
+ - spec/unit/action/shutdown_domain_spec.rb
328
+ - spec/unit/action/create_domain_spec.rb
329
+ - spec/unit/action/package_domain_spec.rb
321
330
  - spec/unit/templates/tpm/version_1.2.xml
322
331
  - spec/unit/templates/tpm/version_2.0.xml
323
332
  - spec/unit/templates/domain_custom_cpu_model.xml
324
- - spec/support/libvirt_context.rb
325
- - spec/support/matchers/have_file_content.rb
326
- - spec/support/environment_helper.rb
327
- - spec/support/binding_proc.rb
328
- - spec/support/sharedcontext.rb
333
+ - spec/unit/templates/domain_defaults.xml
334
+ - spec/unit/templates/domain_spec.rb
335
+ - spec/unit/templates/domain_all_settings.xml
336
+ - spec/unit/util/byte_number_spec.rb
337
+ - spec/unit/provider_spec.rb
338
+ - spec/unit/action_spec.rb
339
+ - spec/unit/config_spec.rb
340
+ - spec/unit/driver_spec.rb
329
341
  - spec/spec_helper.rb