Logo Search packages:      
Sourcecode: namebench version File versions  Download package

def libnamebench::health_checks::NameServerHealthChecks::CheckHealth (   self,
  sanity_checks = None,
  fast_check = False,
  final_check = False 
) [inherited]

Qualify a nameserver to see if it is any good.

Definition at line 208 of file health_checks.py.

00208                                                                                 :
    """Qualify a nameserver to see if it is any good."""

    if fast_check:
      tests = [(self.TestRootServerResponse,[])]
      sanity_checks = []
    elif final_check:
      tests = [(self.TestNegativeResponse,[])]
      tests = [(self.TestLocalhostResponse,[])]

    for (check, expected_value) in sanity_checks:
      (req_type, req_name) = check.split(' ')
      expected_values = expected_value.split(',')
      tests.append((self.TestAnswers, [req_type.upper(), req_name, expected_values]))

    for test in tests:
      (function, args) = test
      (is_broken, warning, duration) = function(*args)
      if args:
        test_name = args[1]
        test_name = function.__name__

      self.checks.append((test_name, is_broken, warning, duration))
      if warning:
      if is_broken:
        self.AddFailure('%s: %s' % (test_name, warning))
      if self.disabled:

    return self.disabled

Generated by  Doxygen 1.6.0   Back to index