views_route_table.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 ssh_key
  13. from views import snapshot
  14. __author__ = 'James Iter'
  15. __date__ = '2017/03/30'
  16. __contact__ = 'james.iter.cn@gmail.com'
  17. __copyright__ = '(c) 2017 by James Iter.'
  18. add_rule_views(config.blueprint, '', views_func='config.show', methods=['GET'])
  19. add_rule_views(config.blueprint, '/create', views_func='config.create', methods=['GET', 'POST'])
  20. add_rule_views(misc.blueprint, 'login', views_func='misc.login', methods=['GET'])
  21. add_rule_views(misc.blueprint, 'change_password', views_func='misc.change_password', methods=['GET'])
  22. add_rule_views(misc.blueprint, 'recover_password', views_func='misc.recover_password', methods=['GET', 'POST'])
  23. add_rule_views(misc.blueprint, 'reset_password/<token>', views_func='misc.reset_password', methods=['GET', 'POST'])
  24. add_rule_views(dashboard.blueprint, '', views_func='dashboard.show', methods=['GET'])
  25. add_rule_views(guest.blueprints, '', views_func='guest.show', methods=['GET'])
  26. add_rule_views(guest.blueprints, '/create', views_func='guest.create', methods=['GET', 'POST'])
  27. add_rule_views(guest.blueprints, '/success', views_func='guest.success', methods=['GET'])
  28. add_rule_views(guest.blueprint, '/vnc/<uuid>', views_func='guest.vnc', methods=['GET'])
  29. add_rule_views(guest.blueprint, '/detail/<uuid>', views_func='guest.detail', methods=['GET'])
  30. add_rule_views(disk.blueprints, '', views_func='disk.show', methods=['GET'])
  31. add_rule_views(disk.blueprints, '/create', views_func='disk.create', methods=['GET', 'POST'])
  32. add_rule_views(disk.blueprint, '/detail/<uuid>', views_func='disk.detail', methods=['GET', 'POST'])
  33. add_rule_views(log.blueprints, '', views_func='log.show', methods=['GET'])
  34. add_rule_views(os_template_image.blueprints, '', views_func='os_template_image.show', methods=['GET'])
  35. add_rule_views(os_template_image.blueprint, '', views_func='os_template_image.create', methods=['POST'])
  36. add_rule_views(host.blueprints, '', views_func='host.show', methods=['GET'])
  37. add_rule_views(host.blueprint, '/detail/<node_id>', views_func='host.detail', methods=['GET'])
  38. add_rule_views(ssh_key.blueprints, '', views_func='ssh_key.show', methods=['GET'])
  39. add_rule_views(ssh_key.blueprint, '', views_func='ssh_key.create', methods=['POST'])
  40. add_rule_views(snapshot.blueprints, '', views_func='snapshot.show', methods=['GET'])