views_route_table.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from jimvc.models import add_rule_views
  4. from jimvc.views import disk, config, os_template_image, snapshot, host, ssh_key, dashboard, log, guest, misc
  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'])
  11. add_rule_views(misc.blueprint, 'login', views_func='misc.login', methods=['GET'])
  12. add_rule_views(misc.blueprint, 'change_password', views_func='misc.change_password', methods=['GET'])
  13. add_rule_views(misc.blueprint, 'recover_password', views_func='misc.recover_password', methods=['GET', 'POST'])
  14. add_rule_views(misc.blueprint, 'reset_password/<token>', views_func='misc.reset_password', methods=['GET', 'POST'])
  15. add_rule_views(misc.blueprint, 'about', views_func='misc.about', methods=['GET'])
  16. add_rule_views(dashboard.blueprint, '', views_func='dashboard.show', methods=['GET'])
  17. add_rule_views(guest.blueprints, '', views_func='guest.show', methods=['GET'])
  18. add_rule_views(guest.blueprints, '/create', views_func='guest.create', methods=['GET'])
  19. add_rule_views(guest.blueprint, '/vnc/<uuid>', views_func='guest.vnc', methods=['GET'])
  20. add_rule_views(guest.blueprint, '/detail/<uuid>', views_func='guest.detail', methods=['GET'])
  21. add_rule_views(disk.blueprints, '', views_func='disk.show', methods=['GET'])
  22. add_rule_views(disk.blueprints, '/create', views_func='disk.create', methods=['GET'])
  23. add_rule_views(disk.blueprint, '/detail/<uuid>', views_func='disk.detail', methods=['GET'])
  24. add_rule_views(log.blueprints, '', views_func='log.show', methods=['GET'])
  25. add_rule_views(os_template_image.blueprints, '', views_func='os_template_image.show', methods=['GET'])
  26. add_rule_views(host.blueprints, '', views_func='host.show', methods=['GET'])
  27. add_rule_views(host.blueprint, '/detail/<node_id>', views_func='host.detail', methods=['GET'])
  28. add_rule_views(ssh_key.blueprints, '', views_func='ssh_key.show', methods=['GET'])
  29. add_rule_views(ssh_key.blueprint, '', views_func='ssh_key.create', methods=['POST'])
  30. add_rule_views(snapshot.blueprints, '', views_func='snapshot.show', methods=['GET'])