Sha256: 9e6bbbb5e6f7e83fb641275aea9faa757f2969af78cabe2fe1ff816a449f60e5
Contents?: true
Size: 590 Bytes
Versions: 4
Compression:
Stored size: 590 Bytes
Contents
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
Version data entries
4 entries across 4 versions & 1 rubygems