Sha256: aca7716d31c1d4f6582c1304d47e959afe1a1ce30c305927684a624492f313f3

Contents?: true

Size: 550 Bytes

Versions: 7

Compression:

Stored size: 550 Bytes

Contents

module Brightbox
  desc "Lists the zones available to an account or see more details"
  command [:zones] do |cmd|

    cmd.default_command :list

    cmd.desc "List zones"
    cmd.arg_name "[zone-id...]"
    cmd.command [:list] do |c|

      c.action do |global_options, options, args|

        if args.empty?
          zones = Zone.find(:all)
        else
          zones = Zone.find_or_call(args) do |id|
            warn "Couldn't find zone #{id}"
          end
        end

        render_table(zones, global_options)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brightbox-cli-1.2.2 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.2.1 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.2.0 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.1.0 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.0.0 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.0.0.rc2 lib/brightbox-cli/commands/zones.rb
brightbox-cli-1.0.0.rc1 lib/brightbox-cli/commands/zones.rb