Change-Id: I3e5c618237531452c8649d10ef1eb6284919fa31
| ... | ... |
@@ -202,6 +202,11 @@ source $TOP_DIR/lib/neutron_plugins/$Q_PLUGIN |
| 202 | 202 |
# Hardcoding for 1 service plugin for now |
| 203 | 203 |
source $TOP_DIR/lib/neutron_plugins/services/loadbalancer |
| 204 | 204 |
|
| 205 |
+# VPN service plugin functions |
|
| 206 |
+# ------------------------------------------- |
|
| 207 |
+# Hardcoding for 1 service plugin for now |
|
| 208 |
+source $TOP_DIR/lib/neutron_plugins/services/vpn |
|
| 209 |
+ |
|
| 205 | 210 |
# Use security group or not |
| 206 | 211 |
if has_neutron_plugin_security_group; then |
| 207 | 212 |
Q_USE_SECGROUP=${Q_USE_SECGROUP:-True}
|
| ... | ... |
@@ -222,6 +227,9 @@ function configure_neutron() {
|
| 222 | 222 |
if is_service_enabled q-lbaas; then |
| 223 | 223 |
_configure_neutron_lbaas |
| 224 | 224 |
fi |
| 225 |
+ if is_service_enabled q-vpn; then |
|
| 226 |
+ _configure_neutron_vpn |
|
| 227 |
+ fi |
|
| 225 | 228 |
if is_service_enabled q-svc; then |
| 226 | 229 |
_configure_neutron_service |
| 227 | 230 |
fi |
| ... | ... |
@@ -248,6 +256,7 @@ function create_nova_conf_neutron() {
|
| 248 | 248 |
iniset $NOVA_CONF DEFAULT quantum_admin_auth_url "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0" |
| 249 | 249 |
iniset $NOVA_CONF DEFAULT quantum_auth_strategy "$Q_AUTH_STRATEGY" |
| 250 | 250 |
iniset $NOVA_CONF DEFAULT quantum_admin_tenant_name "$SERVICE_TENANT_NAME" |
| 251 |
+ iniset $NOVA_CONF DEFAULT quantum_region_name "RegionOne" |
|
| 251 | 252 |
iniset $NOVA_CONF DEFAULT quantum_url "http://$Q_HOST:$Q_PORT" |
| 252 | 253 |
|
| 253 | 254 |
if [[ "$Q_USE_SECGROUP" == "True" ]]; then |
| ... | ... |
@@ -536,7 +545,8 @@ function _configure_neutron_l3_agent() {
|
| 536 | 536 |
Q_L3_ENABLED=True |
| 537 | 537 |
# for l3-agent, only use per tenant router if we have namespaces |
| 538 | 538 |
Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE |
| 539 |
- AGENT_L3_BINARY="$NEUTRON_BIN_DIR/neutron-l3-agent" |
|
| 539 |
+ |
|
| 540 |
+ AGENT_L3_BINARY=${AGENT_L3_BINARY:-"$NEUTRON_BIN_DIR/neutron-l3-agent"}
|
|
| 540 | 541 |
Q_L3_CONF_FILE=$NEUTRON_CONF_DIR/l3_agent.ini |
| 541 | 542 |
|
| 542 | 543 |
cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE |
| ... | ... |
@@ -571,6 +581,13 @@ function _configure_neutron_lbaas() {
|
| 571 | 571 |
neutron_agent_lbaas_configure_agent |
| 572 | 572 |
} |
| 573 | 573 |
|
| 574 |
+function _configure_neutron_vpn() |
|
| 575 |
+{
|
|
| 576 |
+ neutron_vpn_install_agent_packages |
|
| 577 |
+ neutron_vpn_configure_common |
|
| 578 |
+ neutron_vpn_configure_agent |
|
| 579 |
+} |
|
| 580 |
+ |
|
| 574 | 581 |
# _configure_neutron_plugin_agent() - Set config files for neutron plugin agent |
| 575 | 582 |
# It is called when q-agt is enabled. |
| 576 | 583 |
function _configure_neutron_plugin_agent() {
|
| 577 | 584 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,29 @@ |
| 0 |
+# Neutron VPN plugin |
|
| 1 |
+# --------------------------- |
|
| 2 |
+ |
|
| 3 |
+# Save trace setting |
|
| 4 |
+MY_XTRACE=$(set +o | grep xtrace) |
|
| 5 |
+set +o xtrace |
|
| 6 |
+ |
|
| 7 |
+ |
|
| 8 |
+VPN_BINARY="$NEUTRON_DIR/bin/neutron-vpn-agent" |
|
| 9 |
+VPN_PLUGIN="neutron.services.vpn.plugin.VPNDriverPlugin" |
|
| 10 |
+ |
|
| 11 |
+function neutron_vpn_install_agent_packages() {
|
|
| 12 |
+ install_package strongswan |
|
| 13 |
+} |
|
| 14 |
+ |
|
| 15 |
+function neutron_vpn_configure_common() {
|
|
| 16 |
+ if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then |
|
| 17 |
+ Q_SERVICE_PLUGIN_CLASSES=$VPN_PLUGIN |
|
| 18 |
+ else |
|
| 19 |
+ Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$VPN_PLUGIN" |
|
| 20 |
+ fi |
|
| 21 |
+} |
|
| 22 |
+ |
|
| 23 |
+function neutron_vpn_configure_agent() {
|
|
| 24 |
+ AGENT_L3_BINARY="$NEUTRON_DIR/bin/neutron-vpn-agent" |
|
| 25 |
+} |
|
| 26 |
+ |
|
| 27 |
+# Restore xtrace |
|
| 28 |
+$MY_XTRACE |