urls.py 6.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Copyright 2014 Budapest University of Technology and Economics (BME IK)
#
# This file is part of CIRCLE Cloud.
#
# CIRCLE is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# CIRCLE is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with CIRCLE.  If not, see <http://www.gnu.org/licenses/>.

18 19
from __future__ import absolute_import
from django.conf.urls import patterns, url, include
20

21
from vm.models import Instance
22
from .views import (
Őry Máté committed
23
    AclUpdateView, DiskAddView, FavouriteView, GroupAclUpdateView, GroupDelete,
24 25 26 27 28 29 30 31
    GroupDetailView, GroupList, GroupUserDelete, IndexView,
    InstanceActivityDetail, LeaseCreate, LeaseDelete, LeaseDetail,
    MyPreferencesView, NodeAddTraitView, NodeCreate, NodeDelete,
    NodeDetailView, NodeFlushView, NodeGraphView, NodeList, NodeStatus,
    NotificationView, PortDelete, TemplateAclUpdateView, TemplateCreate,
    TemplateDelete, TemplateDetail, TemplateList, TransferOwnershipConfirmView,
    TransferOwnershipView, vm_activity, VmCreate, VmDelete, VmDetailView,
    VmDetailVncTokenView, VmGraphView, VmList, VmMassDelete, VmMigrateView,
32
    VmRenewView, DiskRemoveView, get_disk_download_status, InterfaceDeleteView,
33
    TemplateChoose,
34
)
35

Kálmán Viktor committed
36 37
urlpatterns = patterns(
    '',
Kálmán Viktor committed
38
    url(r'^$', IndexView.as_view(), name="dashboard.index"),
39 40
    url(r'^lease/(?P<pk>\d+)/$', LeaseDetail.as_view(),
        name="dashboard.views.lease-detail"),
41 42
    url(r'^lease/create/$', LeaseCreate.as_view(),
        name="dashboard.views.lease-create"),
43 44
    url(r'^lease/delete/(?P<pk>\d+)/$', LeaseDelete.as_view(),
        name="dashboard.views.lease-delete"),
45

46 47
    url(r'^template/create/$', TemplateCreate.as_view(),
        name="dashboard.views.template-create"),
48 49
    url(r'^template/choose/$', TemplateChoose.as_view(),
        name="dashboard.views.template-choose"),
50 51
    url(r'template/(?P<pk>\d+)/acl/$', TemplateAclUpdateView.as_view(),
        name='dashboard.views.template-acl'),
52 53
    url(r'^template/(?P<pk>\d+)/$', TemplateDetail.as_view(),
        name='dashboard.views.template-detail'),
54 55
    url(r"^template/list/$", TemplateList.as_view(),
        name="dashboard.views.template-list"),
56 57
    url(r"^template/delete/(?P<pk>\d+)/$", TemplateDelete.as_view(),
        name="dashboard.views.template-delete"),
58

59
    url(r'^vm/(?P<pk>\d+)/op/', include('dashboard.vm.urls')),
60 61
    url(r'^vm/(?P<pk>\d+)/remove_port/(?P<rule>\d+)/$', PortDelete.as_view(),
        name='dashboard.views.remove-port'),
Kálmán Viktor committed
62 63
    url(r'^vm/(?P<pk>\d+)/$', VmDetailView.as_view(),
        name='dashboard.views.detail'),
64 65
    url(r'^vm/(?P<pk>\d+)/vnctoken/$', VmDetailVncTokenView.as_view(),
        name='dashboard.views.detail-vnc'),
66 67
    url(r'^vm/(?P<pk>\d+)/acl/$', AclUpdateView.as_view(model=Instance),
        name='dashboard.views.vm-acl'),
68 69
    url(r'^vm/(?P<pk>\d+)/tx/$', TransferOwnershipView.as_view(),
        name='dashboard.views.vm-transfer-ownership'),
Kálmán Viktor committed
70
    url(r'^vm/list/$', VmList.as_view(), name='dashboard.views.vm-list'),
71 72
    url(r'^vm/create/$', VmCreate.as_view(),
        name='dashboard.views.vm-create'),
73
    url(r'^vm/delete/(?P<pk>\d+)/$', VmDelete.as_view(),
Kálmán Viktor committed
74
        name="dashboard.views.delete-vm"),
75
    url(r'^vm/mass-delete/', VmMassDelete.as_view(),
76
        name='dashboard.view.mass-delete-vm'),
77
    url(r'^vm/(?P<pk>\d+)/activity/$', vm_activity),
78 79
    url(r'^vm/(?P<pk>\d+)/migrate/$', VmMigrateView.as_view(),
        name='dashboard.views.vm-migrate'),
Őry Máté committed
80 81
    url(r'^vm/(?P<pk>\d+)/renew/((?P<key>.*)/?)$', VmRenewView.as_view(),
        name='dashboard.views.vm-renew'),
82 83
    url(r'^vm/activity/(?P<pk>\d+)/$', InstanceActivityDetail.as_view(),
        name='dashboard.views.vm-activity'),
84

85 86 87
    url(r'^node/list/$', NodeList.as_view(), name='dashboard.views.node-list'),
    url(r'^node/(?P<pk>\d+)/$', NodeDetailView.as_view(),
        name='dashboard.views.node-detail'),
88 89
    url(r'^node/(?P<pk>\d+)/add-trait/$', NodeAddTraitView.as_view(),
        name='dashboard.views.node-addtrait'),
90
    url(r'^tx/(?P<key>.*)/?$', TransferOwnershipConfirmView.as_view(),
91
        name='dashboard.views.vm-transfer-ownership-confirm'),
92 93
    url(r'^node/delete/(?P<pk>\d+)/$', NodeDelete.as_view(),
        name="dashboard.views.delete-node"),
94 95
    url(r'^node/status/(?P<pk>\d+)/$', NodeStatus.as_view(),
        name="dashboard.views.status-node"),
96 97
    url(r'^node/flush/(?P<pk>\d+)/$', NodeFlushView.as_view(),
        name="dashboard.views.flush-node"),
98 99
    url(r'^node/create/$', NodeCreate.as_view(),
        name='dashboard.views.node-create'),
100

101 102
    url(r'^favourite/$', FavouriteView.as_view(),
        name='dashboard.views.favourite'),
103 104
    url(r'^group/delete/(?P<pk>\d+)/$', GroupDelete.as_view(),
        name="dashboard.views.delete-group"),
105 106
    url(r'^group/list/$', GroupList.as_view(),
        name='dashboard.views.group-list'),
107
    url((r'^vm/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
108
         r'(?P<time>[0-9]{1,2}[hdwy])$'),
109 110
        VmGraphView.as_view(),
        name='dashboard.views.vm-graph'),
111 112 113 114
    url((r'^node/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
         r'(?P<time>[0-9]{1,2}[hdwy])$'),
        NodeGraphView.as_view(),
        name='dashboard.views.node-graph'),
115 116
    url(r'^group/(?P<pk>\d+)/$', GroupDetailView.as_view(),
        name='dashboard.views.group-detail'),
117 118 119 120
    url(r'^group/(?P<pk>\d+)/acl/$', GroupAclUpdateView.as_view(),
        name='dashboard.views.group-acl'),
    url(r'^groupuser/delete/(?P<pk>\d+)/$', GroupUserDelete.as_view(),
        name="dashboard.views.delete-groupuser"),
121 122 123

    url(r'^notifications/$', NotificationView.as_view(),
        name="dashboard.views.notifications"),
124

125
    url(r'^disk/add/$', DiskAddView.as_view(),
126
        name="dashboard.views.disk-add"),
127 128
    url(r'^disk/(?P<pk>\d+)/remove/$', DiskRemoveView.as_view(),
        name="dashboard.views.disk-remove"),
129 130 131
    url(r'^disk/(?P<pk>\d+)/status/$', get_disk_download_status,
        name="dashboard.views.disk-status"),

132 133 134
    url(r'^interface/(?P<pk>\d+)/delete/$', InterfaceDeleteView.as_view(),
        name="dashboard.views.interface-delete"),

135 136
    url(r'^profile/$', MyPreferencesView.as_view(),
        name="dashboard.views.profile"),
Kálmán Viktor committed
137
)