urls.py 2.43 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
    TemplateList, LeaseDetail, NodeCreate, LeaseCreate, TemplateCreate,
9
    FavouriteView,
10
)
11

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