Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / api / urls.py @ 53b0ea25

History | View | Annotate | Download (2.5 kB)

1 e440e835 Christos Stavrakakis
# Copyright 2011, 2012, 2013 GRNET S.A. All rights reserved.
2 e440e835 Christos Stavrakakis
#
3 adee02b8 Giorgos Verigakis
# Redistribution and use in source and binary forms, with or
4 adee02b8 Giorgos Verigakis
# without modification, are permitted provided that the following
5 adee02b8 Giorgos Verigakis
# conditions are met:
6 e440e835 Christos Stavrakakis
#
7 adee02b8 Giorgos Verigakis
#   1. Redistributions of source code must retain the above
8 adee02b8 Giorgos Verigakis
#      copyright notice, this list of conditions and the following
9 adee02b8 Giorgos Verigakis
#      disclaimer.
10 e440e835 Christos Stavrakakis
#
11 adee02b8 Giorgos Verigakis
#   2. Redistributions in binary form must reproduce the above
12 adee02b8 Giorgos Verigakis
#      copyright notice, this list of conditions and the following
13 adee02b8 Giorgos Verigakis
#      disclaimer in the documentation and/or other materials
14 adee02b8 Giorgos Verigakis
#      provided with the distribution.
15 e440e835 Christos Stavrakakis
#
16 adee02b8 Giorgos Verigakis
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17 adee02b8 Giorgos Verigakis
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 adee02b8 Giorgos Verigakis
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 adee02b8 Giorgos Verigakis
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20 adee02b8 Giorgos Verigakis
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 adee02b8 Giorgos Verigakis
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 adee02b8 Giorgos Verigakis
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 adee02b8 Giorgos Verigakis
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
24 adee02b8 Giorgos Verigakis
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 adee02b8 Giorgos Verigakis
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
26 adee02b8 Giorgos Verigakis
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 adee02b8 Giorgos Verigakis
# POSSIBILITY OF SUCH DAMAGE.
28 e440e835 Christos Stavrakakis
#
29 adee02b8 Giorgos Verigakis
# The views and conclusions contained in the software and
30 adee02b8 Giorgos Verigakis
# documentation are those of the authors and should not be
31 adee02b8 Giorgos Verigakis
# interpreted as representing official policies, either expressed
32 adee02b8 Giorgos Verigakis
# or implied, of GRNET S.A.
33 00b4f1be Faidon Liambotis
34 6b256427 Christos Stavrakakis
from django.conf.urls import include, patterns
35 00b4f1be Faidon Liambotis
36 269ac8de Christos Stavrakakis
from snf_django.lib.api import api_endpoint_not_found
37 7d368e73 Christos Stavrakakis
from synnefo.api import (servers, flavors, images, networks, extensions,
38 495e2be8 Christos Stavrakakis
                         ports, floating_ips, subnets)
39 d8e50a39 Giorgos Verigakis
from synnefo.api.versions import versions_list, version_details
40 00b4f1be Faidon Liambotis
41 00b4f1be Faidon Liambotis
42 d8e50a39 Giorgos Verigakis
#
43 2bf7498b Georgios D. Tsoukalas
# The OpenStack Compute API v2.0
44 d8e50a39 Giorgos Verigakis
#
45 2bf7498b Georgios D. Tsoukalas
api20_patterns = patterns(
46 e440e835 Christos Stavrakakis
    '',
47 7d368e73 Christos Stavrakakis
    (r'^servers', include(servers)),
48 7d368e73 Christos Stavrakakis
    (r'^flavors', include(flavors)),
49 7d368e73 Christos Stavrakakis
    (r'^images', include(images)),
50 7d368e73 Christos Stavrakakis
    (r'^networks', include(networks)),
51 593851e0 Buildbot
    (r'^ports', include(ports)),
52 6a959c73 Dionysis Grigoropoulos
    (r'^subnets', include(subnets)),
53 7d368e73 Christos Stavrakakis
    (r'^extensions', include(extensions)),
54 e4f484da Marios Kogias
    (r'^floatingips', include(floating_ips.ips_urlpatterns)),
55 e4f484da Marios Kogias
#    (r'^os-floating-ip-pools', include(floating_ips.pools_urlpatterns)),
56 7e2f9d4b Giorgos Verigakis
)
57 7e2f9d4b Giorgos Verigakis
58 00b4f1be Faidon Liambotis
59 e440e835 Christos Stavrakakis
urlpatterns = patterns(
60 e440e835 Christos Stavrakakis
    '',
61 d8e50a39 Giorgos Verigakis
    (r'^(?:.json|.xml|.atom)?$', versions_list),
62 2bf7498b Georgios D. Tsoukalas
    (r'^v2.0/(?:.json|.xml|.atom)?$', version_details,
63 e440e835 Christos Stavrakakis
        {'api_version': 'v1.1'}),
64 2bf7498b Georgios D. Tsoukalas
    (r'^v2.0/', include(api20_patterns)),
65 269ac8de Christos Stavrakakis
    (r'^.*', api_endpoint_not_found),
66 00b4f1be Faidon Liambotis
)