lib/testlab/container/status.rb in testlab-1.22.3 vs lib/testlab/container/status.rb in testlab-1.22.4
- old
+ new
@@ -39,9 +39,18 @@
self.domain ||= self.node.domain
[self.id, self.domain].join('.')
end
+ # Container Alive?
+ #
+ # Is the container alive and running?
+ #
+ # @return [Boolean] True if the container is running; False otherwise.
+ def alive?
+ (self.state == :running)
+ end
+
# Container Status
#
# Returns a hash of status information for the container.
#
# @return [Hash] A hash of status information for the container.