Sha256: 60c8f279e79fc821062db8f1eb9ab115e42bf9a0224c1cf3d6f1abbb1bf590df

Contents?: true

Size: 457 Bytes

Versions: 6

Compression:

Stored size: 457 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

6 entries across 6 versions & 2 rubygems

Version Path
brightbox-cli-0.14.1 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.14.0 lib/brightbox-cli/commands/servers-stop.rb
brightbox-cli-0.13.1 lib/brightbox-cli/commands/servers-stop.rb
bbcloud-0.13.0 lib/bbcloud/commands/servers-stop.rb
brightbox-cli-0.13.0 lib/brightbox-cli/commands/servers-stop.rb
bbcloud-0.12.0 lib/bbcloud/commands/servers-stop.rb