Package expedient :: Package clearinghouse :: Package defaultsettings :: Module expedient
[hide private]
[frames] | no frames]

Source Code for Module expedient.clearinghouse.defaultsettings.expedient

  1  '''Expedient-specific settings. 
  2   
  3  Created on Aug 19, 2010 
  4   
  5  @author: jnaous 
  6  ''' 
  7  from utils import append_to_local_setting 
  8   
  9  BASIC_AUTH_URLS = [ 
 10      r'^/dummyom/.*', 
 11  ] 
 12  '''List of URL regular expressions that accept HTTP Basic Authentication. 
 13   
 14  This is used to enable some tests to work. 
 15   
 16  ''' 
 17  append_to_local_setting("BASIC_AUTH_URLS", BASIC_AUTH_URLS, globals()) 
 18   
 19  SITE_LOCKDOWN_EXCEPTIONS = [ 
 20      r'^/accounts/register/.*$', 
 21      r'^/accounts/activate/.*$', 
 22      r'^/admin/.*', 
 23      r'^/accounts/password/reset/.*$', 
 24      r'^/img/.*', 
 25      r'^/css/.*', 
 26      r'^/static/media/.*', 
 27      r'.*/xmlrpc/?', 
 28  ] 
 29  '''List of URL regular expressions that do not require the user to 
 30  be logged in to access.''' 
 31  append_to_local_setting( 
 32      "SITE_LOCKDOWN_EXCEPTIONS", 
 33      SITE_LOCKDOWN_EXCEPTIONS, 
 34      globals(), 
 35  ) 
 36   
 37  UI_PLUGINS = [ 
 38      ('expedient.ui.html.plugin', 'html_ui', 'expedient.ui.html.urls'), 
 39      ('expedient.ui.rspec.plugin', 'rspec_mgr', 'expedient.ui.rspec.urls'), 
 40  ] 
 41  '''List of UI plugins that are enabled in Expedient. 
 42   
 43  This is a list of 3-tuples: 
 44   
 45      1. The first element is the absolute path to a callable that describes 
 46          the plugin. It should take as input an 
 47          L{expedient.clearinghouse.slice.models.Slice} instance and return a 
 48          tuple (plugin name, plugin description, url to go to for access) 
 49          
 50      2. The second element is the prefix that is prepended to all urls for 
 51          accessing the plugin. This should be unique across all plugins and 
 52          applications. 
 53          
 54      3. The third element is the absolute path to the module that should be 
 55          included in URLConf and that contains all the plugin's URLs. 
 56   
 57  ''' 
 58  append_to_local_setting("UI_PLUGINS", UI_PLUGINS, globals()) 
 59   
 60  # Installed Aggregate Models 
 61  AGGREGATE_PLUGINS = [ 
 62      ('openflow.plugin.models.OpenFlowAggregate', "openflow", "openflow.plugin.urls"), 
 63      ('expedient_geni.planetlab.models.PlanetLabAggregate', "planetlab", "expedient_geni.planetlab.urls"), 
 64      ('expedient_geni.gopenflow.models.GCFOpenFlowAggregate', "gopenflow", "expedient_geni.gopenflow.urls"), 
 65  ] 
 66  '''List of aggregate plugins that are enabled in Expedient. 
 67   
 68  This is a list of 3-tuples: 
 69   
 70      1. The first element is the absolute path to the Aggregate class. 
 71          
 72      2. The second element is the prefix that is prepended to all urls for 
 73         accessing the plugin. This should be unique across all plugins and 
 74         applications. 
 75         
 76      3. The third element is the absolute path to the module that should be 
 77         included in URLConf and that contains all the plugin's URLs. 
 78   
 79  ''' 
 80  append_to_local_setting("AGGREGATE_PLUGINS", AGGREGATE_PLUGINS, globals()) 
 81   
 82  SLICE_EXPIRATION_CHECK_INTERVAL = 3600 
 83  '''How often should we check for expired slices? 
 84   
 85  This indicates how often to check for expired slices and stop 
 86  them. The given time is in seconds. 
 87   
 88  The accuracy will depend on how often the expedient cron job runs. 
 89   
 90  ''' 
 91   
 92  SLICE_EXPIRATION_NOTIFICATION_TIME = 3600*24 
 93  '''How much earlier should we send an email about slices almost expiring? 
 94   
 95  This indicates when to send emails to slice owners that their slices 
 96  are about to expire. Time is in seconds. 
 97   
 98  The accuracy will depend on how often the expedient cron job runs. 
 99   
100  ''' 
101   
102  MAX_SLICE_LIFE = 30 
103  '''Maximum life of a slice without renewing in days''' 
104   
105  # What is the scheme to use when sending urls?  
106  DOMAIN_SCHEME = "https" 
107  '''What domain scheme should be used for absolute URLs?''' 
108