waft.actions.warp_actions.warp_actions module

class waft.actions.warp_actions.warp_actions.WarpActions(system_actions: SystemActions)

Bases: Actions

Provides access to the WARP client actions layer

capture_traffic(local_pcap_name: str, interface: Iterable[str] | None = None, time_limit: int | None = None, size_limit: int | None = None, packet_size: int | None = None)

Capture traffic on node using tshark CLI, save file to Path on local machine.

Parameters:
  • local_pcap_name – Name of file to save capture to

  • interface – Interface for which to capture traffi in pcap (_default, _tun)

  • time_limit – Time limit for pcap capture in min (default 5min)

  • size_limit – Size limit for pcap capture in mb (default 5mb)

  • packet_size – Packet size for pcap capture in bytes (default 160b)

property captured_traffic

Returns the Path to the most recent captured traffic file

property cli: CliActions

Returns a CliActions class instance for the current client node.

property client: WarpClientHandler

Returns a WarpClientHandler class instance for the current client node.

connect_and_verify_connected(registration_type: Literal['enterprise', 'consumer'], warp_mode: WarpModes | str | None = None, gateway_inspection: bool = False, trace_sites: Iterable[ConnectivityCheckSites | str] | Literal['all'] = (ConnectivityCheckSites.Cloudflare,))

Connect warp via the CLI and verify that the warp client is connected appropriately

Parameters:
  • registration_type – Type of registration (either ‘enterprise’ or ‘consumer’)

  • warp_mode – WARP mode enum value for which to verify connectivity

  • gateway_inspection – Boolean indicating if gateway inspection is enabled

  • trace_sites – List of site domain(s) or ConnectivityCheckSites enum values to network trace or ‘all’ to trace all ConnectivityCheckSites enumerated domains. By default, a single ConnectivityCheckSites domain is traced when not specified.

property connectivity: ConnectivityActions

Returns a ConnectivityActions class instance for the current client node.

disconnect_and_verify_disconnected()

Disconnect warp via the CLI and verify that the warp client is no longer connected.

property install: InstallActions

Returns an InstallActions class instance for the current client node.

property mdm: MdmActions

Returns an MdmActions class instance for the current client node.

registration_default_mode = {'consumer': WarpModes.WARP, 'enterprise': WarpModes.WARP_DOH}
restart_client_service()

Restart the warp client service/process

property system: SystemActions

Returns a SystemActions class instance for the current client node.

verify_connected(registration_type: Literal['enterprise', 'consumer'], warp_mode: WarpModes | str | None = None, gateway_inspection: bool = False, trace_sites: Iterable[ConnectivityCheckSites | str] | Literal['all'] = (ConnectivityCheckSites.Cloudflare,))
Verify that the warp client is connected and that CF trace and DNS settings appropriately match for the given

scenario of registration type and WARP mode.

Parameters:
  • registration_type – Type of registration (either ‘enterprise’ or ‘consumer’)

  • warp_mode – WARP mode enum value for which to verify connectivity

  • gateway_inspection – Boolean indicating if gateway inspection is enabled

  • trace_sites – List of site domain(s) or ConnectivityCheckSites enum values to network trace or ‘all’ to trace all ConnectivityCheckSites enumarated domains. By default, a single ConnectivityCheckSites domain is traced when not specified.