Class: Smartdc::Cli::MachineSnapshot
- Inherits:
-
Thor
- Object
- Thor
- Smartdc::Cli::MachineSnapshot
show all
- Includes:
- Smartdc::CliHelper
- Defined in:
- lib/smartdc/cli/machine/snapshot.rb
Instance Method Summary
collapse
#describe, #horizontal, #output, #use_machine, #vertical
Instance Method Details
#add(name) ⇒ Object
21
22
23
24
|
# File 'lib/smartdc/cli/machine/snapshot.rb', line 21
def add(name)
id = use_machine(options['id'])
output Smartdc.create_machine_snapshot(id, {name: name}), options.merge(table: :vertical)
end
|
#destroy(name) ⇒ Object
27
28
29
30
|
# File 'lib/smartdc/cli/machine/snapshot.rb', line 27
def destroy(name)
id = use_machine(options['id'])
output Smartdc.destroy_machine_snapshot(id, name), options.merge(message: "Destroy [#{name}] of machine snapshot.")
end
|
#list ⇒ Object
9
10
11
12
|
# File 'lib/smartdc/cli/machine/snapshot.rb', line 9
def list
id = use_machine(options['id'])
output Smartdc.machine_snapshots(id), options.merge(table: :horizontal)
end
|
#show(name) ⇒ Object
15
16
17
18
|
# File 'lib/smartdc/cli/machine/snapshot.rb', line 15
def show(name)
id = use_machine(options['id'])
output Smartdc.machine_snapshot(id, name), options.merge(table: :vertical)
end
|
#start(name) ⇒ Object
33
34
35
36
|
# File 'lib/smartdc/cli/machine/snapshot.rb', line 33
def start(name)
id = use_machine(options['id'])
output Smartdc.start_machine_snapshot(id, name), options.merge(message: "Start [#{name}] of machine snapshot.")
end
|