source: TI12-security/trunk/python/ndg.security.server/ndg/security/server/paster_templates/template.py @ 4688

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.server/ndg/security/server/paster_templates/template.py@4688
Revision 4688, 682 bytes checked in by pjkersha, 11 years ago (diff)

default_deployment paster template doesn't need package directory

  • Property svn:executable set to *
Line 
1#!/usr/bin/env python
2
3from paste.script.templates import Template, var, _skip_variables
4import socket
5_hostTuple = socket.gethostbyaddr(socket.gethostname())
6try:
7    # Get first alias from list if present
8    _hostname = _hostTuple[1][0]
9except TypeError:
10    # ... or default to hostname
11    _hostname = _hostTuple[0]
12   
13vars = [
14    var('attributeAuthorityID', 
15        ('Unique identity by which this Attribute Authority will be known by '
16         'other trusted sites'),
17        default=_hostname)
18]
19
20class DefaultDeploymentTemplate(Template):
21    _template_dir = 'default_deployment'
22    summary = 'NERC DataGrid Security services deployment template'
23    vars = vars
24   
Note: See TracBrowser for help on using the repository browser.