testlab 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/testlab/container/status.rb +13 -1
- data/lib/testlab/container.rb +1 -1
- data/lib/testlab/version.rb +1 -1
- metadata +3 -3
@@ -53,7 +53,7 @@ class TestLab
|
|
53
53
|
|
54
54
|
{
|
55
55
|
:id => self.id,
|
56
|
-
:
|
56
|
+
:mode => self.mode,
|
57
57
|
:fqdn => self.fqdn,
|
58
58
|
:state => self.state,
|
59
59
|
:distro => self.distro,
|
@@ -73,6 +73,18 @@ class TestLab
|
|
73
73
|
self.lxc.state
|
74
74
|
end
|
75
75
|
|
76
|
+
# Container Mode
|
77
|
+
#
|
78
|
+
# What mode the container is in.
|
79
|
+
# @return [Symbol] A symbol indicating the mode of the container.
|
80
|
+
def mode
|
81
|
+
if self.lxc_clone.exists?
|
82
|
+
:ephemeral
|
83
|
+
else
|
84
|
+
:persistent
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
76
88
|
end
|
77
89
|
|
78
90
|
end
|
data/lib/testlab/container.rb
CHANGED
@@ -72,7 +72,7 @@ class TestLab
|
|
72
72
|
# An array of symbols of the various keys in our status hash.
|
73
73
|
#
|
74
74
|
# @see TestLab::Container::Status
|
75
|
-
STATUS_KEYS = %w(id node_id
|
75
|
+
STATUS_KEYS = %w(id node_id mode fqdn state distro release interfaces provisioners).map(&:to_sym)
|
76
76
|
|
77
77
|
# Sub-Modules
|
78
78
|
autoload :Actions, 'testlab/container/actions'
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -339,7 +339,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
339
339
|
version: '0'
|
340
340
|
segments:
|
341
341
|
- 0
|
342
|
-
hash:
|
342
|
+
hash: 4032847501508074403
|
343
343
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
344
344
|
none: false
|
345
345
|
requirements:
|
@@ -348,7 +348,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
348
348
|
version: '0'
|
349
349
|
segments:
|
350
350
|
- 0
|
351
|
-
hash:
|
351
|
+
hash: 4032847501508074403
|
352
352
|
requirements: []
|
353
353
|
rubyforge_project:
|
354
354
|
rubygems_version: 1.8.25
|