views_route_table.py 2.3 KB

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