testlab 1.6.5 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/testlab/container/clone.rb +18 -18
- data/lib/testlab/version.rb +1 -1
- metadata +4 -4
@@ -11,9 +11,7 @@ class TestLab
|
|
11
11
|
def ephemeral
|
12
12
|
@ui.logger.debug { "Container Ephemeral: #{self.id}" }
|
13
13
|
|
14
|
-
|
15
|
-
is_persistent? and self.to_ephemeral
|
16
|
-
end
|
14
|
+
is_persistent? and self.to_ephemeral
|
17
15
|
|
18
16
|
true
|
19
17
|
end
|
@@ -26,9 +24,7 @@ class TestLab
|
|
26
24
|
def persistent
|
27
25
|
@ui.logger.debug { "Container Persistent: #{self.id}" }
|
28
26
|
|
29
|
-
|
30
|
-
is_ephemeral? and self.to_persistent
|
31
|
-
end
|
27
|
+
is_ephemeral? and self.to_persistent
|
32
28
|
|
33
29
|
true
|
34
30
|
end
|
@@ -92,14 +88,16 @@ class TestLab
|
|
92
88
|
if self.is_ephemeral?
|
93
89
|
self_state = self.state
|
94
90
|
|
95
|
-
|
91
|
+
please_wait(:ui => @ui, :message => format_object_action(self, 'Persistent', :yellow)) do
|
92
|
+
configure
|
96
93
|
|
97
|
-
|
98
|
-
|
94
|
+
self.lxc.stop
|
95
|
+
self.lxc.destroy(%(-f))
|
99
96
|
|
100
|
-
|
101
|
-
|
102
|
-
|
97
|
+
self.lxc_clone.stop
|
98
|
+
self.lxc_clone.clone(%W(-o #{self.lxc_clone.name} -n #{self.lxc.name}))
|
99
|
+
self.lxc_clone.destroy(%(-f))
|
100
|
+
end
|
103
101
|
|
104
102
|
# bring our container back online if it was running before the operation
|
105
103
|
(self_state == :running) and self.up
|
@@ -118,14 +116,16 @@ class TestLab
|
|
118
116
|
if self.is_persistent?
|
119
117
|
self_state = self.state
|
120
118
|
|
121
|
-
|
119
|
+
please_wait(:ui => @ui, :message => format_object_action(self, 'Ephemeral', :yellow)) do
|
120
|
+
configure
|
122
121
|
|
123
|
-
|
124
|
-
|
122
|
+
self.lxc_clone.stop
|
123
|
+
self.lxc_clone.destroy(%(-f))
|
125
124
|
|
126
|
-
|
127
|
-
|
128
|
-
|
125
|
+
self.lxc.stop
|
126
|
+
self.lxc.clone(%W(-o #{self.lxc.name} -n #{self.lxc_clone.name}))
|
127
|
+
self.lxc.destroy(%(-f))
|
128
|
+
end
|
129
129
|
|
130
130
|
# bring our container back online if it was running before the operation
|
131
131
|
(self_state == :running) and self.up
|
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: 1.6.
|
4
|
+
version: 1.6.6
|
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-09-
|
12
|
+
date: 2013-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gli
|
@@ -342,7 +342,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
342
342
|
version: '0'
|
343
343
|
segments:
|
344
344
|
- 0
|
345
|
-
hash: -
|
345
|
+
hash: -673687854564395917
|
346
346
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
347
|
none: false
|
348
348
|
requirements:
|
@@ -351,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
351
|
version: '0'
|
352
352
|
segments:
|
353
353
|
- 0
|
354
|
-
hash: -
|
354
|
+
hash: -673687854564395917
|
355
355
|
requirements: []
|
356
356
|
rubyforge_project:
|
357
357
|
rubygems_version: 1.8.25
|