Class: OsCtld::Container::Adaptor::Base

Inherits:
Object
  • Object
show all
Includes:
OsCtl::Lib::Utils::Log
Defined in:
lib/osctld/container/adaptors/base.rb

Direct Known Subclasses

CGroup

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ct, config) ⇒ Base

Returns a new instance of Base.

Parameters:

  • ct (Container)
  • config (Hash)

    container config



11
12
13
14
# File 'lib/osctld/container/adaptors/base.rb', line 11

def initialize(ct, config)
  @ct = ct
  @config = config
end

Instance Attribute Details

#configObject (readonly, protected)

Returns the value of attribute config.



27
28
29
# File 'lib/osctld/container/adaptors/base.rb', line 27

def config
  @config
end

#ctObject (readonly, protected)

Returns the value of attribute ct.



27
28
29
# File 'lib/osctld/container/adaptors/base.rb', line 27

def ct
  @ct
end

Class Method Details

.register(name) ⇒ Object



3
4
5
# File 'lib/osctld/container/adaptors/base.rb', line 3

def self.register(name)
  Container::Adaptor.register(name, self)
end

Instance Method Details

#adaptHash

Returns adapted config.

Returns:

  • (Hash)

    adapted config



17
18
19
# File 'lib/osctld/container/adaptors/base.rb', line 17

def adapt
  config
end

#log_typeObject



21
22
23
# File 'lib/osctld/container/adaptors/base.rb', line 21

def log_type
  ct.log_type
end