waft.actions.warp_actions.warp_actions module

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

Bases: Actions

WarpActions is a facade class that provides access to the action objects for the warp client

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 instance

connect_and_verify_connected(registration_type: Literal['enterprise', 'consumer'], warp_mode: WarpModes | str | None = None, 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

  • 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.

property connectivity: ConnectivityActions

Returns a ConnectivityActions object which is responsible for actions around warp client connectivity.

disconnect_and_verify_disconnected()

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

enroll_by_email(zt_org: TrmOrganization)

Enroll node in Zero Trust organization of given orgname

Parameters:

zt_org – TRM structure for organization to be enrolled in

property install: InstallActions

Returns an instance of InstallManagementActions

property mdm: MdmActions

Returns an instance of MdmActions

registration_default_mode = {'consumer': WarpModes.WARP, 'enterprise': WarpModes.WARP_DOH}
property system: SystemActions

Returns the SystemActions class for the current client node

verify_connected(registration_type: Literal['enterprise', 'consumer'], warp_mode: WarpModes | str | None = None, 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

  • 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.

verify_org_info(zt_org: TrmOrganization)

Verify that registration info returned by warp-cli matches the information given

Parameters:

zt_org – Organization information to verify

property warp_client_handler: WarpClientHandler

Returns an instance of the warp client handler