Update RPM-specs to 2013.2 version
[openstack-build/neutron-build.git] / rpm / SOURCES / quantum-node-setup
diff --git a/rpm/SOURCES/quantum-node-setup b/rpm/SOURCES/quantum-node-setup
deleted file mode 100755 (executable)
index 4ecf896..0000000
+++ /dev/null
@@ -1,173 +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 selected plugin.
-
-Usage: quantum-node-setup [options]
-Options:
-       --help        | -h
-               Print usage information.
-        --plugin      | -p
-                The quantum plugin. Supported plugins:-
-                    ${SUPPORTED_PLUGINS[*]}
-        --qhost       | -q
-               The Quantum 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
-}
-
-QUANTUM_USER=quantum
-LB_CONF=/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini
-OVS_CONF=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
-
-# Nova specific
-NOVA_CONF=/etc/nova/nova.conf
-
-while [ $# -gt 0 ]
-do
-       case "$1" in
-               -h|--help)
-                       usage
-                       ;;
-                -p|--plugin)
-                        shift
-                        QUANTUM_PLUGIN=${1}
-                        ;;
-                -q|--qhost)
-                        shift
-                        Q_HOST=${1}
-                        ;;
-               *)
-                       # ignore
-                       shift
-                       ;;
-       esac
-       shift
-done
-
-# if the plugin is not defined
-if [ -z ${QUANTUM_PLUGIN} ] ; then
-        echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}"
-        echo "Choice:"
-        read QUANTUM_PLUGIN
-fi
-
-# check that the plugin is valid
-is_valid_plugin ${QUANTUM_PLUGIN}
-if [ $? -ne 0 ]; then
-        echo "Plugin '${QUANTUM_PLUGIN}' not supported. Supported plugins:-"
-        echo "    ${SUPPORTED_PLUGINS[*]}"
-        exit 0
-fi
-
-echo "Quantum plugin: ${QUANTUM_PLUGIN}"
-
-if ! [ -e "/etc/quantum/plugins/${QUANTUM_PLUGIN}" ]; then
-       echo "Please install the ${QUANTUM_PLUGIN} quantum plugin"
-        exit 0
-fi
-
-#if the database hostname and is not defined and is required
-if [ -z ${Q_HOST} ] ; then
-    echo "Please enter the Quantum hostname:"
-    read Q_HOST
-fi
-
-Q_PORT=9696
-Q_CONF=/etc/quantum/quantum.conf
-# QPID
-openstack-config --set ${Q_CONF} DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid
-openstack-config --set ${Q_CONF} DEFAULT qpid_hostname ${Q_HOST}
-
-case "${QUANTUM_PLUGIN}" in
-"linuxbridge")
-;;
-
-"openvswitch")
-        if ! rpm -q openvswitch > /dev/null
-        then
-                echo "Please install openvswitch"
-                exit 0
-        fi
-        OVS_CONF=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
-        openstack-config --set ${OVS_CONF} SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
-;;
-
-esac
-
-echo "Would you like to update the nova configuration files? (y/n): "
-read response
-case "$response" in
-y|Y)
-        ;;
-*)
-        echo "Complete!"
-        exit 0
-esac
-
-# Keystone specific
-OS_USERNAME=${OS_USERNAME:-quantum}
-OS_PASSWORD=${OS_PASSWORD:-servicepass}
-OS_AUTH_URL=${OS_AUTH_URL:-http://127.0.0.1:35357/v2.0/}
-OS_TENANT_NAME=${OS_TENANT_NAME:-service}
-
-# If OpenStack is installed then configure nova.conf
-if ! [ -e "${NOVA_CONF}" ]; then
-        echo "Please install OpenStack compute and then set the values"
-        echo "in /etc/nova/nova.conf DEFAULT section"
-        echo "    network_api_class=nova.network.quantumv2.api.API"
-        echo "    quantum_admin_username=${OS_USERNAME}"
-        echo "    quantum_admin_password=${OS_PASSWORD}"
-        echo "    quantum_admin_auth_url=${OS_AUTH_URL}"
-        echo "    quantum_auth_strategy=keystone"
-        echo "    quantum_admin_tenant_name=${OS_TENANT_NAME}"
-        echo "    quantum_url=http://${Q_HOST}:${Q_PORT}/"
-        echo "    firewall_driver=nova.virt.firewall.NoopFirewallDriver"
-        echo "    security_group_api=quantum"
-else
-        openstack-config --set ${NOVA_CONF} DEFAULT network_api_class nova.network.quantumv2.api.API
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_username ${OS_USERNAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_password ${OS_PASSWORD}
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_auth_url ${OS_AUTH_URL}
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_auth_strategy keystone 
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_tenant_name ${OS_TENANT_NAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT quantum_url http://${Q_HOST}:${Q_PORT}/
-        openstack-config --set ${NOVA_CONF} DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
-        openstack-config --set ${NOVA_CONF} DEFAULT security_group_api quantum
-fi
-
-echo "Configuration updates complete!"