Sha256: 351feb90ea5663474e224eab220f95ae7259842ec61a8d52808116a9b6c78891

Contents?: true

Size: 669 Bytes

Versions: 4

Compression:

Stored size: 669 Bytes

Contents

module Brightbox
  command [:cloudips] do |cmd|

    cmd.desc "show details on Cloud IPs"
    cmd.arg_name "cloudip-id..."
    cmd.command [:show] do |c|

      c.action do |global_options, options, args|

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

        ips = CloudIP.find_or_call(args) do |id|
          warn "Couldn't find Cloud IP #{id}"
        end

        fields = [:id, :name, :reverse_dns, :status, :public_ip, :reverse_dns, :destination, :interface_id, :port_translators]

        render_table(ips.compact, global_options.merge({ :vertical => true, :fields => fields}))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
brightbox-cli-1.1.0 lib/brightbox-cli/commands/cloudips-show.rb
brightbox-cli-1.0.0 lib/brightbox-cli/commands/cloudips-show.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/commands/cloudips-show.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/commands/cloudips-show.rb