nvflare.fuel.f3.drivers.net_utils module

check_tcp_port(port) bool[source]
encode_url(params: dict) str[source]
enhance_credential_info(params: dict)[source]
get_address(params: dict) str[source]
get_open_tcp_port(resources: dict) int | None[source]
get_ssl_context(params: dict, ssl_server: bool) SSLContext | None[source]
get_tcp_urls(scheme: str, resources: dict) -> (<class 'str'>, <class 'str'>)[source]

Generate URL pairs for connecting and listening for TCP-based protocols

Parameters:
  • scheme – The transport scheme

  • resources – The resource restrictions like port ranges

Returns:

a tuple with connecting and listening URL

Raises:

CommError – If any error happens while sending the request

parse_port_list(ranges: Any) list[source]
parse_port_range(entry: Any)[source]
parse_url(url: str) dict[source]

Parse URL into a dictionary, saving original URL also

short_url(params: dict) str[source]

Get a short url to be used in logs

ssl_required(params: dict) bool[source]

Check if SSL is required