diff options
author | Philip Hands <phil@hands.com> | 2016-06-10 09:18:18 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2016-06-10 11:22:01 +0200 |
commit | 012cc4bf7e20d7a60191c1221a39d99046363cec (patch) | |
tree | c6915f6c3baefac3e741e5ad10f9ad5e3cf723af /cucumber/features/support | |
parent | 67ebfb43d4c95a915b1bdc24d6dd4429dfa1e380 (diff) | |
download | jenkins.debian.net-012cc4bf7e20d7a60191c1221a39d99046363cec.tar.xz |
lvc: job-specific net name, and don't hardwire UUID
Diffstat (limited to 'cucumber/features/support')
-rw-r--r-- | cucumber/features/support/config.rb | 4 | ||||
-rw-r--r-- | cucumber/features/support/helpers/vm_helper.rb | 11 | ||||
-rw-r--r-- | cucumber/features/support/hooks.rb | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/cucumber/features/support/config.rb b/cucumber/features/support/config.rb index 2d13abdd..33380bb0 100644 --- a/cucumber/features/support/config.rb +++ b/cucumber/features/support/config.rb @@ -68,8 +68,8 @@ PATIENCE = ENV['PATIENCE'] || 1 CONFIGURED_KEYSERVER_HOSTNAME = 'hkps.pool.sks-keyservers.net' LIBVIRT_DOMAIN_NAME = "lvcVM-" + JOB_NAME #LIBVIRT_DOMAIN_UUID = "203552d5-819c-41f3-800e-2c8ef2546%03d" % $executor_number -LIBVIRT_NETWORK_NAME = "DebianToasterNet" -LIBVIRT_NETWORK_UUID = "f2305af3-2a64-4f16-afe6-b9dbf02a597e" +LIBVIRT_NETWORK_NAME = "lvcNET" +#LIBVIRT_NETWORK_UUID = "f2305af3-2a64-4f16-afe6-b9dbf02a597e" MISC_FILES_DIR = "/srv/jenkins/cucumber/features/misc_files" SERVICES_EXPECTED_ON_ALL_IFACES = [ diff --git a/cucumber/features/support/helpers/vm_helper.rb b/cucumber/features/support/helpers/vm_helper.rb index 3f172136..dd8ce936 100644 --- a/cucumber/features/support/helpers/vm_helper.rb +++ b/cucumber/features/support/helpers/vm_helper.rb @@ -15,8 +15,15 @@ class VMNet rexml = REXML::Document.new(net_xml) rexml.elements['network'].add_element('name') rexml.elements['network/name'].text = @net_name - rexml.elements['network'].add_element('uuid') - rexml.elements['network/uuid'].text = LIBVIRT_NETWORK_UUID + # PGH + begin + old_net = @virt.lookup_network_by_name(@net_name) + rexml.elements['network'].add_element('uuid') + rexml.elements['network/uuid'].text = old_net.uuid + old_net.undefine + rescue + end + update(rexml.to_s) update(rexml.to_s) rescue Exception => e destroy_and_undefine diff --git a/cucumber/features/support/hooks.rb b/cucumber/features/support/hooks.rb index 684861f6..cad7fb75 100644 --- a/cucumber/features/support/hooks.rb +++ b/cucumber/features/support/hooks.rb @@ -105,7 +105,7 @@ at_exit do VM.remove_all_snapshots $vmstorage.clear_pool end - $vmnet.destroy_and_undefine + #$vmnet.destroy_and_undefine $virt.close end # The artifacts directory is empty (and useless) if it contains |