Class: OsCtld::ContainerControl::Commands::State::Frontend

Inherits:
Frontend
  • Object
show all
Defined in:
lib/osctld/container_control/commands/state.rb

Instance Attribute Summary

Attributes inherited from Frontend

#command_class, #ct

Instance Method Summary collapse

Methods inherited from Frontend

#initialize, #pipe_runner

Constructor Details

This class inherits a constructor from OsCtld::ContainerControl::Frontend

Instance Method Details

#executeContainerState

Returns:



12
13
14
15
16
17
18
19
20
# File 'lib/osctld/container_control/commands/state.rb', line 12

def execute
  ret = pipe_runner

  if ret.ok?
    ContainerState.new(ct.id, ret.data[:state].to_sym, ret.data[:init_pid])
  else
    ret
  end
end