waft.actions.warp_actions.mdm_actions module¶
- class waft.actions.warp_actions.mdm_actions.MdmActions(warp_client_handler: WarpClientHandler, system_actions: SystemActions, cli: CliActions)¶
Bases:
Actions
Perform actions regarding the clients MDM file
- add_mdm_config(organization: str, enroll: bool = True, **kwargs) None ¶
Add MDM config with given information.
- Parameters:
organization – Name of the org to connect the client to (required)
enroll – True to enroll the device using a Service Auth service token (default). False to not enroll the device by configuration.
**kwargs – Valid k/v pairs from this list:
gateway_unique_id – Optional[str] = None,
service_mode – str = ‘warp’,
onboarding – bool = True,
switch_locked – bool = False,
auto_connect – Optional[int] = None,
support_url – Optional[str] = None,
override_api_ep – Optional[str] = None,
override_doh_ep – Optional[str] = None,
override_warp_ep – Optional[str] = None,
unique_client_id – Optional[str] = None,
display_name – Optional[str] = None,
auth_client_id – Optional[str] = None,
auth_client_secret – Optional[str] = None,
Returns: None
- apply_mdm_config() None ¶
Apply currently configured MDM to test system
- clear_mdm_configs()¶
Clear all MDM configs.
- load_template(template_file: Path, replace_params: dict[str, str])¶
- This method will do the following:
clear existing MDM configs
import the MDM configs from the given template file
replace any instances of keys from the given dict with the associated value
- Parameters:
template_file – File to read in as MDM
replace_params – Keys to be replaced with their value in the template file
- remove_mdm()¶
Remove the mdm file. This is mostly for cleanup purposes
- set_config_and_verify(config_name: str, timeout: int = 30) None ¶
Set config by name and verify that registration info shows organization :param config_name: Name of config from MDM to set :param timeout: Max amount of time to wait for registration info to update
- set_mdm_config_register_and_connect(organization: str, **kwargs) None ¶
Action that will set the mdm config, check that the client is registered, connect, and verify the registration status of the client to a particular org.
- Parameters:
organization – Name of the org expected to be registered with
**kwargs – Valid k/v pairs from this list:
gateway_unique_id – Optional[str] = None,
service_mode – str = ‘warp’,
onboarding – bool = True,
switch_locked – bool = False,
auto_connect – Optional[int] = None,
support_url – Optional[str] = None,
override_api_ep – Optional[str] = None,
override_doh_ep – Optional[str] = None,
override_warp_ep – Optional[str] = None,
unique_client_id – Optional[str] = None,
display_name – Optional[str] = None,
auth_client_id – Optional[str] = None,
auth_client_secret – Optional[str] = None,
Returns: None
- verify_defined_orgs(timeout: int = 30) None ¶
Reads orgs returned from warp-cli and validates against currently defined organizations :param timeout: Duration in seconds to retry verifying org list from test system