vagrant-libvirt 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-libvirt/config.rb +5 -1
- data/lib/vagrant-libvirt/driver.rb +8 -0
- data/lib/vagrant-libvirt/version +1 -1
- data/spec/unit/config_spec.rb +10 -2
- metadata +83 -83
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc3627a71dd23c32f8d77edb048c8474a20ba22b246094e5c3dba262caafbc29
|
4
|
+
data.tar.gz: 13ce97959c1b9bc4eec366210029650594d90ba2e8dd77631bb2b46c35c5b563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2467782410df4eac4183c9bcebf63338d82184c95ab26d935e48bdde1e9aef0833b359cee28b7965e9acb1ebcf2100779cd650149dd952fa459effdd7f4a762e
|
7
|
+
data.tar.gz: a595c46f61681c4ba4ef5308efcd707a028f3b336b97f12e74e194edc0cdf1839a1c636edbf81a277eb6e4b5030335eff3de182513d8a777f37ba0baa6573c4f
|
@@ -1213,7 +1213,11 @@ module VagrantPlugins
|
|
1213
1213
|
|
1214
1214
|
def host_devices(machine)
|
1215
1215
|
@host_devices ||= begin
|
1216
|
-
|
1216
|
+
(
|
1217
|
+
machine.provider.driver.list_host_devices.map { |iface| iface.name } +
|
1218
|
+
machine.provider.driver.list_networks.map { |net| net.bridge_name }
|
1219
|
+
).uniq.select do |dev|
|
1220
|
+
next if dev.empty?
|
1217
1221
|
dev != "lo" && !@host_device_exclude_prefixes.any? { |exclude| dev.start_with?(exclude) }
|
1218
1222
|
end
|
1219
1223
|
end
|
@@ -201,6 +201,14 @@ module VagrantPlugins
|
|
201
201
|
state
|
202
202
|
end
|
203
203
|
|
204
|
+
def list_host_devices
|
205
|
+
@connection.client.list_all_interfaces
|
206
|
+
end
|
207
|
+
|
208
|
+
def list_networks
|
209
|
+
@connection.client.list_all_networks
|
210
|
+
end
|
211
|
+
|
204
212
|
private
|
205
213
|
|
206
214
|
def get_ipaddress_from_system(mac)
|
data/lib/vagrant-libvirt/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.2
|
data/spec/unit/config_spec.rb
CHANGED
@@ -640,12 +640,20 @@ describe VagrantPlugins::ProviderLibvirt::Config do
|
|
640
640
|
instance_double(Libvirt::Interface),
|
641
641
|
instance_double(Libvirt::Interface),
|
642
642
|
] }
|
643
|
+
let(:libvirt_networks) { [
|
644
|
+
instance_double(Libvirt::Network),
|
645
|
+
instance_double(Libvirt::Network),
|
646
|
+
] }
|
647
|
+
let(:driver) { instance_double(::VagrantPlugins::ProviderLibvirt::Driver) }
|
643
648
|
before do
|
644
649
|
machine.config.vm.network :public_network, dev: 'eth0', ip: "192.168.2.157"
|
645
|
-
|
646
|
-
expect(
|
650
|
+
allow(machine.provider).to receive(:driver).and_return(driver)
|
651
|
+
expect(driver).to receive(:list_host_devices).and_return(host_devices)
|
652
|
+
expect(driver).to receive(:list_networks).and_return(libvirt_networks)
|
647
653
|
expect(host_devices[0]).to receive(:name).and_return('eth0')
|
648
654
|
expect(host_devices[1]).to receive(:name).and_return('virbr0')
|
655
|
+
expect(libvirt_networks[0]).to receive(:bridge_name).and_return('')
|
656
|
+
expect(libvirt_networks[1]).to receive(:bridge_name).and_return('virbr0')
|
649
657
|
end
|
650
658
|
|
651
659
|
it 'should validate use of existing device' do
|
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-libvirt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Stanek
|
8
8
|
- Dima Vasilets
|
9
9
|
- Brian Pitts
|
10
10
|
- Darragh Bailey
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-08-
|
14
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: fog-libvirt
|
@@ -319,7 +319,7 @@ licenses:
|
|
319
319
|
- MIT
|
320
320
|
metadata:
|
321
321
|
source_code_uri: https://github.com/vagrant-libvirt/vagrant-libvirt
|
322
|
-
post_install_message:
|
322
|
+
post_install_message:
|
323
323
|
rdoc_options: []
|
324
324
|
require_paths:
|
325
325
|
- lib
|
@@ -335,96 +335,96 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
335
|
version: '0'
|
336
336
|
requirements: []
|
337
337
|
rubygems_version: 3.0.9
|
338
|
-
signing_key:
|
338
|
+
signing_key:
|
339
339
|
specification_version: 4
|
340
340
|
summary: libvirt provider for Vagrant.
|
341
341
|
test_files:
|
342
|
+
- spec/acceptance/package_domain_spec.rb
|
343
|
+
- spec/acceptance/provider_settings_spec.rb
|
344
|
+
- spec/acceptance/two_disks_spec.rb
|
345
|
+
- spec/acceptance/additional_storage_spec.rb
|
346
|
+
- spec/acceptance/support-skeletons/package_complex/Vagrantfile.testbox
|
347
|
+
- spec/acceptance/support-skeletons/package_complex/scripts/sysprep.sh
|
348
|
+
- spec/acceptance/support-skeletons/package_simple/Vagrantfile.testbox
|
349
|
+
- spec/acceptance/simple_vm_provision_via_shell_spec.rb
|
350
|
+
- spec/acceptance/snapshots_spec.rb
|
351
|
+
- spec/acceptance/use_qemu_agent_for_connectivity_spec.rb
|
352
|
+
- spec/support/matchers/have_file_content.rb
|
353
|
+
- spec/support/binding_proc.rb
|
354
|
+
- spec/support/acceptance/context.rb
|
355
|
+
- spec/support/acceptance/configuration.rb
|
356
|
+
- spec/support/acceptance/isolated_environment.rb
|
357
|
+
- spec/support/environment_helper.rb
|
358
|
+
- spec/support/libvirt_context.rb
|
359
|
+
- spec/support/temporary_dir.rb
|
360
|
+
- spec/support/libvirt_acceptance_context.rb
|
361
|
+
- spec/support/sharedcontext.rb
|
342
362
|
- spec/unit/config_spec.rb
|
343
363
|
- spec/unit/action_spec.rb
|
344
|
-
- spec/unit/
|
345
|
-
- spec/unit/
|
346
|
-
- spec/unit/
|
347
|
-
- spec/unit/
|
348
|
-
- spec/unit/
|
349
|
-
- spec/unit/
|
350
|
-
- spec/unit/
|
351
|
-
- spec/unit/
|
352
|
-
- spec/unit/
|
353
|
-
- spec/unit/
|
354
|
-
- spec/unit/
|
355
|
-
- spec/unit/
|
356
|
-
- spec/unit/
|
357
|
-
- spec/unit/
|
358
|
-
- spec/unit/
|
359
|
-
- spec/unit/
|
360
|
-
- spec/unit/action/start_domain_spec/nvram_domain_removed.xml
|
361
|
-
- spec/unit/action/start_domain_spec/default.xml
|
362
|
-
- spec/unit/action/start_domain_spec/default_added_tpm_version.xml
|
363
|
-
- spec/unit/action/start_domain_spec/nvram_domain_other_setting.xml
|
364
|
-
- spec/unit/action/start_domain_spec/clock_timer_rtc.xml
|
365
|
-
- spec/unit/action/start_domain_spec/clock_timer_removed.xml
|
366
|
-
- spec/unit/action/start_domain_spec/clock_timer_rtc_tsc.xml
|
367
|
-
- spec/unit/action/start_domain_spec/nvram_domain.xml
|
368
|
-
- spec/unit/action/start_domain_spec/default_added_tpm_path.xml
|
369
|
-
- spec/unit/action/start_domain_spec/existing_added_nvram.xml
|
370
|
-
- spec/unit/action/prepare_nfs_settings_spec.rb
|
364
|
+
- spec/unit/cap/synced_folder_9p_spec.rb
|
365
|
+
- spec/unit/cap/synced_folder_virtiofs_spec.rb
|
366
|
+
- spec/unit/plugin_spec.rb
|
367
|
+
- spec/unit/driver_spec.rb
|
368
|
+
- spec/unit/templates/domain_custom_cpu_model.xml
|
369
|
+
- spec/unit/templates/domain_all_settings.xml
|
370
|
+
- spec/unit/templates/domain_spec.rb
|
371
|
+
- spec/unit/templates/domain_defaults.xml
|
372
|
+
- spec/unit/templates/domain_scsi_multiple_controllers_storage.xml
|
373
|
+
- spec/unit/templates/domain_cpu_mode_passthrough.xml
|
374
|
+
- spec/unit/templates/domain_scsi_bus_storage.xml
|
375
|
+
- spec/unit/templates/domain_scsi_device_storage.xml
|
376
|
+
- spec/unit/templates/tpm/version_1.2.xml
|
377
|
+
- spec/unit/templates/tpm/version_2.0.xml
|
378
|
+
- spec/unit/util/byte_number_spec.rb
|
379
|
+
- spec/unit/util/resolvers_spec.rb
|
371
380
|
- spec/unit/action/package_domain_spec.rb
|
372
|
-
- spec/unit/action/handle_box_image_spec.rb
|
373
|
-
- spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_0.xml
|
374
381
|
- spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_1.xml
|
375
|
-
- spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_2.xml
|
376
382
|
- spec/unit/action/create_domain_volume_spec/one_disk_in_storage.xml
|
377
|
-
- spec/unit/action/
|
378
|
-
- spec/unit/action/
|
383
|
+
- spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_2.xml
|
384
|
+
- spec/unit/action/create_domain_volume_spec/three_disks_in_storage_disk_0.xml
|
379
385
|
- spec/unit/action/destroy_domain_spec.rb
|
380
|
-
- spec/unit/action/wait_till_up_spec.rb
|
381
|
-
- spec/unit/action/create_domain_volume_spec.rb
|
382
|
-
- spec/unit/action/halt_domain_spec.rb
|
383
386
|
- spec/unit/action/set_name_of_domain_spec.rb
|
384
|
-
- spec/unit/action/resolve_disk_settings_spec.rb
|
385
387
|
- spec/unit/action/remove_libvirt_image_spec.rb
|
386
|
-
- spec/unit/action/
|
387
|
-
- spec/unit/action/create_domain_spec/
|
388
|
-
- spec/unit/action/create_domain_spec/two_disk_settings.xml
|
389
|
-
- spec/unit/action/create_domain_spec/default_user_storage_pool.xml
|
390
|
-
- spec/unit/action/create_domain_spec/sysinfo_only_required.xml
|
388
|
+
- spec/unit/action/halt_domain_spec.rb
|
389
|
+
- spec/unit/action/create_domain_spec/additional_disks_domain.xml
|
391
390
|
- spec/unit/action/create_domain_spec/default_domain.xml
|
392
391
|
- spec/unit/action/create_domain_spec/sysinfo.xml
|
393
|
-
- spec/unit/action/create_domain_spec/
|
394
|
-
- spec/unit/
|
395
|
-
- spec/unit/
|
396
|
-
- spec/unit/
|
397
|
-
- spec/unit/
|
398
|
-
- spec/unit/
|
399
|
-
- spec/unit/
|
400
|
-
- spec/unit/
|
401
|
-
- spec/unit/
|
402
|
-
- spec/unit/
|
403
|
-
- spec/unit/
|
404
|
-
- spec/unit/
|
405
|
-
- spec/unit/
|
406
|
-
- spec/unit/
|
407
|
-
- spec/unit/
|
408
|
-
- spec/unit/
|
409
|
-
- spec/unit/
|
410
|
-
- spec/
|
411
|
-
- spec/
|
412
|
-
- spec/
|
413
|
-
- spec/
|
414
|
-
- spec/
|
415
|
-
- spec/
|
416
|
-
- spec/
|
417
|
-
- spec/
|
418
|
-
- spec/
|
419
|
-
- spec/
|
420
|
-
- spec/
|
421
|
-
- spec/
|
422
|
-
- spec/
|
423
|
-
- spec/
|
424
|
-
- spec/
|
425
|
-
- spec/
|
426
|
-
- spec/
|
427
|
-
- spec/
|
428
|
-
- spec/
|
429
|
-
- spec/
|
392
|
+
- spec/unit/action/create_domain_spec/default_user_storage_pool.xml
|
393
|
+
- spec/unit/action/create_domain_spec/custom_disk_settings.xml
|
394
|
+
- spec/unit/action/create_domain_spec/sysinfo_only_required.xml
|
395
|
+
- spec/unit/action/create_domain_spec/two_disk_settings.xml
|
396
|
+
- spec/unit/action/create_domain_volume_spec.rb
|
397
|
+
- spec/unit/action/resolve_disk_settings_spec/default_domain.xml
|
398
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box.xml
|
399
|
+
- spec/unit/action/resolve_disk_settings_spec/default_no_aliases.xml
|
400
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_storage.xml
|
401
|
+
- spec/unit/action/resolve_disk_settings_spec/multi_volume_box_additional_and_custom_no_aliases.xml
|
402
|
+
- spec/unit/action/resolve_disk_settings_spec/default_system_storage_pool.xml
|
403
|
+
- spec/unit/action/handle_box_image_spec.rb
|
404
|
+
- spec/unit/action/wait_till_up_spec.rb
|
405
|
+
- spec/unit/action/cleanup_on_failure_spec.rb
|
406
|
+
- spec/unit/action/clean_machine_folder_spec.rb
|
407
|
+
- spec/unit/action/resolve_disk_settings_spec.rb
|
408
|
+
- spec/unit/action/start_domain_spec.rb
|
409
|
+
- spec/unit/action/start_domain_spec/default_added_tpm_path.xml
|
410
|
+
- spec/unit/action/start_domain_spec/nvram_domain.xml
|
411
|
+
- spec/unit/action/start_domain_spec/default_added_tpm_version.xml
|
412
|
+
- spec/unit/action/start_domain_spec/default.xml
|
413
|
+
- spec/unit/action/start_domain_spec/clock_timer_rtc_tsc.xml
|
414
|
+
- spec/unit/action/start_domain_spec/nvram_domain_removed.xml
|
415
|
+
- spec/unit/action/start_domain_spec/nvram_domain_other_setting.xml
|
416
|
+
- spec/unit/action/start_domain_spec/clock_timer_removed.xml
|
417
|
+
- spec/unit/action/start_domain_spec/existing_added_nvram.xml
|
418
|
+
- spec/unit/action/start_domain_spec/clock_timer_rtc.xml
|
419
|
+
- spec/unit/action/start_domain_spec/existing.xml
|
420
|
+
- spec/unit/action/destroy_domain_spec/additional_disks_domain.xml
|
421
|
+
- spec/unit/action/destroy_domain_spec/box_multiple_disks.xml
|
422
|
+
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_and_custom_disks_no_aliases.xml
|
423
|
+
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_disks.xml
|
424
|
+
- spec/unit/action/destroy_domain_spec/box_multiple_disks_and_additional_and_custom_disks.xml
|
425
|
+
- spec/unit/action/destroy_domain_spec/cdrom_domain.xml
|
426
|
+
- spec/unit/action/create_domain_spec.rb
|
427
|
+
- spec/unit/action/prepare_nfs_settings_spec.rb
|
428
|
+
- spec/unit/action/shutdown_domain_spec.rb
|
429
|
+
- spec/unit/action/forward_ports_spec.rb
|
430
430
|
- spec/spec_helper.rb
|