コード例 #1
0
ファイル: urls.py プロジェクト: tilakkalyan/rockstor-core
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),

    # REST API
    url(r'^api/login', LoginView.as_view(), name='login-api-view'),
    url(r'^api/appliances/$', AppliancesView.as_view(),
        name='appliances-view'),
    url(r'^api/appliances/(?P<id>\d+)$', AppliancesView.as_view(),
        name='appliances-view'),
    url(r'^api/tools/sysdisks', SystemDiskView.as_view(), name='sys-disk-view'),
    url(r'^api/tools/sysinfo', InfoView.as_view(), name='sys-info'),

    # Disks section
    url(r'^api/disks/$', DiskView.as_view(), name='disk-view'),
    url(r'^api/disks/(?P<dname>.*)/$', DiskView.as_view(), name='disk-view'),

    # Pools section
    url(r'^api/pools/$', PoolView.as_view(), name='pool-view'),
    url(r'^api/pools/(?P<pname>[A-Za-z0-9_]+)/$', PoolView.as_view(),
        name='pool-view'),
    url(r'^api/pools/(?P<pname>[A-Za-z0-9_]+)/(?P<command>.*)/$',
        PoolView.as_view(), name='pool-view'),

    # Shares section
    url(r'^api/shares/$', ShareView.as_view(), name='share-view'),
    url(r'^api/shares/(?P<sname>[A-Za-z0-9_]+)/$', ShareView.as_view(),
        name='share-view'),
    url(r'^api/shares/(?P<sname>[A-Za-z0-9_]+)/nfs/$', ShareNFSView.as_view(),
        name='nfs-view'),
コード例 #2
0
ファイル: disks.py プロジェクト: stennety/rockstor-core
"""
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.

RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

RockStor is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from django.conf.urls.defaults import patterns, url
from storageadmin.views import DiskView


urlpatterns = patterns(
    '',
    url(r'^$', DiskView.as_view(), name='disk-view'),
    url(r'(?P<dname>[A-Za-z]+[A-Za-z0-9]*)$', DiskView.as_view(),
        name='user-view'),
)
コード例 #3
0
ファイル: disks.py プロジェクト: YukihitoHARA/rockstor-core
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.

RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

RockStor is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from django.conf.urls import patterns, url
from storageadmin.views import DiskView

disk_regex = '[A-Za-z]+[A-Za-z0-9]*'

urlpatterns = patterns(
    '',
    url(r'^$', DiskView.as_view()),
    url(r'^/(?P<command>scan)$', DiskView.as_view()),
    url(r'^/(?P<dname>%s)$' % disk_regex, DiskView.as_view()),
    url(r'^/(?P<dname>%s)/(?P<command>wipe|btrfs-wipe|btrfs-disk-import|blink-drive)$' %
        disk_regex, DiskView.as_view()),
)
コード例 #4
0
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.

RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

RockStor is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from django.conf.urls import patterns, url
from storageadmin.views import DiskView

disk_regex = '[A-Za-z]+[A-Za-z0-9]*'

urlpatterns = patterns(
    '',
    url(r'^$', DiskView.as_view()),
    url(r'^/(?P<command>scan)$', DiskView.as_view()),
    url(r'^/(?P<dname>%s)$' % disk_regex, DiskView.as_view()),
    url(r'^/(?P<dname>%s)/(?P<command>wipe)$' % disk_regex,
        DiskView.as_view()),
)