parameters: (self, account_name, domain_name, device_name,
                                account_type=None)
return_statement: return a_infos
docstring: This function retrieve informations (credentials, login)
          of a scenario or password management account specified by its
          name, domain and device (or application)
  
          If the account exist and can be checkout, information is saved on cache
          If credentials are already on cache, just return them.
  
          :param str account_name: name of the account
          :param str domain_name: domain of the account
                                  can be global or local
          :param str device_name: device of the account
                                  if empty, domain_name is global
          :param str account_type: type of account to retrieve
                                   can be 'scenario' or 'pm'
          :rtype: dict { 'login', 'password' }
          :return: credentials
docstring_summary: This function retrieve informations (credentials, login)
          of a scenario or password management account specified by its
          name, domain and device (or application)
docstring_tokens: This function retrieve informations ( credentials login ) of a scenario or password management account specified by its name domain and device ( or application )
function: def check_account_by_type(self, account_name, domain_name, device_name,
                                account_type=None):
          """
          This function retrieve informations (credentials, login)
          of a scenario or password management account specified by its
          name, domain and device (or application)
  
          If the account exist and can be checkout, information is saved on cache
          If credentials are already on cache, just return them.
  
          :param str account_name: name of the account
          :param str domain_name: domain of the account
                                  can be global or local
          :param str device_name: device of the account
                                  if empty, domain_name is global
          :param str account_type: type of account to retrieve
                                   can be 'scenario' or 'pm'
          :rtype: dict { 'login', 'password' }
          :return: credentials
          """
          # Logger().debug("CHECKOUTENGINE check_account_by_type")
          account = (account_name, domain_name, device_name)
          res = self._update_creds_with_account_by_type(
              account_name=account_name,
              domain_name=domain_name,
              device_name=device_name,
              account_type=account_type
          )
          if not res:
              return None
          table_creds = (self.pm_credentials if account_type == 'pm' else
                         self.scenario_credentials)
          right, creds = table_creds.get(account, (None, {}))
          if not creds or not creds.get(CRED_TYPE_PASSWORD):
              Logger().debug("check_account_by_type: missing password")
              return None
          passwords = creds.get(CRED_TYPE_PASSWORD, [])
          a_infos = {
              'password': passwords[0] if passwords else None,
              'login': creds.get(CRED_DATA_LOGIN, None)
          }
          return a_infos
function_tokens: def check_account_by_type ( self , account_name , domain_name , device_name , account_type = None ) : # Logger().debug("CHECKOUTENGINE check_account_by_type") account = ( account_name , domain_name , device_name ) res = self . _update_creds_with_account_by_type ( account_name = account_name , domain_name = domain_name , device_name = device_name , account_type = account_type ) if not res : return None table_creds = ( self . pm_credentials if account_type == 'pm' else self . scenario_credentials ) right , creds = table_creds . get ( account , ( None , { } ) ) if not creds or not creds . get ( CRED_TYPE_PASSWORD ) : Logger ( ) . debug ( "check_account_by_type: missing password" ) return None passwords = creds . get ( CRED_TYPE_PASSWORD , [ ] ) a_infos = { 'password' : passwords [ 0 ] if passwords else None , 'login' : creds . get ( CRED_DATA_LOGIN , None ) } return a_infos