#NEWLINE# @ click . command ( ) #NEWLINE# @ click . argument ( 'identifier' ) #NEWLINE# @ click . option ( '--allocation' , required = True , type = click . INT , help = 'The allocated percent of connections' ) #NEWLINE# @ click . option ( '--port' , required = True , help = 'The port number' , type = click . INT ) #NEWLINE# @ click . option ( '--routing-type' , required = True , help = 'The port routing type' ) #NEWLINE# @ click . option ( '--routing-method' , required = True , help = 'The routing method' ) #NEWLINE# @ environment . pass_env #NEWLINE# def cli( env , identifier , allocation , port , routing_type , routing_method ) : #NEWLINE# #INDENT# 'Adds a new load_balancer service.' #NEWLINE# mgr = SoftLayer . LoadBalancerManager ( env . client ) #NEWLINE# ( _ , loadbal_id ) = loadbal . parse_id ( identifier ) #NEWLINE# mgr . add_service_group ( loadbal_id , allocation = allocation , port = port , routing_type = routing_type , routing_method = routing_method ) #NEWLINE# env . fout ( 'Load balancer service group is being added!' )