from django.conf.urls import patterns, include, url
from django.contrib import admin
import autopform,manager_kvm,webkvm
admin.autodiscover()

urlpatterns = patterns('',

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$','autopform.views.index'),
    url(r'^change_projects/(?P<id>\d+)/$','autopform.views.index2'),
    url(r'^login/','autopform.views.login'),
    url(r'^logout/','autopform.views.logout'),
    url(r'^changepasswd/','autopform.views.changepasswd'),
    url(r'^zcloud_data/','webkvm.views.zcloud_data'),
    url(r'^mirror_data/','webkvm.views.mirror_data'),
    url(r'^webkvm/$','webkvm.views.servers_webkvm'),
    url(r'^webkvm/edit/(?P<id>\d+)/$','webkvm.views.edit_host'),
    url(r'^webkvm/edit_show/(?P<id>\d+)/$','webkvm.views.show_host'),
    url(r'^webkvm/managerHost/(?P<id>\d+)/$','webkvm.views.manager_Host'),
    url(r'^webkvm/search_kvm/(?P<id>\d+)/$','webkvm.views.search_kvm'),
    url(r'^webkvm/search_kvm/$','webkvm.views.search_kvm2'),
    url(r'^webkvm/search_projects/$','webkvm.views.search_projects'),
    url(r'^webkvm/show_key/(?P<id>\d+)/$','webkvm.views.show_key'),
    url(r'^webkvm/show_key/$','webkvm.views.show_key2'),
    url(r'^webkvm/create_key/(?P<id>\d+)/$','webkvm.views.create_key'),
    url(r'^webkvm/create_key/$','webkvm.views.create_key2'),
    url(r'^webkvm/delete_key/(?P<id>\d+)/$','webkvm.views.delete_key'),
    url(r'^manager/shutdown_Host/$','manager_kvm.views.shutdown_Host'),
    url(r'^manager/shutdown_Host/shutdown_all/$','manager_kvm.views.shutdown_all'),
    url(r'^manager/snapshot/$','manager_kvm.views.snapshot'),
    url(r'^manager/snapshot/create_snapshot/(?P<id>\d+)/$','manager_kvm.views.snapshot_create'),
    url(r'^manager/snapshot/show_snapshot/(?P<id>\d+)/$','manager_kvm.views.show_snapshot'),
    url(r'^manager/snapshot/del_snapshot/(?P<id>\d+)/(?P<k>\d+)$','manager_kvm.views.del_snapshot'),
    url(r'^manager/snapshot/re_snapshot/(?P<id>\d+)/(?P<k>\d+)$','manager_kvm.views.re_snapshot'),
    url(r'^manager/show_cloudname/(?P<id>\d+)/$','manager_kvm.views.show_cloudname'),
    url(r'^manager/editname/(?P<id>\d+)/$','manager_kvm.views.editname'),
    url(r'^webkvm/join_salt/(?P<id>\d+)/$','webkvm.views.join_salt'),
    url(r'^webkvm/manager_kvm/$','webkvm.views.manager_kvm'),
    url(r'^webkvm/show_snap/$','webkvm.views.show_snap'),
    url(r'^webkvm/show_snap/(?P<id>\d+)/$','webkvm.views.show_snap2'),
    url(r'^webkvm/manager_kvm/change_projects/(?P<id>\d+)/$','webkvm.views.change_projects'),
    url(r'^webkvm/manager_kvm/start/(?P<id>\d+)/$','webkvm.views.start'),
    url(r'^webkvm/manager_kvm/shutdown/(?P<id>\d+)/$','webkvm.views.shutdown'),
    url(r'^webkvm/manager_kvm/reboot/(?P<id>\d+)/$','webkvm.views.reboot'),
    url(r'^webkvm/manager_kvm/del_vm/(?P<id>\d+)/$','webkvm.views.del_vm'),
    url(r'^webkvm/addHost/$','manager_kvm.views.addHost_kvm'),
    url(r'^get_system/$','manager_kvm.views.get_system'),
    url(r'^clouddisk/(?P<id>\d+)/$','clouddisk.views.clouddisk_index'),
    url(r'^clouddisk/$','clouddisk.views.clouddisk_index2'),
    url(r'^clouddisk/add/$','clouddisk.views.addclouddisk'),
    url(r'^clouddisk/delimage/(?P<id>\d+)/$','clouddisk.views.delimage'),
    url(r'^clouddisk/mountclouddisk/(?P<id>\d+)/$','clouddisk.views.mountclouddisk'),
    url(r'^clouddisk/mountdisk/(?P<id>\d+)/$','clouddisk.views.mountdisk'),
    url(r'^clouddisk/umountdisk/(?P<id>\d+)/$','clouddisk.views.umountdisk'),
    url(r'^clouddisk/editsnap/(?P<id>\d+)/$','clouddisk.views.showcloudsnap'),
    url(r'^clouddisk/createsnap/(?P<id>\d+)/$','clouddisk.views.snapshotclouddisk'),
    url(r'^clouddisk/showsnap/(?P<id>\d+)/$','clouddisk.views.showclouddisk'),
    url(r'^clouddisk/delsnap/(?P<id>\d+)/(?P<k>\d+)/$','clouddisk.views.delclouddisk'),
    url(r'^clouddisk/rollback/(?P<id>\d+)/(?P<k>\d+)/$','clouddisk.views.rollbackclouddisk'),
    url(r'^clouddisk/rollbacklog/(?P<id>\d+)/(?P<k>\d+)/$','clouddisk.views.rollback_log'),
    url(r'^clouddisk/search_clouddisk/$','clouddisk.views.search_clouddisk'),
    url(r'^vnc_start/(?P<id>\d+)/$','manager_kvm.views.vnc_start'),
    url(r'^users/add/','users.views.add'),
    url(r'^users/edit/','users.views.edit'),
    url(r'^users/index/','users.views.index'),
    url(r'^users/changeStatus','users.views.changeStatus'),
    url(r'^users/getUserInfo/(?P<id>\d+)/$', 'users.views.getUserInfo'),
    url(r'^users/getUserProInfo/(?P<id>\d+)/$', 'users.views.getUserProInfo'),
    url(r'^users/editUserProInfo/(?P<id>\d+)/$', 'users.views.editUserProInfo'),
    url(r'^pro/add/','pro_manage.views.add'),
    url(r'^pro/edit/','pro_manage.views.edit'),
    url(r'^pro/index/','pro_manage.views.index'),
    url(r'^pro/getProInfo/(?P<id>\d+)/$', 'pro_manage.views.getProInfo'),
    url(r'^pro/getProMembersInfo/(?P<id>\d+)/$', 'pro_manage.views.getProMembersInfo'),
    url(r'^pro/editProMembers/(?P<id>\d+)/$', 'pro_manage.views.editProMembers'),
)
