Sha256: 1dfaa48d161c4a71954a635ea17792e34ea36fa358bfacc4a9d6932f10dc36b0

Contents?: true

Size: 455 Bytes

Versions: 16

Compression:

Stored size: 455 Bytes

Contents

module Brightbox
  desc 'Destroy load balancers'
  arg_name 'lb-id...'
  command [:destroy] do |c|

    c.action do |global_options, options, args|

      raise "You must specify the load balancers to destroy" if args.empty?

      lbs = LoadBalancer.find_or_call(args) do |id|
        raise "Couldn't find load balancer #{id}"
      end

      lbs.each do |lb|
        info "Destroying load balancer #{lb}"
        lb.destroy
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.18.0 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.5 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.4 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.3 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.2 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.1 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.17.0 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.16.0 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.15.0 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.14.1 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.14.0 lib/brightbox-cli/commands/lbs-destroy.rb
brightbox-cli-0.13.1 lib/brightbox-cli/commands/lbs-destroy.rb
bbcloud-0.13.0 lib/bbcloud/commands/lbs-destroy.rb
brightbox-cli-0.13.0 lib/brightbox-cli/commands/lbs-destroy.rb
bbcloud-0.12.0 lib/bbcloud/commands/lbs-destroy.rb