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



90
91
92
# File 'lib/dev-lxc/cli.rb', line 90

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

#destroy(name) ⇒ Object



117
118
119
120
121
122
123
# File 'lib/dev-lxc/cli.rb', line 117

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

#run_command(name, command) ⇒ Object



96
97
98
# File 'lib/dev-lxc/cli.rb', line 96

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

#start(name) ⇒ Object



102
103
104
# File 'lib/dev-lxc/cli.rb', line 102

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

#status(name) ⇒ Object



84
85
86
# File 'lib/dev-lxc/cli.rb', line 84

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

#stop(name) ⇒ Object



108
109
110
# File 'lib/dev-lxc/cli.rb', line 108

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