1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
3
# Copyright 2012 United States Government as represented by the
4
# Administrator of the National Aeronautics and Space Administration.
7
# Copyright 2012 Nebula, Inc.
9
# Licensed under the Apache License, Version 2.0 (the "License"); you may
10
# not use this file except in compliance with the License. You may obtain
11
# a copy of the License at
13
# http://www.apache.org/licenses/LICENSE-2.0
15
# Unless required by applicable law or agreed to in writing, software
16
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
18
# License for the specific language governing permissions and limitations
21
from django.conf.urls.defaults import patterns, url
23
from .views import IndexView, CreateView, UploadView, ObjectIndexView, CopyView
26
OBJECTS = r'^(?P<container_name>[^/]+)/%s$'
29
# Swift containers and objects.
30
urlpatterns = patterns('horizon.dashboards.nova.containers.views',
31
url(r'^$', IndexView.as_view(), name='index'),
32
url(r'^create/$', CreateView.as_view(), name='create'),
33
url(OBJECTS % r'$', ObjectIndexView.as_view(), name='object_index'),
34
url(OBJECTS % r'upload$', UploadView.as_view(), name='object_upload'),
35
url(OBJECTS % r'(?P<object_name>[^/]+)/copy$',
36
CopyView.as_view(), name='object_copy'),
37
url(OBJECTS % r'(?P<object_name>[^/]+)/download$',
38
'object_download', name='object_download'))