kitchen-libvirtlxc 0.3.0 → 0.4.0

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.
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "kitchen-libvirtlxc"
4
- spec.version = "0.3.0"
4
+ spec.version = "0.4.0"
5
5
  spec.authors = ["Adam Jacob"]
6
6
  spec.email = ["adam@opscode.com"]
7
7
  spec.description = %q{Kitchen driver for libvirt LXC containers}
@@ -60,17 +60,9 @@ module Kitchen
60
60
 
61
61
  def wait_for_lease(container_id)
62
62
  info("Determining mac address...")
63
- mac_address = nil
64
- ip_address = nil
65
- File.open("/etc/libvirt/lxc/#{container_id}.xml", "r") do |xml|
66
- xml.each_line do |line|
67
- if line =~ /mac address='(.+)'/
68
- mac_address = $1
69
- break
70
- end
71
- end
72
- end
63
+ mac_address = run_command("grep 'mac address' /etc/libvirt/lxc/#{container_id}.xml | cut -d \"'\" -f 2").chomp!
73
64
  info("Mac addresss: #{mac_address}")
65
+ ip_address = nil
74
66
 
75
67
  tries = 30
76
68
  while ip_address == nil && tries > 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-libvirtlxc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: -4037651048193103984
92
+ hash: -3978350856700286560
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  segments:
100
100
  - 0
101
- hash: -4037651048193103984
101
+ hash: -3978350856700286560
102
102
  requirements: []
103
103
  rubyforge_project:
104
104
  rubygems_version: 1.8.25