Sha256: 2b40e275d439d495d8559846c0ac8ed734e2a816d60e2a436000d09074def54c

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 Bytes

Contents

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bbcloud-0.11.2 lib/bbcloud/commands/lbs-destroy.rb
bbcloud-0.11.1 lib/bbcloud/commands/lbs-destroy.rb
bbcloud-0.11.0 lib/bbcloud/commands/lbs-destroy.rb
bbcloud-0.10.1 lib/bbcloud/commands/lbs-destroy.rb