X-Git-Url: https://review.fuel-infra.org/gitweb?p=openstack-build%2Fneutron-build.git;a=blobdiff_plain;f=rpm%2FSOURCES%2Fneutron-l3-setup;fp=rpm%2FSOURCES%2Fneutron-l3-setup;h=0000000000000000000000000000000000000000;hp=44cdf0ed859a60553346d9ad9017fdfdac58a23f;hb=30a9554653185df20feb9c71db5b3c5bd3da3092;hpb=f07bdce2ad538aab3201d467e8b530e270cbcbf3 diff --git a/rpm/SOURCES/neutron-l3-setup b/rpm/SOURCES/neutron-l3-setup deleted file mode 100755 index 44cdf0ed8..000000000 --- a/rpm/SOURCES/neutron-l3-setup +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2012, Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# - -# The script supports the plugins below -declare -a SUPPORTED_PLUGINS=(linuxbridge openvswitch) - -# -# Print --help output and exit. -# -usage() { - -cat << EOF -The helper script will install the necessary support for the L3 agent. - -Usage: neutron-l3-setup [options] -Options: - --help | -h - Print usage information. - --plugin | -p - The neutron plugin. Supported plugins:- - ${SUPPORTED_PLUGINS[*]} - --qhost | -q - The Neutron hostname (assumes that this is also the QPID host). -EOF - - exit 0 -} - -is_valid_plugin() { - local i= - for i in "${SUPPORTED_PLUGINS[@]}"; do - if [ "$i" == "$1" ]; then - return 0 - fi - done - return 1 -} - -L3_CONF=/etc/neutron/l3_agent.ini -L3_META_CONF=/etc/neutron/metadata_agent.ini - -while [ $# -gt 0 ] -do - case "$1" in - -h|--help) - usage - ;; - -p|--plugin) - shift - NEUTRON_PLUGIN=${1} - ;; - -q|--qhost) - shift - Q_HOST=${1} - ;; - *) - # ignore - shift - ;; - esac - shift -done - -# if the plugin is not defined -if [ -z ${NEUTRON_PLUGIN} ] ; then - echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}" - echo "Choice:" - read NEUTRON_PLUGIN -fi - -# check that the plugin is valid -is_valid_plugin ${NEUTRON_PLUGIN} -if [ $? -ne 0 ]; then - echo "Plugin '${NEUTRON_PLUGIN}' not supported. Supported plugins:-" - echo " ${SUPPORTED_PLUGINS[*]}" - exit 0 -fi - -echo "Neutron plugin: ${NEUTRON_PLUGIN}" - -if [ -z ${Q_HOST} ] ; then - echo "Please enter the Neutron hostname:" - read Q_HOST -fi - -Q_PORT=9696 -Q_CONF=/etc/neutron/neutron.conf -# QPID -openstack-config --set ${Q_CONF} DEFAULT rpc_backend neutron.openstack.common.rpc.impl_qpid -openstack-config --set ${Q_CONF} DEFAULT qpid_hostname ${Q_HOST} - -case "${NEUTRON_PLUGIN}" in -"linuxbridge") - LINUX_INTERFACE_DRIVER=neutron.agent.linux.interface.BridgeInterfaceDriver - openstack-config --set ${L3_CONF} DEFAULT external_network_bridge '' -;; - -"openvswitch") - if ! rpm -q openvswitch > /dev/null - then - echo "Please install openvswitch" - exit 0 - fi - LINUX_INTERFACE_DRIVER=neutron.agent.linux.interface.OVSInterfaceDriver -;; - -esac - -# Keystone specific -OS_USERNAME=${OS_USERNAME:-neutron} -OS_PASSWORD=${OS_PASSWORD:-servicepass} -OS_AUTH_URL=${OS_AUTH_URL:-http://localhost:35357/v2.0/} -OS_TENANT_NAME=${OS_TENANT_NAME:-service} - -# Update Keystone -openstack-config --set ${L3_META_CONF} DEFAULT auth_url ${OS_AUTH_URL} -openstack-config --set ${L3_META_CONF} DEFAULT admin_user ${OS_USERNAME} -openstack-config --set ${L3_META_CONF} DEFAULT admin_password ${OS_PASSWORD} -openstack-config --set ${L3_META_CONF} DEFAULT admin_tenant_name ${OS_TENANT_NAME} - -# Update interface driver -openstack-config --set ${L3_CONF} DEFAULT interface_driver ${LINUX_INTERFACE_DRIVER} - -echo "Configuration updates complete!"