Sha256: 91c4c237da2bf513638d3a7afdcbd29ddf46345499fd3069fc2bdea02d37e30e

Contents?: true

Size: 704 Bytes

Versions: 14

Compression:

Stored size: 704 Bytes

Contents

module Brightbox
  command [:sql] do |product|
    product.default_command :instances
    product.command [:instances] do |cmd|
      cmd.default_command :list

      cmd.desc I18n.t("sql.instances.list.desc")

      cmd.arg_name "[instance-id...]"
      cmd.command [:list] do |c|
        c.action do |global_options, _options, args|
          servers = if args.empty?
                      DatabaseServer.find(:all)
                    else
                      DatabaseServer.find_or_call(args) do |id|
                        warn "Couldn't find server #{id}"
                      end
                    end

          render_table(servers, global_options)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
brightbox-cli-4.8.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/sql/instances_list.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/sql/instances_list.rb