urls.py 4.42 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, NodeStatus, GroupList, TemplateDelete, LeaseDelete,
10
    VmGraphView, TemplateAclUpdateView, GroupDetailView, GroupDelete,
11
    GroupAclUpdateView, GroupUserDelete, NotificationView, NodeGraphView,
12
    VmMigrateView, DiskAddView, VmDetailVncTokenView,
13
)
14

Kálmán Viktor committed
15 16
urlpatterns = patterns(
    '',
Kálmán Viktor committed
17
    url(r'^$', IndexView.as_view(), name="dashboard.index"),
18 19
    url(r'^lease/(?P<pk>\d+)/$', LeaseDetail.as_view(),
        name="dashboard.views.lease-detail"),
20 21
    url(r'^lease/create/$', LeaseCreate.as_view(),
        name="dashboard.views.lease-create"),
22 23
    url(r'^lease/delete/(?P<pk>\d+)/$', LeaseDelete.as_view(),
        name="dashboard.views.lease-delete"),
24

25 26
    url(r'^template/create/$', TemplateCreate.as_view(),
        name="dashboard.views.template-create"),
27 28
    url(r'template/(?P<pk>\d+)/acl/$', TemplateAclUpdateView.as_view(),
        name='dashboard.views.template-acl'),
29 30
    url(r'^template/(?P<pk>\d+)/$', TemplateDetail.as_view(),
        name='dashboard.views.template-detail'),
31 32
    url(r"^template/list/$", TemplateList.as_view(),
        name="dashboard.views.template-list"),
33 34
    url(r"^template/delete/(?P<pk>\d+)/$", TemplateDelete.as_view(),
        name="dashboard.views.template-delete"),
35

36 37
    url(r'^vm/(?P<pk>\d+)/remove_port/(?P<rule>\d+)/$', PortDelete.as_view(),
        name='dashboard.views.remove-port'),
Kálmán Viktor committed
38 39
    url(r'^vm/(?P<pk>\d+)/$', VmDetailView.as_view(),
        name='dashboard.views.detail'),
40 41
    url(r'^vm/(?P<pk>\d+)/vnctoken/$', VmDetailVncTokenView.as_view(),
        name='dashboard.views.detail-vnc'),
42 43
    url(r'^vm/(?P<pk>\d+)/acl/$', AclUpdateView.as_view(model=Instance),
        name='dashboard.views.vm-acl'),
44 45
    url(r'^vm/(?P<pk>\d+)/tx/$', TransferOwnershipView.as_view(),
        name='dashboard.views.vm-transfer-ownership'),
Kálmán Viktor committed
46
    url(r'^vm/list/$', VmList.as_view(), name='dashboard.views.vm-list'),
47 48
    url(r'^vm/create/$', VmCreate.as_view(),
        name='dashboard.views.vm-create'),
49
    url(r'^vm/delete/(?P<pk>\d+)/$', VmDelete.as_view(),
Kálmán Viktor committed
50
        name="dashboard.views.delete-vm"),
51
    url(r'^vm/mass-delete/', VmMassDelete.as_view(),
52
        name='dashboard.view.mass-delete-vm'),
53
    url(r'^vm/(?P<pk>\d+)/activity/$', vm_activity),
54 55
    url(r'^vm/(?P<pk>\d+)/migrate/$', VmMigrateView.as_view(),
        name='dashboard.views.vm-migrate'),
56

57 58 59
    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'),
60
    url(r'^tx/(?P<key>.*)/?$', TransferOwnershipConfirmView.as_view(),
61
        name='dashboard.views.vm-transfer-ownership-confirm'),
62 63
    url(r'^node/delete/(?P<pk>\d+)/$', NodeDelete.as_view(),
        name="dashboard.views.delete-node"),
64 65
    url(r'^node/status/(?P<pk>\d+)/$', NodeStatus.as_view(),
        name="dashboard.views.status-node"),
66 67
    url(r'^node/create/$', NodeCreate.as_view(),
        name='dashboard.views.node-create'),
68

69 70
    url(r'^favourite/$', FavouriteView.as_view(),
        name='dashboard.views.favourite'),
71 72
    url(r'^group/delete/(?P<pk>\d+)/$', GroupDelete.as_view(),
        name="dashboard.views.delete-group"),
73 74
    url(r'^group/list/$', GroupList.as_view(),
        name='dashboard.views.group-list'),
75
    url((r'^vm/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
76
         r'(?P<time>[0-9]{1,2}[hdwy])$'),
77 78
        VmGraphView.as_view(),
        name='dashboard.views.vm-graph'),
79 80 81 82
    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'),
83 84
    url(r'^group/(?P<pk>\d+)/$', GroupDetailView.as_view(),
        name='dashboard.views.group-detail'),
85 86 87 88
    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"),
89 90 91

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

93
    url(r'^disk/add/$', DiskAddView.as_view(),
94
        name="dashboard.views.disk-add"),
Kálmán Viktor committed
95
)