def _url(server_url, physical_port, action):
    """
    Helper function to build an url for given port and target

    Args:
        server_url: a str, the url for mux server, like http://10.0.0.64:8080/mux/vms17-8
        physical_port: physical port on switch, an integer starting from 1
        action: a str, either "output" or "drop"
    Returns:
        The url for posting flow update request, like http://10.0.0.64:8080/mux/vms17-8/1/drop(output)
    """
    return server_url + "/{}/{}".format(physical_port - 1, action)