Revision d50ed8d4 snf-pithos-app/pithos/api/urls.py
b/snf-pithos-app/pithos/api/urls.py | ||
---|---|---|
1 | 1 |
# Copyright 2011-2012 GRNET S.A. All rights reserved. |
2 |
#
|
|
2 |
# |
|
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
5 | 5 |
# conditions are met: |
6 |
#
|
|
6 |
# |
|
7 | 7 |
# 1. Redistributions of source code must retain the above |
8 | 8 |
# copyright notice, this list of conditions and the following |
9 | 9 |
# disclaimer. |
10 |
#
|
|
10 |
# |
|
11 | 11 |
# 2. Redistributions in binary form must reproduce the above |
12 | 12 |
# copyright notice, this list of conditions and the following |
13 | 13 |
# disclaimer in the documentation and/or other materials |
14 | 14 |
# provided with the distribution. |
15 |
#
|
|
15 |
# |
|
16 | 16 |
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS |
17 | 17 |
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | 18 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
... | ... | |
25 | 25 |
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
26 | 26 |
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
27 | 27 |
# POSSIBILITY OF SUCH DAMAGE. |
28 |
#
|
|
28 |
# |
|
29 | 29 |
# The views and conclusions contained in the software and |
30 | 30 |
# documentation are those of the authors and should not be |
31 | 31 |
# interpreted as representing official policies, either expressed |
... | ... | |
35 | 35 |
|
36 | 36 |
# TODO: This only works when in this order. |
37 | 37 |
api_urlpatterns = patterns('pithos.api.functions', |
38 |
(r'^$', 'top_demux'), |
|
39 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/(?P<v_object>.+?)$', 'object_demux'), |
|
40 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/?$', 'container_demux'), |
|
41 |
(r'^(?P<v_account>.+?)/?$', 'account_demux') |
|
42 |
) |
|
38 |
(r'^$', 'top_demux'), |
|
39 |
( |
|
40 |
r'^(?P<v_account>.+?)/(?P<v_container>.+?)/(?P<v_object>.+?)$', |
|
41 |
'object_demux'), |
|
42 |
(r'^(?P<v_account>.+?)/(?P<v_container>.+?)/?$', |
|
43 |
'container_demux'), |
|
44 |
(r'^(?P<v_account>.+?)/?$', 'account_demux') |
|
45 |
) |
|
43 | 46 |
|
44 | 47 |
urlpatterns = patterns('', |
45 |
(r'^v1(?:$|/)', include(api_urlpatterns)), |
|
46 |
(r'^v1\.0(?:$|/)', include(api_urlpatterns)), |
|
47 |
(r'^public/(?P<v_public>.+?)/?$', 'pithos.api.public.public_demux'), |
|
48 |
(r'^login/?$', 'pithos.api.delegate.delegate_to_login_service'), |
|
49 |
(r'^feedback/?$', 'pithos.api.delegate.delegate_to_feedback_service'), |
|
50 |
) |
|
48 |
(r'^v1(?:$|/)', include(api_urlpatterns)), |
|
49 |
(r'^v1\.0(?:$|/)', include(api_urlpatterns)), |
|
50 |
(r'^public/(?P<v_public>.+?)/?$', |
|
51 |
'pithos.api.public.public_demux'), |
|
52 |
(r'^login/?$', |
|
53 |
'pithos.api.delegate.delegate_to_login_service'), |
|
54 |
(r'^feedback/?$', |
|
55 |
'pithos.api.delegate.delegate_to_feedback_service'), |
|
56 |
) |
Also available in: Unified diff