jamie-lxc 0.0.1.alpha1 → 0.0.1.alpha2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "jamie-lxc"
3
- gem.version = "0.0.1.alpha1"
3
+ gem.version = "0.0.1.alpha2"
4
4
  gem.authors = ["Sean Porter"]
5
5
  gem.email = ["portertech@gmail.com"]
6
6
  gem.description = "LXC driver for Jamie"
@@ -24,7 +24,9 @@ module Jamie
24
24
  end
25
25
 
26
26
  def perform_destroy(instance, state)
27
- destroy_container(state)
27
+ if state["container_id"]
28
+ destroy_container(state)
29
+ end
28
30
  end
29
31
 
30
32
  protected
@@ -44,7 +46,7 @@ module Jamie
44
46
 
45
47
  def container_ip(state)
46
48
  if ::File.exists?(config["dhcp_lease_file"])
47
- 10.times do
49
+ 20.times do
48
50
  leases = ::File.readlines(config["dhcp_lease_file"]).map{ |line| line.split(" ") }
49
51
  leases.each do |lease|
50
52
  if lease.include?(state["container_id"])
@@ -9,10 +9,10 @@ describe Jamie::Driver::Lxc do
9
9
  suite = Jamie::Suite.new("name" => "test", "run_list" => Array.new)
10
10
  config = {
11
11
  "jamie_root" => File.dirname(__FILE__),
12
- "base_container" => "iac-testing"
12
+ "base_container" => "ubuntu-1204"
13
13
  }
14
- driver = Jamie::Driver::LXC.new(config)
15
- platform = Jamie::Platform.new("name" => "ubuntu-12.04", "driver" => driver)
14
+ driver = Jamie::Driver::Lxc.new(config)
15
+ platform = Jamie::Platform.new("name" => "ubuntu-1204", "driver" => driver)
16
16
  @instance = Jamie::Instance.new(suite, platform)
17
17
  end
18
18
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jamie-lxc
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.0.1.alpha1
5
+ version: 0.0.1.alpha2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Porter