Revision 81357279 api/urls.py

b/api/urls.py
21 21

  
22 22
v10patterns = patterns('',
23 23
    url(r'^limits$', limit_handler),
24
    url(r'^servers/(?P<id>[^/]+)?$', server_handler),
24
    url(r'^servers$', server_handler),
25
    url(r'^servers/(?P<id>[^/]+)$', server_handler),
25 26
    url(r'^servers/(?P<id>[^/]+)/action$', server_actions_handler),
26 27
    url(r'^servers/(?P<id>[^/]+)/ips$', server_address_handler),
27 28
    url(r'^servers/(?P<id>[^/]+)/ips/private$', server_address_handler),
28 29
    url(r'^servers/(?P<id>[^/]+)/ips/public/(?P<address>[^/]+)$', server_address_handler),
29 30
    url(r'^servers/(?P<id>[^/]+)/backup_schedule', server_backup_handler),
30
    url(r'^flavors/(?P<id>[^/]+)?$', flavor_handler),
31
    url(r'^images/(?P<id>[^/]+)?$', image_handler),
32
    url(r'^shared_ip_groups/(?P<id>[^/]+)?$', shared_ip_group_handler),
31
    url(r'^flavors$', flavor_handler),
32
    url(r'^flavors/(?P<id>[^/]+)$', flavor_handler),
33
    url(r'^images$', image_handler),
34
    url(r'^images/(?P<id>[^/]+)$', image_handler),
35
    url(r'^shared_ip_groups$', shared_ip_group_handler),
36
    url(r'^shared_ip_groups/(?P<id>[^/]+)$', shared_ip_group_handler),
33 37
)
34 38

  
35 39
version_handler = Resource(VersionHandler)
36 40

  
37 41
urlpatterns = patterns('',
38 42
    url(r'^(?P<number>[^/]+)/$', version_handler),
39
    url(r'^/?$', version_handler),
43
    url(r'^/$', version_handler),
40 44
    (r'^v1.0/', include(v10patterns)),
41 45
)

Also available in: Unified diff