Sha256: 8a0094892417e6c9c1d4858fbe10582a3e8530405625fe2cea6a22af87605923

Contents?: true

Size: 930 Bytes

Versions: 14

Compression:

Stored size: 930 Bytes

Contents

module Brightbox
  command [:sql] do |product|
    product.command [:snapshots] do |cmd|
      cmd.desc I18n.t("sql.snapshots.show.desc")
      cmd.arg_name "[snapshot-id...]"
      cmd.command [:show] do |c|
        c.action do |global_options, _options, args|
          raise "You must specify snapshot ids to show" if args.empty?

          servers = DatabaseSnapshot.find_or_call(args) do |id|
            raise "Couldn't find snapshot #{id}"
          end

          table_opts = global_options.merge(
            :vertical => true,
            :fields => %i[
              id
              name
              description
              status
              database_engine
              database_version
              locked
              created_on
              created_at
              size
              source
            ]
          )
          render_table(servers, table_opts)
        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/snapshots_show.rb
brightbox-cli-4.7.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.6.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.5.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.4.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.3.2 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.3.1 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.3.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.2.1 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.2.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.1.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.0.0 lib/brightbox-cli/commands/sql/snapshots_show.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/commands/sql/snapshots_show.rb