Skip to content

Commit

Permalink
Use lowercase section names in Neutron (aka Quantum)
Browse files Browse the repository at this point in the history
Fixes bug 1194064

The DEFAULT section remains the same.

In addition to this the sql_connection has been changed to
connection - this is for OSLO DB support.

Change-Id: I56175146941a9cae966033b557e44097e29a5d43
  • Loading branch information
Gary Kotton committed Jun 26, 2013
1 parent b3e8ea8 commit d42634f
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 52 deletions.
8 changes: 4 additions & 4 deletions lib/quantum
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ function _configure_quantum_common() {
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE

iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection `database_connection_url $Q_DB_NAME`
iniset /$Q_PLUGIN_CONF_FILE database connection `database_connection_url $Q_DB_NAME`
iniset $QUANTUM_CONF DEFAULT state_path $DATA_DIR/quantum

# If addition config files are set, make sure their path name is set as well
Expand Down Expand Up @@ -494,7 +494,7 @@ function _configure_quantum_debug_command() {
iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT root_helper "$Q_RR_COMMAND"
# Intermediate fix until Quantum patch lands and then line above will
# be cleaned.
iniset $QUANTUM_TEST_CONFIG_FILE AGENT root_helper "$Q_RR_COMMAND"
iniset $QUANTUM_TEST_CONFIG_FILE agent root_helper "$Q_RR_COMMAND"

_quantum_setup_keystone $QUANTUM_TEST_CONFIG_FILE DEFAULT set_auth_url
_quantum_setup_interface_driver $QUANTUM_TEST_CONFIG_FILE
Expand Down Expand Up @@ -563,7 +563,7 @@ function _configure_quantum_lbaas() {
function _configure_quantum_plugin_agent() {
# Specify the default root helper prior to agent configuration to
# ensure that an agent's configuration can override the default
iniset /$Q_PLUGIN_CONF_FILE AGENT root_helper "$Q_RR_COMMAND"
iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND"
iniset $QUANTUM_CONF DEFAULT verbose True
iniset $QUANTUM_CONF DEFAULT debug True

Expand Down Expand Up @@ -645,7 +645,7 @@ function _quantum_setup_rootwrap() {
sudo mv $TEMPFILE /etc/sudoers.d/quantum-rootwrap

# Update the root_helper
iniset $QUANTUM_CONF AGENT root_helper "$Q_RR_COMMAND"
iniset $QUANTUM_CONF agent root_helper "$Q_RR_COMMAND"
}

# Configures keystone integration for quantum service and agents
Expand Down
4 changes: 2 additions & 2 deletions lib/quantum_plugins/bigswitch_floodlight
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function quantum_plugin_configure_plugin_agent() {
}

function quantum_plugin_configure_service() {
iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servers $BS_FL_CONTROLLERS_PORT
iniset /$Q_PLUGIN_CONF_FILE RESTPROXY servertimeout $BS_FL_CONTROLLER_TIMEOUT
iniset /$Q_PLUGIN_CONF_FILE restproxy servers $BS_FL_CONTROLLERS_PORT
iniset /$Q_PLUGIN_CONF_FILE restproxy servertimeout $BS_FL_CONTROLLER_TIMEOUT
}

function quantum_plugin_setup_interface_driver() {
Expand Down
10 changes: 5 additions & 5 deletions lib/quantum_plugins/linuxbridge
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function quantum_plugin_configure_common() {

function quantum_plugin_configure_service() {
if [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE VLANS tenant_network_type vlan
iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
else
echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
fi
Expand All @@ -28,20 +28,20 @@ function quantum_plugin_configure_service() {
fi
fi
if [[ "$LB_VLAN_RANGES" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE VLANS network_vlan_ranges $LB_VLAN_RANGES
iniset /$Q_PLUGIN_CONF_FILE vlans network_vlan_ranges $LB_VLAN_RANGES
fi
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver
else
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver
fi

# Define extra "LINUX_BRIDGE" configuration options when q-svc is configured by defining
# the array ``Q_SRV_EXTRA_OPTS``.
# For Example: ``Q_SRV_EXTRA_OPTS=(foo=true bar=2)``
for I in "${Q_SRV_EXTRA_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE LINUX_BRIDGE ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE linux_bridge ${I/=/ }
done
}

Expand Down
10 changes: 5 additions & 5 deletions lib/quantum_plugins/linuxbridge_agent
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ function quantum_plugin_configure_plugin_agent() {
LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
fi
if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE LINUX_BRIDGE physical_interface_mappings $LB_INTERFACE_MAPPINGS
iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS
fi
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.IptablesFirewallDriver
else
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver
fi
AGENT_BINARY="$QUANTUM_DIR/bin/quantum-linuxbridge-agent"
# Define extra "AGENT" configuration options when q-agt is configured by defining
# the array ``Q_AGENT_EXTRA_AGENT_OPTS``.
# For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE AGENT ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE agent ${I/=/ }
done
# Define extra "LINUX_BRIDGE" configuration options when q-agt is configured by defining
# the array ``Q_AGENT_EXTRA_SRV_OPTS``.
# For Example: ``Q_AGENT_EXTRA_SRV_OPTS=(foo=true bar=2)``
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE LINUX_BRIDGE ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE linux_bridge ${I/=/ }
done
}

Expand Down
10 changes: 5 additions & 5 deletions lib/quantum_plugins/nec
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ function quantum_plugin_configure_plugin_agent() {

function quantum_plugin_configure_service() {
iniset $QUANTUM_CONF DEFAULT api_extensions_path quantum/plugins/nec/extensions/
iniset /$Q_PLUGIN_CONF_FILE OFC host $OFC_API_HOST
iniset /$Q_PLUGIN_CONF_FILE OFC port $OFC_API_PORT
iniset /$Q_PLUGIN_CONF_FILE OFC driver $OFC_DRIVER
iniset /$Q_PLUGIN_CONF_FILE OFC api_retry_max OFC_RETRY_MAX
iniset /$Q_PLUGIN_CONF_FILE OFC api_retry_interval OFC_RETRY_INTERVAL
iniset /$Q_PLUGIN_CONF_FILE ofc host $OFC_API_HOST
iniset /$Q_PLUGIN_CONF_FILE ofc port $OFC_API_PORT
iniset /$Q_PLUGIN_CONF_FILE ofc driver $OFC_DRIVER
iniset /$Q_PLUGIN_CONF_FILE ofc api_retry_max OFC_RETRY_MAX
iniset /$Q_PLUGIN_CONF_FILE ofc api_retry_interval OFC_RETRY_INTERVAL

_quantum_ovs_base_configure_firewall_driver
}
Expand Down
10 changes: 5 additions & 5 deletions lib/quantum_plugins/nicira
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ function quantum_plugin_configure_plugin_agent() {

function quantum_plugin_configure_service() {
if [[ "$MAX_LP_PER_BRIDGED_LS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE NVP max_lp_per_bridged_ls $MAX_LP_PER_BRIDGED_LS
iniset /$Q_PLUGIN_CONF_FILE nvp max_lp_per_bridged_ls $MAX_LP_PER_BRIDGED_LS
fi
if [[ "$MAX_LP_PER_OVERLAY_LS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE NVP max_lp_per_overlay_ls $MAX_LP_PER_OVERLAY_LS
iniset /$Q_PLUGIN_CONF_FILE nvp max_lp_per_overlay_ls $MAX_LP_PER_OVERLAY_LS
fi
if [[ "$FAILOVER_TIME" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE NVP failover_time $FAILOVER_TIME
iniset /$Q_PLUGIN_CONF_FILE nvp failover_time $FAILOVER_TIME
fi
if [[ "$CONCURRENT_CONNECTIONS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE NVP concurrent_connections $CONCURRENT_CONNECTIONS
iniset /$Q_PLUGIN_CONF_FILE nvp concurrent_connections $CONCURRENT_CONNECTIONS
fi

if [[ "$DEFAULT_TZ_UUID" != "" ]]; then
Expand All @@ -89,7 +89,7 @@ function quantum_plugin_configure_service() {
iniset /$Q_PLUGIN_CONF_FILE DEFAULT default_l3_gw_service_uuid $DEFAULT_L3_GW_SVC_UUID
Q_L3_ENABLED=True
Q_L3_ROUTER_PER_TENANT=True
iniset /$Q_PLUGIN_CONF_FILE NVP enable_metadata_access_network True
iniset /$Q_PLUGIN_CONF_FILE nvp enable_metadata_access_network True
fi
if [[ "$DEFAULT_L2_GW_SVC_UUID" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE DEFAULT default_l2_gw_service_uuid $DEFAULT_L2_GW_SVC_UUID
Expand Down
12 changes: 6 additions & 6 deletions lib/quantum_plugins/openvswitch
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function quantum_plugin_configure_common() {

function quantum_plugin_configure_service() {
if [[ "$ENABLE_TENANT_TUNNELS" = "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE OVS tenant_network_type gre
iniset /$Q_PLUGIN_CONF_FILE OVS tunnel_id_ranges $TENANT_TUNNEL_RANGES
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type gre
iniset /$Q_PLUGIN_CONF_FILE ovs tunnel_id_ranges $TENANT_TUNNEL_RANGES
elif [[ "$ENABLE_TENANT_VLANS" = "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE OVS tenant_network_type vlan
iniset /$Q_PLUGIN_CONF_FILE ovs tenant_network_type vlan
else
echo "WARNING - The openvswitch plugin is using local tenant networks, with no connectivity between hosts."
fi
Expand All @@ -33,12 +33,12 @@ function quantum_plugin_configure_service() {
fi
fi
if [[ "$OVS_VLAN_RANGES" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE OVS network_vlan_ranges $OVS_VLAN_RANGES
iniset /$Q_PLUGIN_CONF_FILE ovs network_vlan_ranges $OVS_VLAN_RANGES
fi

# Enable tunnel networks if selected
if [[ $OVS_ENABLE_TUNNELING = "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True
iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
fi

_quantum_ovs_base_configure_firewall_driver
Expand All @@ -48,7 +48,7 @@ function quantum_plugin_configure_service() {
# For Example: ``Q_SRV_EXTRA_OPTS=(foo=true bar=2)``
for I in "${Q_SRV_EXTRA_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE OVS ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE ovs ${I/=/ }
done
}

Expand Down
28 changes: 14 additions & 14 deletions lib/quantum_plugins/openvswitch_agent
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ function quantum_plugin_configure_plugin_agent() {
if [ `vercmp_numbers "$OVS_VERSION" "1.4"` -lt "0" ] && ! is_service_enabled q-svc ; then
die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts."
fi
iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True
iniset /$Q_PLUGIN_CONF_FILE OVS local_ip $HOST_IP
iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $HOST_IP
fi

# Setup physical network bridge mappings. Override
Expand All @@ -61,7 +61,7 @@ function quantum_plugin_configure_plugin_agent() {
sudo ovs-vsctl --no-wait -- --may-exist add-br $OVS_PHYSICAL_BRIDGE
fi
if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE OVS bridge_mappings $OVS_BRIDGE_MAPPINGS
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS
fi
AGENT_BINARY="$QUANTUM_DIR/bin/quantum-openvswitch-agent"

Expand All @@ -73,20 +73,20 @@ function quantum_plugin_configure_plugin_agent() {
Q_RR_DOM0_COMMAND="$QUANTUM_DIR/bin/quantum-rootwrap-xen-dom0 $Q_RR_CONF_FILE"

# For now, duplicate the xen configuration already found in nova.conf
iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_url "$XENAPI_CONNECTION_URL"
iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_username "$XENAPI_USER"
iniset $Q_RR_CONF_FILE XENAPI xenapi_connection_password "$XENAPI_PASSWORD"
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_url "$XENAPI_CONNECTION_URL"
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_username "$XENAPI_USER"
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_password "$XENAPI_PASSWORD"

# Under XS/XCP, the ovs agent needs to target the dom0
# integration bridge. This is enabled by using a root wrapper
# that executes commands on dom0 via a XenAPI plugin.
iniset /$Q_PLUGIN_CONF_FILE AGENT root_helper "$Q_RR_DOM0_COMMAND"
iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_DOM0_COMMAND"

# Set "physical" mapping
iniset /$Q_PLUGIN_CONF_FILE OVS bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"

# XEN_INTEGRATION_BRIDGE is the integration bridge in dom0
iniset /$Q_PLUGIN_CONF_FILE OVS integration_bridge $XEN_INTEGRATION_BRIDGE
iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $XEN_INTEGRATION_BRIDGE

# Set up domU's L2 agent:

Expand All @@ -96,25 +96,25 @@ function quantum_plugin_configure_plugin_agent() {
sudo ovs-vsctl add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT

# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
iniset "/$Q_PLUGIN_CONF_FILE.domU" OVS bridge_mappings "physnet1:br-$GUEST_INTERFACE_DEFAULT"
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:br-$GUEST_INTERFACE_DEFAULT"
# Set integration bridge to domU's
iniset "/$Q_PLUGIN_CONF_FILE.domU" OVS integration_bridge $OVS_BRIDGE
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $OVS_BRIDGE
# Set root wrap
iniset "/$Q_PLUGIN_CONF_FILE.domU" AGENT root_helper "$Q_RR_COMMAND"
iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper "$Q_RR_COMMAND"
fi
# Define extra "AGENT" configuration options when q-agt is configured by defining
# defining the array ``Q_AGENT_EXTRA_AGENT_OPTS``.
# For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``
for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE AGENT ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE agent ${I/=/ }
done
# Define extra "OVS" configuration options when q-agt is configured by defining
# defining the array ``Q_AGENT_EXTRA_SRV_OPTS``.
# For Example: ``Q_AGENT_EXTRA_SRV_OPTS=(foo=true bar=2)``
for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
# Replace the first '=' with ' ' for iniset syntax
iniset /$Q_PLUGIN_CONF_FILE OVS ${I/=/ }
iniset /$Q_PLUGIN_CONF_FILE ovs ${I/=/ }
done
}

Expand Down
4 changes: 2 additions & 2 deletions lib/quantum_plugins/ovs_base
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ function _quantum_ovs_base_configure_debug_command() {

function _quantum_ovs_base_configure_firewall_driver() {
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
else
iniset /$Q_PLUGIN_CONF_FILE SECURITYGROUP firewall_driver quantum.agent.firewall.NoopFirewallDriver
iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver quantum.agent.firewall.NoopFirewallDriver
fi
}

Expand Down
4 changes: 2 additions & 2 deletions lib/quantum_plugins/plumgrid
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function quantum_plugin_configure_common() {
function quantum_plugin_configure_service() {
PLUMGRID_NOS_IP=${PLUMGRID_NOS_IP:-localhost}
PLUMGRID_NOS_PORT=${PLUMGRID_NOS_PORT:-7766}
iniset /$Q_PLUGIN_CONF_FILE PLUMgridNOS nos_server $PLUMGRID_NOS_IP
iniset /$Q_PLUGIN_CONF_FILE PLUMgridNOS nos_server_port $PLUMGRID_NOS_PORT
iniset /$Q_PLUGIN_CONF_FILE plumgridnos nos_server $PLUMGRID_NOS_IP
iniset /$Q_PLUGIN_CONF_FILE plumgridnos nos_server_port $PLUMGRID_NOS_PORT
}

function quantum_plugin_configure_debug_command() {
Expand Down
4 changes: 2 additions & 2 deletions lib/quantum_plugins/ryu
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ function quantum_plugin_configure_plugin_agent() {
if [ -n "$RYU_INTERNAL_INTERFACE" ]; then
sudo ovs-vsctl --no-wait -- --may-exist add-port $OVS_BRIDGE $RYU_INTERNAL_INTERFACE
fi
iniset /$Q_PLUGIN_CONF_FILE OVS integration_bridge $OVS_BRIDGE
iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $OVS_BRIDGE
AGENT_BINARY="$QUANTUM_DIR/quantum/plugins/ryu/agent/ryu_quantum_agent.py"

_quantum_ovs_base_configure_firewall_driver
}

function quantum_plugin_configure_service() {
iniset /$Q_PLUGIN_CONF_FILE OVS openflow_rest_api $RYU_API_HOST:$RYU_API_PORT
iniset /$Q_PLUGIN_CONF_FILE ovs openflow_rest_api $RYU_API_HOST:$RYU_API_PORT

_quantum_ovs_base_configure_firewall_driver
}
Expand Down

0 comments on commit d42634f

Please sign in to comment.