lib/bbcloud/commands/lbs-destroy.rb in bbcloud-0.11.2 vs lib/bbcloud/commands/lbs-destroy.rb in bbcloud-0.12.0
- old
+ new
@@ -1,18 +1,20 @@
-desc 'Destroy load balancers'
-arg_name 'lb-id...'
-command [:destroy] do |c|
+module Brightbox
+ desc 'Destroy load balancers'
+ arg_name 'lb-id...'
+ command [:destroy] do |c|
- c.action do |global_options, options, args|
+ c.action do |global_options, options, args|
- raise "You must specify the load balancers to destroy" if args.empty?
+ 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 = 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
+ lbs.each do |lb|
+ info "Destroying load balancer #{lb}"
+ lb.destroy
+ end
end
end
end