Exemple #1
0
 def PolicyReAuth(self, _: PolicyReAuthRequest) -> PolicyReAuthAnswer:
     return PolicyReAuthAnswer(
         result=ReAuthResult.Value('UPDATE_INITIATED'),
         failed_rules={
             "p2": PolicyReAuthAnswer.FailureCode.Value("UNKNOWN_RULE_NAME"),
         },
     )
Exemple #2
0
 def _handle_rar_answer(
     self,
     rar: PolicyReAuthRequest,
     answer: PolicyReAuthAnswer,
 ) -> bool:
     if answer.result == ReAuthResult.Value('OTHER_FAILURE'):
         logging.error('Failed to apply policy updates for subscriber %s',
                       rar.imsi)
         return False
     self._rules_by_sid[rar.imsi] = InstalledPolicies(
         installed_policies=list(self._get_updated_rules(rar, answer)), )
     return True
Exemple #3
0
 def PolicyReAuth(self, _: PolicyReAuthRequest) -> PolicyReAuthAnswer:
     return PolicyReAuthAnswer(result=ReAuthResult.Value('OTHER_FAILURE'))
Exemple #4
0
 def PolicyReAuth(self, _: PolicyReAuthRequest) -> PolicyReAuthAnswer:
     return PolicyReAuthAnswer(
         result=ReAuthResult.Value('UPDATE_INITIATED'))