Sha256: e262c3388472e5c5a8d11e73f613bbf3efd3b2b33b2776e0825dec3c26133634

Contents?: true

Size: 501 Bytes

Versions: 17

Compression:

Stored size: 501 Bytes

Contents

module Brightbox
  command [:servers] do |cmd|
    cmd.desc I18n.t("servers.stop.desc")
    cmd.arg_name "server-id..."
    cmd.command [:stop] do |c|
      c.action do |_global_options, _options, args|
        raise "You must specify servers to stop" if args.empty?

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

        servers.each do |s|
          info "Stopping server #{s}"
          s.stop
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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