Sha256: 83fb0a68d3f8106663bbd02256a90cf55fc414d214a80f0e51d29121ce0f99f1

Contents?: true

Size: 744 Bytes

Versions: 7

Compression:

Stored size: 744 Bytes

Contents

module Brightbox
  command [:accounts] do |cmd|
    cmd.desc I18n.t("accounts.show.desc")
    cmd.arg_name "account-id..."
    cmd.command [:show] do |c|
      c.action do |global_options, _options, args|
        if args.empty?
          raise "You must specify the accounts to show"
        end

        accounts = Account.find_or_call(args) do |id|
          warn "Couldn't find account #{id}"
        end

        table_opts = global_options.merge(
          :vertical => true,
          :fields => %i[
            id
            name
            cloud_ip_limit
            ram_limit
            ram_used
            lb_limit
            ram_free
          ]
        )

        render_table(accounts, table_opts)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-5.0.0.alpha lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-4.8.0 lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/accounts/show.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/accounts/show.rb