blob: 02370e7f855043ad184eee6819d58193d285598c [file] [log] [blame]
Nachi Ueno69b3ff62013-06-07 10:28:33 -07001# Neutron VPN plugin
2# ---------------------------
3
4# Save trace setting
5MY_XTRACE=$(set +o | grep xtrace)
6set +o xtrace
7
8
Nachi Ueno584750f2013-07-15 18:22:21 -07009AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
Nachi Ueno69b3ff62013-06-07 10:28:33 -070010VPN_PLUGIN="neutron.services.vpn.plugin.VPNDriverPlugin"
Nachi Ueno1e3d3182013-08-15 18:15:31 -070011IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
Nachi Ueno69b3ff62013-06-07 10:28:33 -070012
13function neutron_vpn_install_agent_packages() {
Nachi Ueno1e3d3182013-08-15 18:15:31 -070014 install_package $IPSEC_PACKAGE
Nachi Ueno69b3ff62013-06-07 10:28:33 -070015}
16
17function neutron_vpn_configure_common() {
Isaku Yamahata9e136b42013-12-16 15:52:03 +090018 _neutron_service_plugin_class_add $VPN_PLUGIN
Nachi Ueno69b3ff62013-06-07 10:28:33 -070019}
20
Akihiro Motokiedddb1f2013-12-09 20:21:06 +090021function neutron_vpn_stop() {
22 local ipsec_data_dir=$DATA_DIR/neutron/ipsec
23 local pids
24 if [ -d $ipsec_data_dir ]; then
25 pids=$(find $ipsec_data_dir -name 'pluto.pid' -exec cat {} \;)
26 fi
27 if [ -n "$pids" ]; then
28 sudo kill $pids
29 fi
30}
31
Nachi Ueno69b3ff62013-06-07 10:28:33 -070032# Restore xtrace
33$MY_XTRACE