views_route_table.py 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from models.utils import add_rule_views
  4. from views import guest
  5. from views import disk
  6. from views import log
  7. from views import host
  8. from views import dashboard
  9. from views import config
  10. from views import misc
  11. from views import os_template_image
  12. from views import os_template, boot_job, operate_rule
  13. __author__ = 'James Iter'
  14. __date__ = '2017/03/30'
  15. __contact__ = 'james.iter.cn@gmail.com'
  16. __copyright__ = '(c) 2017 by James Iter.'
  17. add_rule_views(config.blueprint, '', views_func='config.show', methods=['GET'])
  18. add_rule_views(config.blueprint, '/create', views_func='config.create', methods=['GET', 'POST'])
  19. add_rule_views(misc.blueprint, 'login', views_func='misc.login', methods=['GET'])
  20. add_rule_views(misc.blueprint, 'change_password', views_func='misc.change_password', methods=['GET'])
  21. add_rule_views(misc.blueprint, 'recover_password', views_func='misc.recover_password', methods=['GET', 'POST'])
  22. add_rule_views(misc.blueprint, 'reset_password/<token>', views_func='misc.reset_password', methods=['GET', 'POST'])
  23. add_rule_views(dashboard.blueprint, '', views_func='dashboard.show', methods=['GET'])
  24. add_rule_views(guest.blueprints, '', views_func='guest.show', methods=['GET'])
  25. add_rule_views(guest.blueprints, '/create', views_func='guest.create', methods=['GET', 'POST'])
  26. add_rule_views(guest.blueprints, '/success', views_func='guest.success', methods=['GET'])
  27. add_rule_views(guest.blueprint, '/vnc/<uuid>', views_func='guest.vnc', methods=['GET'])
  28. add_rule_views(guest.blueprint, '/detail/<uuid>', views_func='guest.detail', methods=['GET'])
  29. add_rule_views(guest.blueprint, '/boot_jobs/<uuid>', views_func='guest.show_boot_job', methods=['GET'])
  30. add_rule_views(guest.blueprints, '/boot_jobs_list', views_func='guest.show_guests_boot_jobs', methods=['GET'])
  31. add_rule_views(disk.blueprints, '', views_func='disk.show', methods=['GET'])
  32. add_rule_views(disk.blueprints, '/create', views_func='disk.create', methods=['GET', 'POST'])
  33. add_rule_views(disk.blueprint, '/detail/<uuid>', views_func='disk.detail', methods=['GET', 'POST'])
  34. add_rule_views(log.blueprints, '', views_func='log.show', methods=['GET'])
  35. add_rule_views(os_template_image.blueprints, '', views_func='os_template_image.show', methods=['GET'])
  36. add_rule_views(os_template_image.blueprint, '', views_func='os_template_image.create', methods=['POST'])
  37. add_rule_views(os_template.blueprints, '', views_func='os_template.show', methods=['GET'])
  38. add_rule_views(os_template.blueprint, '', views_func='os_template.create', methods=['POST'])
  39. add_rule_views(boot_job.blueprints, '', views_func='boot_job.show', methods=['GET'])
  40. add_rule_views(boot_job.blueprint, '', views_func='boot_job.create', methods=['POST'])
  41. add_rule_views(operate_rule.blueprints, '', views_func='operate_rule.show', methods=['GET'])
  42. add_rule_views(operate_rule.blueprint, '', views_func='operate_rule.create', methods=['POST'])
  43. add_rule_views(host.blueprints, '', views_func='host.show', methods=['GET'])
  44. add_rule_views(host.blueprint, '/detail/<node_id>', views_func='host.detail', methods=['GET'])