~rnr-developers/rnr-server/trunk

« back to all changes in this revision

Viewing changes to scripts/settings-to-conncheck.py

  • Committer: Tarmac
  • Author(s): Kelvin Li
  • Date: 2015-05-04 09:31:09 UTC
  • mfrom: (298.2.13 origin/trunk)
  • Revision ID: tarmac-20150504093109-ivhkrn4e1c6slj75
[r=kelvin.li,ricardokirkner] tarball build task for Makefile and tweak the sourcedeps that would be used by rnr-server charm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
 
 
3
from conn_check_configs.django import *  # noqa
 
4
 
 
5
 
 
6
def make_http_checks(settings, options):
 
7
    checks = []
 
8
    urls = (
 
9
        (
 
10
            settings['OPENID_SSO_SERVER_URL'],
 
11
            '',
 
12
            200,
 
13
            'HEAD',
 
14
        ),
 
15
    )
 
16
 
 
17
    for url in urls:
 
18
        if not url[0]:
 
19
            continue
 
20
 
 
21
        checks.append({
 
22
            'type': 'http',
 
23
            'url': '{0}{1}'.format(url[0], url[1]),
 
24
            'method': url[3],
 
25
            'expected_code': url[2],
 
26
        })
 
27
 
 
28
    return checks
 
29
 
 
30
EXTRA_CHECK_MAKERS.append(make_http_checks)
 
31
 
 
32
 
 
33
if __name__ == '__main__':
 
34
    run()