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.2KB

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