Class: Serverspec::Type::Lxc

Inherits:
Base
  • Object
show all
Defined in:
lib/serverspec/type/lxc.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_ary

Constructor Details

This class inherits a constructor from Serverspec::Type::Base

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)

4
5
6
# File 'lib/serverspec/type/lxc.rb', line 4

def exists?
  backend.check_container(@name)
end

#running?Boolean

Returns:

  • (Boolean)

8
9
10
# File 'lib/serverspec/type/lxc.rb', line 8

def running?
  backend.check_container_running(@name)
end

#to_sObject


12
13
14
# File 'lib/serverspec/type/lxc.rb', line 12

def to_s
  'LXC'
end