lib/testlab/container/status.rb in testlab-1.4.4 vs lib/testlab/container/status.rb in testlab-1.5.0
- old
+ new
@@ -68,25 +68,29 @@
#
# What state the container is in.
#
# @return [Symbol] A symbol indicating the state of the container.
def state
- if self.lxc_clone.exists?
- self.lxc_clone.state
+ if self.node.dead?
+ :unknown
else
self.lxc.state
end
end
# Container Mode
#
# What mode the container is in.
# @return [Symbol] A symbol indicating the mode of the container.
def mode
- if self.lxc_clone.exists?
- :ephemeral
+ if self.node.dead?
+ :unknown
else
- :persistent
+ if self.is_ephemeral?
+ :ephemeral
+ else
+ :persistent
+ end
end
end
end