Package pulp :: Package server :: Package webservices :: Module application
[hide private]
[frames] | no frames]

Source Code for Module pulp.server.webservices.application

 1  #!/usr/bin/env python 
 2  # -*- coding: utf-8 -*- 
 3  # 
 4  # Copyright © 2010 Red Hat, Inc. 
 5  # 
 6  # This software is licensed to you under the GNU General Public License, 
 7  # version 2 (GPLv2). There is NO WARRANTY for this software, express or 
 8  # implied, including the implied warranties of MERCHANTABILITY or FITNESS 
 9  # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 
10  # along with this software; if not, see 
11  # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 
12  # 
13  # Red Hat trademarks are not licensed under GPLv2. No permission is 
14  # granted to use or replicate Red Hat trademarks that are incorporated 
15  # in this software or its documentation. 
16   
17  import web 
18   
19  from pulp.server import config 
20  from pulp.server.logs import start_logging 
21  from pulp.server.webservices import controllers 
22   
23   
24  # NOTE: If you add a item here make sure you also add  
25  #       it to controllers/__init__.py 
26  URLS = ( 
27      '/test', controllers.test.application, 
28      '/consumers', controllers.consumers.application, 
29      '/consumergroups', controllers.consumergroups.application, 
30      '/events', controllers.audit.application, 
31      '/packages', controllers.packages.application, 
32      '/repositories', controllers.repositories.application, 
33      '/users', controllers.users.application, 
34      '/errata', controllers.errata.application, 
35  ) 
36   
37   
38 -def _configure_application(application):
39 pass
40 41
42 -def wsgi_application():
43 """ 44 Application factory to create, configure, and return a WSGI application 45 using the web.py framework. 46 47 @return: wsgi application callable 48 """ 49 application = web.subdir_application(URLS) 50 _configure_application(application) 51 start_logging() 52 return application.wsgifunc()
53