Sha256: 22b3879daa1c1d2affee2cace99be7e669d7fc1ccca74f5a2c94ffa39e982386
Contents?: true
Size: 641 Bytes
Versions: 16
Compression:
Stored size: 641 Bytes
Contents
module Brightbox desc 'Remove nodes from a load balancer' arg_name 'lb-id node-id...' command [:remove_nodes] do |c| c.action do |global_options, options, args| raise "You must specify the load balancer and the node ids to remove" if args.size < 2 lb = LoadBalancer.find(args.shift) # We don't want to check servers exist as you can remove deleted # servers from a load balancer. nodes = args.collect { |a| Server.new(a) } info "Removing #{nodes.size} nodes from load balancer #{lb.id}" lb.remove_nodes nodes lb.reload render_table([lb], global_options) end end end
Version data entries
16 entries across 16 versions & 2 rubygems