Class: Smartdc::Cli::MachineMetadata

Inherits:
Thor
  • Object
show all
Includes:
Smartdc::CliHelper
Defined in:
lib/smartdc/cli/machine/metadata.rb

Instance Method Summary collapse

Methods included from Smartdc::CliHelper

#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.(id, key), options.merge(message: "Destroy [#{key}] of machine metadata.")
end

#listObject



9
10
11
12
13
14
# File 'lib/smartdc/cli/machine/metadata.rb', line 9

def list
  id = use_machine(options['id'])
  output Smartdc.(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.(id, {key => value}), options.merge(table: :vertical, exclude: %i[
    root_authorized_keys
  ])
end