def cli(env, identifier, allocation, port, routing_type, routing_method):
    """Edit an existing load balancer service group."""
    mgr = SoftLayer.LoadBalancerManager(env.client)

    loadbal_id, group_id = loadbal.parse_id(identifier)

    # check if any input is provided
    if not any([allocation, port, routing_type, routing_method]):
        raise exceptions.CLIAbort(
            'At least one property is required to be changed!')

    mgr.edit_service_group(loadbal_id,
                           group_id,
                           allocation=allocation,
                           port=port,
                           routing_type=routing_type,
                           routing_method=routing_method)

    env.fout('Load balancer service group %s is being updated!' % identifier)
def cli ( env , identifier , allocation , port , routing_type , routing_method ) : mgr = SoftLayer . LoadBalancerManager ( env . client ) loadbal_id , group_id = loadbal . parse_id ( identifier ) if not any ( [ allocation , port , routing_type , routing_method ] ) : raise exceptions . CLIAbort ( 'At least one property is required to be changed!' ) mgr . edit_service_group ( loadbal_id , group_id , allocation = allocation , port = port , routing_type = routing_type , routing_method = routing_method ) env . fout ( 'Load balancer service group %s is being updated!' % identifier )
Edit an existing load balancer service group.