Sha256: 0b7131a9fb7fb78a05027454c0af4fc31f313a3cc3e0562243e54eb711052ca3

Contents?: true

Size: 583 Bytes

Versions: 6

Compression:

Stored size: 583 Bytes

Contents

module Brightbox
  desc 'Show detailed type info'
  arg_name 'type-id...'
  command [:show] do |c|

    c.action do |global_options,options,args|

      if args.empty?
        raise "You must specify the types you want to show"
      end

      types = Type.find_or_call(args) do |id|
        warn "Couldn't find type #{id}"
      end

      display_options = {
        :vertical => true,
        :fields => [:id, :handle, :status, :name, :ram, :disk, :cores]
      }

      table_opts = global_options.merge(display_options)
      render_table(types, table_opts)

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.18.0 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.17.5 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.17.4 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.17.3 lib/brightbox-cli/commands/types-show.rb
brightbox-cli-0.17.2 lib/brightbox-cli/commands/types-show.rb