Sha256: 42a5138e1b1033dc655468e1fde0c72512773a2acf83e16e6daeb533a789bf91

Contents?: true

Size: 570 Bytes

Versions: 7

Compression:

Stored size: 570 Bytes

Contents

desc 'Show detailed account info'
arg_name 'account-id...'
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 => [:id, :name, :cloud_ip_limit, :ram_limit, :ram_used, 
                  :ram_free, :library_ftp_host, :library_ftp_user ]
    })

    render_table(accounts, table_opts)

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bbcloud-0.11.2 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.11.1 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.11.0 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.10.1 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.9.2 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.9.1 lib/bbcloud/commands/accounts-show.rb
bbcloud-0.9 lib/bbcloud/commands/accounts-show.rb