Class: Smartdc::Cli::MachineMetadata
- Inherits:
-
Thor
- Object
- Thor
- Smartdc::Cli::MachineMetadata
show all
- Includes:
- Smartdc::CliHelper
- Defined in:
- lib/smartdc/cli/machine/metadata.rb
Instance Method Summary
collapse
#describe, #horizontal, #output, #use_machine, #vertical
Instance Method Details
#destroy(key) ⇒ Object
25
26
27
28
|
# File 'lib/smartdc/cli/machine/metadata.rb', line 25
def destroy(key)
id = use_machine(options['id'])
output Smartdc.destroy_machine_metadata(id, key), options.merge(message: "Destroy [#{key}] of machine metadata.")
end
|
#list ⇒ Object
9
10
11
12
13
14
|
# File 'lib/smartdc/cli/machine/metadata.rb', line 9
def list
id = use_machine(options['id'])
output Smartdc.machine_metadata(id), options.merge(table: :vertical, exclude: %i[
root_authorized_keys
])
end
|
#update(key, value) ⇒ Object
17
18
19
20
21
22
|
# File 'lib/smartdc/cli/machine/metadata.rb', line 17
def update(key, value)
id = use_machine(options['id'])
output Smartdc.update_machine_metadata(id, {key => value}), options.merge(table: :vertical, exclude: %i[
root_authorized_keys
])
end
|