523f488036
I noticed this when debugging some grenade issues failures. An include of grenade/functions stores the current value of XTRACE (on) and disables xtrace for the rest of the import. We then include devstack's "functions" library, which now overwrites the stored value of XTRACE the current state; i.e. disabled. When it finishes it restores the prior state (disabled), and then grenade restores the same value of XTRACE (disabled). The result is that xtrace is incorrectly disabled until the next time it just happens to be turned on. The solution is to name-space the store of the current-value of xtrace so when we finish sourcing a file, we always restore the tracing value to what it was when we entered. Some files had already discovered this. In general there is inconsistency around the setting of the variable, and a lot of obvious copy-paste. This brings consistency across all files by using _XTRACE_* prefixes for the sotre/restore of tracing values. Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
70 lines
2.2 KiB
Bash
70 lines
2.2 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Nuage Neutron Plugin
|
|
# ----------------------
|
|
|
|
# Save trace setting
|
|
_XTRACE_NEUTRON_NU=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
function neutron_plugin_create_nova_conf {
|
|
NOVA_OVS_BRIDGE=${NOVA_OVS_BRIDGE:-"br-int"}
|
|
iniset $NOVA_CONF neutron ovs_bridge $NOVA_OVS_BRIDGE
|
|
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
|
|
iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
|
|
}
|
|
|
|
function neutron_plugin_install_agent_packages {
|
|
:
|
|
}
|
|
|
|
function neutron_plugin_configure_common {
|
|
Q_PLUGIN_CONF_PATH=etc/neutron/plugins/nuage
|
|
Q_PLUGIN_CONF_FILENAME=nuage_plugin.ini
|
|
Q_PLUGIN_CLASS="neutron.plugins.nuage.plugin.NuagePlugin"
|
|
Q_PLUGIN_EXTENSIONS_PATH=neutron/plugins/nuage/extensions
|
|
#Nuage specific Neutron defaults. Actual value must be set and sourced
|
|
NUAGE_CNA_SERVERS=${NUAGE_CNA_SERVERS:-'localhost:8443'}
|
|
NUAGE_CNA_SERVER_AUTH=${NUAGE_CNA_SERVER_AUTH:-'username:password'}
|
|
NUAGE_CNA_ORGANIZATION=${NUAGE_CNA_ORGANIZATION:-'org'}
|
|
NUAGE_CNA_SERVER_SSL=${NUAGE_CNA_SERVER_SSL:-'True'}
|
|
NUAGE_CNA_BASE_URI=${NUAGE_CNA_BASE_URI:-'/'}
|
|
NUAGE_CNA_AUTH_RESOURCE=${NUAGE_CNA_AUTH_RESOURCE:-'/'}
|
|
NUAGE_CNA_DEF_NETPART_NAME=${NUAGE_CNA_DEF_NETPART_NAME:-''}
|
|
}
|
|
|
|
function neutron_plugin_configure_debug_command {
|
|
:
|
|
}
|
|
|
|
function neutron_plugin_configure_dhcp_agent {
|
|
:
|
|
}
|
|
|
|
function neutron_plugin_configure_l3_agent {
|
|
:
|
|
}
|
|
|
|
function neutron_plugin_configure_plugin_agent {
|
|
:
|
|
}
|
|
|
|
function neutron_plugin_configure_service {
|
|
iniset $NEUTRON_CONF DEFAULT api_extensions_path neutron/plugins/nuage/extensions/
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy base_uri $NUAGE_CNA_BASE_URI
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy serverssl $NUAGE_CNA_SERVER_SSL
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy serverauth $NUAGE_CNA_SERVER_AUTH
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy organization $NUAGE_CNA_ORGANIZATION
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy server $NUAGE_CNA_SERVERS
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy auth_resource $NUAGE_CNA_AUTH_RESOURCE
|
|
iniset /$Q_PLUGIN_CONF_FILE restproxy default_net_partition_name $NUAGE_CNA_DEF_NETPART_NAME
|
|
}
|
|
|
|
function has_neutron_plugin_security_group {
|
|
# 1 means False here
|
|
return 1
|
|
}
|
|
|
|
# Restore xtrace
|
|
$_XTRACE_NEUTRON_NU
|