waft.test_resource_manager.trm module

TRM core functionality for managing organizations.

class waft.test_resource_manager.trm.Trm

Bases: object

Test resource manager. Note this is just a conceptual stand in until TRM is designed in full.

dynamic_org_trm_auth_token: str = 'fnmt3g78t7tzpof4s0ehkhc3oame8ydf'
classmethod get_dynamic_org(mdm_auth: bool = False, api_auth: bool = False) TrmOrganization

Reserve and return the details of a dynamically managed org.

Parameters:
  • mdm_auth (bool) – Whether to request MDM auth

  • api_auth (bool) – Whether to request API auth

Returns:

object with reserved account details

Return type:

TrmOrganization

classmethod get_org_by_account_id(account_id: str, mdm_auth: bool = False, api_auth: bool = False) TrmOrganization

Get the details of a registered org by its account ID.

Parameters:
  • account_id (str) – Zero Trust account ID

  • mdm_auth (bool) – Whether to request MDM auth

  • api_auth (bool) – Whether to request API auth

Raises:

ValueError – if an account is not found matching the ID given

Returns:

object with registered account details

Return type:

TrmOrganization

classmethod get_org_by_name(organization: str, mdm_auth: bool = False, api_auth: bool = False) TrmOrganization

Get the details of a registered org by its name.

Parameters:
  • organization (str) – Zero Trust account team/domain name

  • mdm_auth (bool) – Whether to request MDM auth

  • api_auth (bool) – Whether to request API auth

Raises:

NameError – if an account is not found matching the name given

Returns:

object with registered account details

Return type:

TrmOrganization

registered_orgs: list[TrmOrganization] = [TrmOrganization(id=None, account='fa6f75aeb90e49bea7fea4a62e6b33a3', name='AutoWARP', team_domain='autowarp'), TrmOrganization(id=None, account='4ec5857cf3a9959b29ee458c50c84f8c', name='AutoWARPc', team_domain='autowarpc'), TrmOrganization(id=None, account='6d4c4540e6836b4a7875d67a73fc436a', name='AutoWARPe', team_domain='autowarpe'), TrmOrganization(id=None, account='413df57cc7ef0b4a8bdbe29abca66f26', name='WAFT Test Device Profiles', team_domain='wafttestdeviceprofiles')]