urls.py 3.09 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,
11
)
12

Kálmán Viktor committed
13 14
urlpatterns = patterns(
    '',
Kálmán Viktor committed
15
    url(r'^$', IndexView.as_view(), name="dashboard.index"),
16 17
    url(r'^lease/(?P<pk>\d+)/$', LeaseDetail.as_view(),
        name="dashboard.views.lease-detail"),
18 19
    url(r'^lease/create/$', LeaseCreate.as_view(),
        name="dashboard.views.lease-create"),
20 21
    url(r'^lease/delete/(?P<pk>\d+)/$', LeaseDelete.as_view(),
        name="dashboard.views.lease-delete"),
22 23
    url(r'^template/create/$', TemplateCreate.as_view(),
        name="dashboard.views.template-create"),
24 25
    url(r'^template/(?P<pk>\d+)/$', TemplateDetail.as_view(),
        name='dashboard.views.template-detail'),
26 27
    url(r"^template/list/$", TemplateList.as_view(),
        name="dashboard.views.template-list"),
28 29
    url(r"^template/delete/(?P<pk>\d+)/$", TemplateDelete.as_view(),
        name="dashboard.views.template-delete"),
30 31
    url(r'^vm/(?P<pk>\d+)/remove_port/(?P<rule>\d+)/$', PortDelete.as_view(),
        name='dashboard.views.remove-port'),
Kálmán Viktor committed
32 33
    url(r'^vm/(?P<pk>\d+)/$', VmDetailView.as_view(),
        name='dashboard.views.detail'),
34 35
    url(r'^vm/(?P<pk>\d+)/acl/$', AclUpdateView.as_view(model=Instance),
        name='dashboard.views.vm-acl'),
36 37
    url(r'^vm/(?P<pk>\d+)/tx/$', TransferOwnershipView.as_view(),
        name='dashboard.views.vm-transfer-ownership'),
Kálmán Viktor committed
38
    url(r'^vm/list/$', VmList.as_view(), name='dashboard.views.vm-list'),
39 40
    url(r'^vm/create/$', VmCreate.as_view(),
        name='dashboard.views.vm-create'),
41
    url(r'^vm/delete/(?P<pk>\d+)/$', VmDelete.as_view(),
Kálmán Viktor committed
42
        name="dashboard.views.delete-vm"),
43
    url(r'^vm/mass-delete/', VmMassDelete.as_view(),
44
        name='dashboard.view.mass-delete-vm'),
45 46 47 48
    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'),
49 50
    url(r'^tx/$', TransferOwnershipConfirmView.as_view(),
        name='dashboard.views.vm-transfer-ownership-confirm'),
51 52
    url(r'^node/delete/(?P<pk>\d+)/$', NodeDelete.as_view(),
        name="dashboard.views.delete-node"),
53 54
    url(r'^node/status/(?P<pk>\d+)/$', NodeStatus.as_view(),
        name="dashboard.views.status-node"),
55 56
    url(r'^node/create/$', NodeCreate.as_view(),
        name='dashboard.views.node-create'),
57 58
    url(r'^favourite/$', FavouriteView.as_view(),
        name='dashboard.views.favourite'),
59 60
    url(r'^group/list/$', GroupList.as_view(),
        name='dashboard.views.group-list'),
61 62 63 64
    url((r'^vm/(?P<pk>\d+)/graph/(?P<metric>cpu|memory|network)/'
         r'(?P<time>[0-9]+[hdwy])$'),
        VmGraphView.as_view(),
        name='dashboard.views.vm-graph'),
Kálmán Viktor committed
65
)