urls.py 1.87 KB
Newer Older
Kálmán Viktor committed
1
from django.conf.urls import patterns, url
2

3
from vm.models import Instance
4
from .views import (
Kálmán Viktor committed
5
    IndexView, VmDetailView, VmList, VmCreate, TemplateDetail, AclUpdateView,
6
    VmDelete, VmMassDelete, vm_activity, NodeList, NodeDetailView, PortDelete,
7 8
    TransferOwnershipView, TransferOwnershipConfirmView, NodeDelete,
    NodeCreate)
9

Kálmán Viktor committed
10 11
urlpatterns = patterns(
    '',
Kálmán Viktor committed
12
    url(r'^$', IndexView.as_view(), name="dashboard.index"),
13 14
    url(r'^template/(?P<pk>\d+)/$', TemplateDetail.as_view(),
        name='dashboard.views.template-detail'),
15 16
    url(r'^vm/(?P<pk>\d+)/remove_port/(?P<rule>\d+)/$', PortDelete.as_view(),
        name='dashboard.views.remove-port'),
Kálmán Viktor committed
17 18
    url(r'^vm/(?P<pk>\d+)/$', VmDetailView.as_view(),
        name='dashboard.views.detail'),
19 20
    url(r'^vm/(?P<pk>\d+)/acl/$', AclUpdateView.as_view(model=Instance),
        name='dashboard.views.vm-acl'),
21 22
    url(r'^vm/(?P<pk>\d+)/tx/$', TransferOwnershipView.as_view(),
        name='dashboard.views.vm-transfer-ownership'),
Kálmán Viktor committed
23
    url(r'^vm/list/$', VmList.as_view(), name='dashboard.views.vm-list'),
24 25
    url(r'^vm/create/$', VmCreate.as_view(),
        name='dashboard.views.vm-create'),
26
    url(r'^vm/delete/(?P<pk>\d+)/$', VmDelete.as_view(),
Kálmán Viktor committed
27
        name="dashboard.views.delete-vm"),
28
    url(r'^vm/mass-delete/', VmMassDelete.as_view(),
29
        name='dashboard.view.mass-delete-vm'),
30 31 32 33
    url(r'^vm/(?P<pk>\d+)/activity/$', vm_activity),
    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'),
34 35
    url(r'^tx/$', TransferOwnershipConfirmView.as_view(),
        name='dashboard.views.vm-transfer-ownership-confirm'),
36 37 38 39
    url(r'^node/delete/(?P<pk>\d+)/$', NodeDelete.as_view(),
        name="dashboard.views.delete-node"),
    url(r'^node/create/$', NodeCreate.as_view(),
        name='dashboard.views.node-create'),
Kálmán Viktor committed
40
)