lib/neutron: Add neutron_deploy_rootwrap_filters

Change-Id: Icfa2cfa662013324d38099b82ce0f58ed8377e60
This commit is contained in:
YAMAMOTO Takashi 2017-02-23 22:30:08 -05:00
parent a1875b1ffc
commit c043b6f8a8

View File

@ -521,6 +521,13 @@ function neutron_server_config_add_new {
_NEUTRON_SERVER_EXTRA_CONF_FILES_ABS+=($1)
}
# neutron_deploy_rootwrap_filters() - deploy rootwrap filters
function neutron_deploy_rootwrap_filters_new {
local srcdir=$1
sudo install -d -o root -g root -m 755 $NEUTRON_CONF_DIR/rootwrap.d
sudo install -o root -g root -m 644 $srcdir/etc/neutron/rootwrap.d/*.filters $NEUTRON_CONF_DIR/rootwrap.d
}
# Dispatch functions
# These are needed for compatibility between the old and new implementations
# where there are function name overlaps. These will be removed when
@ -626,5 +633,14 @@ function stop_neutron {
fi
}
function neutron_deploy_rootwrap_filters {
if is_neutron_legacy_enabled; then
# Call back to old function
_neutron_deploy_rootwrap_filters "$@"
else
neutron_deploy_rootwrap_filters_new "$@"
fi
}
# Restore xtrace
$XTRACE