testlab 0.4.14 → 0.4.15
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.
- data/lib/testlab/container.rb +4 -1
- data/lib/testlab/container/actions.rb +8 -2
- data/lib/testlab/container/lxc.rb +1 -0
- data/lib/testlab/version.rb +1 -1
- metadata +2 -8
data/lib/testlab/container.rb
CHANGED
@@ -101,7 +101,10 @@ class TestLab
|
|
101
101
|
attribute :release, :default => 'precise'
|
102
102
|
attribute :arch
|
103
103
|
|
104
|
-
|
104
|
+
# Instructs ephemeral containers to persist; otherwise tmpfs will be used
|
105
|
+
# as the backend store for ephemeral containers.
|
106
|
+
# NOTE: tmpfs is very memory intensive and is disabled by default.
|
107
|
+
attribute :persist, :default => true
|
105
108
|
|
106
109
|
|
107
110
|
def initialize(*args)
|
@@ -108,7 +108,7 @@ class TestLab
|
|
108
108
|
true
|
109
109
|
end
|
110
110
|
|
111
|
-
# Clone the
|
111
|
+
# Clone the container
|
112
112
|
#
|
113
113
|
# Prepares the container, if needed, for ephemeral cloning and clones it.
|
114
114
|
#
|
@@ -122,7 +122,13 @@ class TestLab
|
|
122
122
|
self.to_ephemeral
|
123
123
|
|
124
124
|
self.node.ssh.exec(%(sudo arp --verbose --delete #{self.ip}), :ignore_exit_status => true)
|
125
|
-
|
125
|
+
|
126
|
+
ephemeral_arguments = Array.new
|
127
|
+
ephemeral_arguments << %W(-o #{self.lxc_clone.name} -n #{self.lxc.name} -d)
|
128
|
+
ephemeral_arguments << %W(--keep-data) if self.persist
|
129
|
+
ephemeral_arguments = ephemeral_arguments.flatten.compact
|
130
|
+
|
131
|
+
self.lxc_clone.start_ephemeral(ephemeral_arguments)
|
126
132
|
end
|
127
133
|
|
128
134
|
true
|
data/lib/testlab/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testlab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gli
|
@@ -280,18 +280,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
280
280
|
- - ! '>='
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '0'
|
283
|
-
segments:
|
284
|
-
- 0
|
285
|
-
hash: 3957733017410581282
|
286
283
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
284
|
none: false
|
288
285
|
requirements:
|
289
286
|
- - ! '>='
|
290
287
|
- !ruby/object:Gem::Version
|
291
288
|
version: '0'
|
292
|
-
segments:
|
293
|
-
- 0
|
294
|
-
hash: 3957733017410581282
|
295
289
|
requirements: []
|
296
290
|
rubyforge_project:
|
297
291
|
rubygems_version: 1.8.25
|