Class: DevLXC::CLI::Server

Inherits:
Thor
  • Object
show all
Defined in:
lib/dev-lxc/cli.rb

Instance Method Summary collapse

Instance Method Details

#abspath(name, rootfs_path) ⇒ Object



98
99
100
# File 'lib/dev-lxc/cli.rb', line 98

def abspath(name, rootfs_path)
  puts get_server(name, options[:config]).abspath(rootfs_path)
end

#destroy(name) ⇒ Object



125
126
127
128
129
130
131
# File 'lib/dev-lxc/cli.rb', line 125

def destroy(name)
  server = get_server(name, options[:config])
  server.destroy
  server.destroy_container(:unique) if options[:unique]
  server.destroy_container(:shared) if options[:shared]
  server.destroy_container(:platform) if options[:platform]
end

#run_command(name, command) ⇒ Object



104
105
106
# File 'lib/dev-lxc/cli.rb', line 104

def run_command(name, command)
  get_server(name, options[:config]).run_command(command)
end

#start(name) ⇒ Object



110
111
112
# File 'lib/dev-lxc/cli.rb', line 110

def start(name)
  get_server(name, options[:config]).start
end

#status(name) ⇒ Object



92
93
94
# File 'lib/dev-lxc/cli.rb', line 92

def status(name)
  get_server(name, options[:config]).status
end

#stop(name) ⇒ Object



116
117
118
# File 'lib/dev-lxc/cli.rb', line 116

def stop(name)
  get_server(name, options[:config]).stop
end