Sha256: e09d086d4c2aad3614e3a41dc1cd48b25b43fc4438ca6d7c6f63591ed7e5ab35

Contents?: true

Size: 451 Bytes

Versions: 10

Compression:

Stored size: 451 Bytes

Contents

module Brightbox
  desc 'Stop the specified servers, aka turning the power off'
  arg_name 'server-id...'
  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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.18.0 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.5 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.4 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.3 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.2 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.1 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.17.0 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.16.0 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.15.0 lib/brightbox-cli/commands/servers-stop.rb