Class: DevLXC::CLI::Server
- Inherits:
-
Thor
- Object
- Thor
- DevLXC::CLI::Server
- Defined in:
- lib/dev-lxc/cli.rb
Instance Method Summary collapse
- #abspath(name, rootfs_path) ⇒ Object
- #destroy(name) ⇒ Object
- #run_command(name, command) ⇒ Object
- #start(name) ⇒ Object
- #status(name) ⇒ Object
- #stop(name) ⇒ Object
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, [: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, [:config]) server.destroy server.destroy_container(:unique) if [:unique] server.destroy_container(:shared) if [:shared] server.destroy_container(:platform) if [: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, [: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, [:config]).start end |
#status(name) ⇒ Object
92 93 94 |
# File 'lib/dev-lxc/cli.rb', line 92 def status(name) get_server(name, [:config]).status end |
#stop(name) ⇒ Object
116 117 118 |
# File 'lib/dev-lxc/cli.rb', line 116 def stop(name) get_server(name, [:config]).stop end |