urls.py 2.1 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
    TransferOwnershipView, TransferOwnershipConfirmView, NodeDelete,
8 9
    TemplateList, LeaseDetail, NodeCreate,
)
10

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