OpenStack Networking (Neutron)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plugin.sh 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. LIBDIR=$DEST/neutron/devstack/lib
  2. source $LIBDIR/dns
  3. source $LIBDIR/flavors
  4. source $LIBDIR/l2_agent
  5. source $LIBDIR/l2_agent_sriovnicswitch
  6. source $LIBDIR/l3_agent
  7. source $LIBDIR/ml2
  8. source $LIBDIR/qos
  9. source $LIBDIR/ovs
  10. source $LIBDIR/segments
  11. source $LIBDIR/trunk
  12. source $LIBDIR/log
  13. Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT)
  14. if [ -f $LIBDIR/${NEUTRON_AGENT}_agent ]; then
  15. source $LIBDIR/${NEUTRON_AGENT}_agent
  16. fi
  17. if [[ "$1" == "stack" ]]; then
  18. case "$2" in
  19. install)
  20. if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
  21. [[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
  22. remove_ovs_packages
  23. compile_ovs True /usr /var
  24. start_new_ovs
  25. fi
  26. ;;
  27. post-config)
  28. if is_service_enabled q-flavors neutron-flavors; then
  29. configure_flavors
  30. fi
  31. if is_service_enabled q-qos neutron-qos; then
  32. configure_qos
  33. fi
  34. if is_service_enabled q-trunk neutron-trunk; then
  35. configure_trunk_extension
  36. fi
  37. if is_service_enabled q-log neutron-log; then
  38. configure_log
  39. fi
  40. if is_service_enabled q-dns neutron-dns; then
  41. configure_dns_extension
  42. post_config_dns_extension
  43. if is_service_enabled designate; then
  44. configure_dns_integration
  45. fi
  46. fi
  47. if is_service_enabled neutron-segments; then
  48. configure_segments_extension
  49. fi
  50. if is_service_enabled q-agt neutron-agent; then
  51. configure_l2_agent
  52. fi
  53. #Note: sriov agent should run with OVS or linux bridge agent
  54. #because they are the mechanisms that bind the DHCP and router ports.
  55. #Currently devstack lacks the option to run two agents on the same node.
  56. #Therefore we create new service, q-sriov-agt, and the
  57. # q-agt/neutron-agent should be OVS or linux bridge.
  58. if is_service_enabled q-sriov-agt neutron-sriov-agent; then
  59. configure_$NEUTRON_CORE_PLUGIN
  60. configure_l2_agent
  61. configure_l2_agent_sriovnicswitch
  62. fi
  63. if is_service_enabled q-l3 neutron-l3; then
  64. if is_service_enabled q-qos neutron-qos; then
  65. configure_l3_agent_extension_fip_qos
  66. fi
  67. configure_l3_agent
  68. fi
  69. if [ $NEUTRON_CORE_PLUGIN = ml2 ]; then
  70. configure_ml2_extension_drivers
  71. fi
  72. ;;
  73. extra)
  74. if is_service_enabled q-sriov-agt neutron-sriov-agent; then
  75. start_l2_agent_sriov
  76. fi
  77. ;;
  78. esac
  79. elif [[ "$1" == "unstack" ]]; then
  80. if is_service_enabled q-sriov-agt neutron-sriov-agent; then
  81. stop_l2_agent_sriov
  82. fi
  83. if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
  84. [[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
  85. stop_new_ovs
  86. fi
  87. fi