Generate the Neutron VPNaaS sample config files by using the oslo
generator. The files are generated with a .sample extension and
replace the static example configuration files.
Once the generation code is delivered, the static config files
will be removed.
Change-Id: Icef8f7e8f0e8e78bfffa7a5af3f9f2300376b115
Related-blueprint: autogen-neutron-conf-file
Partial-bug: #1199963
Depends-On: I4a6094b8218dfd320d05bfb1e3bc121e8930c551
| ... | ... |
@@ -1079,8 +1079,10 @@ function _configure_neutron_fwaas {
|
| 1079 | 1079 |
} |
| 1080 | 1080 |
|
| 1081 | 1081 |
function _configure_neutron_vpn {
|
| 1082 |
- if [ -f $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf ]; then |
|
| 1083 |
- cp $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf $NEUTRON_CONF_DIR |
|
| 1082 |
+ # Uses oslo config generator to generate VPNaaS sample configuration files |
|
| 1083 |
+ (cd $NEUTRON_VPNAAS_DIR && exec ./tools/generate_config_file_samples.sh) |
|
| 1084 |
+ if [ -f $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf.sample ]; then |
|
| 1085 |
+ cp $NEUTRON_VPNAAS_DIR/etc/neutron_vpnaas.conf.sample $NEUTRON_CONF_DIR/neutron_vpnaas.conf |
|
| 1084 | 1086 |
fi |
| 1085 | 1087 |
neutron_vpn_install_agent_packages |
| 1086 | 1088 |
neutron_vpn_configure_common |
| ... | ... |
@@ -29,7 +29,9 @@ function neutron_vpn_configure_common {
|
| 29 | 29 |
} |
| 30 | 30 |
|
| 31 | 31 |
function neutron_vpn_configure_agent {
|
| 32 |
- cp $NEUTRON_VPNAAS_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE |
|
| 32 |
+ # Uses oslo config generator to generate LBaaS sample configuration files |
|
| 33 |
+ (cd $NEUTRON_VPNAAS_DIR && exec ./tools/generate_config_file_samples.sh) |
|
| 34 |
+ cp $NEUTRON_VPNAAS_DIR/etc/vpn_agent.ini.sample $Q_VPN_CONF_FILE |
|
| 33 | 35 |
if [[ "$IPSEC_PACKAGE" == "strongswan" ]]; then |
| 34 | 36 |
iniset_multiline $Q_VPN_CONF_FILE vpnagent vpn_device_driver neutron_vpnaas.services.vpn.device_drivers.strongswan_ipsec.StrongSwanDriver |
| 35 | 37 |
if is_fedora; then |