urls.py 4.69 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 (
Őry Máté committed
5 6 7 8 9 10 11 12 13
    AclUpdateView, DiskAddView, FavouriteView, GroupAclUpdateView, GroupDelete,
    GroupDetailView, GroupList, GroupUserDelete, IndexView, LeaseCreate,
    LeaseDelete, LeaseDetail, NodeAddTraitView, NodeCreate, NodeDelete,
    NodeDetailView, NodeGraphView, NodeList, NodeStatus, NotificationView,
    PortDelete, TemplateAclUpdateView, TemplateCreate, TemplateDelete,
    TemplateDetail, TemplateList, TransferOwnershipConfirmView,
    TransferOwnershipView, vm_activity, VmCreate, VmDelete, VmDetailView,
    VmDetailVncTokenView, VmGraphView, VmList, VmMassDelete, VmMigrateView,
    VmRenewView,
14
)
15

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

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

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

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

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

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

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