class Smartdc::Cli::Key
Public Instance Methods
add(name, file)
click to toggle source
# File lib/smartdc/cli/key.rb, line 16 def add(name, file) body = { name: name, key: File.read(file) } output Smartdc.create_key(body), options.merge(table: :vertical, exclude: %i[key]) end
destroy(name)
click to toggle source
# File lib/smartdc/cli/key.rb, line 22 def destroy(name) output Smartdc.destroy_key(name), options.merge(message: "Key #{name} destroy.") end
list()
click to toggle source
# File lib/smartdc/cli/key.rb, line 6 def list output Smartdc.keys, options.merge(table: :horizontal, exclude: %i[key]) end
show(name)
click to toggle source
# File lib/smartdc/cli/key.rb, line 11 def show(name) output Smartdc.key(name), options.merge(only: :key) end