#!/usr/bin/env python from paste.script.templates import Template, var, _skip_variables import socket _hostTuple = socket.gethostbyaddr(socket.gethostname()) try: # Get first alias from list if present _hostname = _hostTuple[1][0] except TypeError: # ... or default to hostname _hostname = _hostTuple[0] vars = [ var('attributeAuthorityID', ('Unique identity by which this Attribute Authority will be known by ' 'other trusted sites'), default=_hostname) ] class DefaultDeploymentTemplate(Template): _template_dir = 'default_deployment' summary = 'NERC DataGrid Security services deployment template' vars = vars