]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Update RPM specs to v. 2014.1 openstack-ci/fuel-5.1/2014.1
authorDmitry Burmistrov <dburmistrov@mirantis.com>
Thu, 26 Jun 2014 15:37:20 +0000 (19:37 +0400)
committerDmitry Burmistrov <dburmistrov@mirantis.com>
Thu, 26 Jun 2014 15:37:20 +0000 (19:37 +0400)
16 files changed:
rpm/SOURCES/0001-use-parallel-installed-versions-in-RHEL6.patch
rpm/SOURCES/0002-Remove-dnsmasq-version-warning.patch
rpm/SOURCES/0003-remove-runtime-dependency-on-pbr.patch [new file with mode: 0644]
rpm/SOURCES/0004-Sync-service-and-systemd-modules-from-oslo-incubator.patch [new file with mode: 0644]
rpm/SOURCES/0005-Removed-signing_dir-from-neutron.conf.patch [new file with mode: 0644]
rpm/SOURCES/0006-Validate-CIDR-given-as-ip-prefix-in-security-group-r.patch [new file with mode: 0644]
rpm/SOURCES/0007-netaddr-0.7.10-raises-ValueError-instead-of-AddrForm.patch [new file with mode: 0644]
rpm/SOURCES/0008-Remove-kernel-version-check-for-OVS-VXLAN.patch [new file with mode: 0644]
rpm/SOURCES/neutron-dhcp-setup [deleted file]
rpm/SOURCES/neutron-dist.conf
rpm/SOURCES/neutron-l3-setup [deleted file]
rpm/SOURCES/neutron-node-setup [deleted file]
rpm/SOURCES/neutron-server-setup [deleted file]
rpm/SOURCES/neutron-vpn-agent.init
rpm/SOURCES/neutron-vpn-agent.upstart
rpm/SPECS/openstack-neutron.spec

index f52a583377f346a63bb3671326c2c0375fab1f56..35f448efbfe9258e82610775d1a081b43973180c 100644 (file)
@@ -1,4 +1,4 @@
-From 4cc2b00a93126c5da672514fad7e356e79f2b8e6 Mon Sep 17 00:00:00 2001
+From 0daac79152939a86a9c00fa6bc322d0809512fae Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
 Date: Fri, 13 Apr 2012 17:24:40 +0100
 Subject: [PATCH] use parallel installed versions in RHEL6
index 083a84d59a896da35570cc8320f221680a5a269d..04fb39177c0705ae088f6b688143522e9d256d7b 100644 (file)
@@ -1,4 +1,4 @@
-From 268532256d701f2f9d7e10b01a65685e118800dc Mon Sep 17 00:00:00 2001
+From 9c61e9292a1e271e219f46b80ba2a8f1cd5b91c4 Mon Sep 17 00:00:00 2001
 From: Terry Wilson <twilson@redhat.com>
 Date: Fri, 13 Dec 2013 09:41:43 -0600
 Subject: [PATCH] Remove dnsmasq version warning
diff --git a/rpm/SOURCES/0003-remove-runtime-dependency-on-pbr.patch b/rpm/SOURCES/0003-remove-runtime-dependency-on-pbr.patch
new file mode 100644 (file)
index 0000000..fd04acf
--- /dev/null
@@ -0,0 +1,31 @@
+From 105b193d1f4d12c91affd4fe3cfe8fc9aa5a820a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Mon, 24 Mar 2014 14:50:23 +0000
+Subject: [PATCH] remove runtime dependency on pbr
+
+---
+ neutron/version.py | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/neutron/version.py b/neutron/version.py
+index 1819264..e5333c6 100644
+--- a/neutron/version.py
++++ b/neutron/version.py
+@@ -14,6 +14,15 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
+-import pbr.version
++class VersionInfo(object):
++    release = "RPMRELEASE"
++    version = "RPMVERSION"
+-version_info = pbr.version.VersionInfo('neutron')
++    def version_string(self):
++        return self.version
++
++    def release_string(self):
++        return self.release
++
++
++version_info = VersionInfo()
diff --git a/rpm/SOURCES/0004-Sync-service-and-systemd-modules-from-oslo-incubator.patch b/rpm/SOURCES/0004-Sync-service-and-systemd-modules-from-oslo-incubator.patch
new file mode 100644 (file)
index 0000000..d5fa105
--- /dev/null
@@ -0,0 +1,328 @@
+From cc5830176b15813883b6e591b6373d7edbb33d37 Mon Sep 17 00:00:00 2001
+From: Jakub Libosvar <libosvar@redhat.com>
+Date: Mon, 17 Mar 2014 16:36:01 +0100
+Subject: [PATCH] Sync service and systemd modules from oslo-incubator
+
+This patch make systemd know when neutron-service was started. This is
+needed in HA environment, previously systemd returned success even
+before neutron-server was able to handle requests.
+
+Current oslo-incubator commit on HEAD:
+b7ad6ddab8b1d61bf4f52ccaa461a9d68809747b
+
+Implements: blueprint service-readiness
+Change-Id: Ic9e4abd11b614a896fbd7454b9a604a69a248d0f
+---
+ neutron/openstack/common/service.py |  72 +++++++++++++------------
+ neutron/openstack/common/systemd.py | 104 ++++++++++++++++++++++++++++++++++++
+ openstack-common.conf               |   1 +
+ 3 files changed, 144 insertions(+), 33 deletions(-)
+ create mode 100644 neutron/openstack/common/systemd.py
+
+diff --git a/neutron/openstack/common/service.py b/neutron/openstack/common/service.py
+index b8144bb..627dda4 100644
+--- a/neutron/openstack/common/service.py
++++ b/neutron/openstack/common/service.py
+@@ -38,9 +38,10 @@ from eventlet import event
+ from oslo.config import cfg
+ from neutron.openstack.common import eventlet_backdoor
+-from neutron.openstack.common.gettextutils import _
++from neutron.openstack.common.gettextutils import _LE, _LI, _LW
+ from neutron.openstack.common import importutils
+ from neutron.openstack.common import log as logging
++from neutron.openstack.common import systemd
+ from neutron.openstack.common import threadgroup
+@@ -163,7 +164,7 @@ class ServiceLauncher(Launcher):
+         status = None
+         signo = 0
+-        LOG.debug(_('Full set of CONF:'))
++        LOG.debug('Full set of CONF:')
+         CONF.log_opt_values(LOG, std_logging.DEBUG)
+         try:
+@@ -172,7 +173,7 @@ class ServiceLauncher(Launcher):
+             super(ServiceLauncher, self).wait()
+         except SignalExit as exc:
+             signame = _signo_to_signame(exc.signo)
+-            LOG.info(_('Caught %s, exiting'), signame)
++            LOG.info(_LI('Caught %s, exiting'), signame)
+             status = exc.code
+             signo = exc.signo
+         except SystemExit as exc:
+@@ -184,7 +185,7 @@ class ServiceLauncher(Launcher):
+                     rpc.cleanup()
+                 except Exception:
+                     # We're shutting down, so it doesn't matter at this point.
+-                    LOG.exception(_('Exception during rpc cleanup.'))
++                    LOG.exception(_LE('Exception during rpc cleanup.'))
+         return status, signo
+@@ -235,7 +236,7 @@ class ProcessLauncher(object):
+         # dies unexpectedly
+         self.readpipe.read()
+-        LOG.info(_('Parent process has died unexpectedly, exiting'))
++        LOG.info(_LI('Parent process has died unexpectedly, exiting'))
+         sys.exit(1)
+@@ -266,13 +267,13 @@ class ProcessLauncher(object):
+             launcher.wait()
+         except SignalExit as exc:
+             signame = _signo_to_signame(exc.signo)
+-            LOG.info(_('Caught %s, exiting'), signame)
++            LOG.info(_LI('Caught %s, exiting'), signame)
+             status = exc.code
+             signo = exc.signo
+         except SystemExit as exc:
+             status = exc.code
+         except BaseException:
+-            LOG.exception(_('Unhandled exception'))
++            LOG.exception(_LE('Unhandled exception'))
+             status = 2
+         finally:
+             launcher.stop()
+@@ -305,7 +306,7 @@ class ProcessLauncher(object):
+             # start up quickly but ensure we don't fork off children that
+             # die instantly too quickly.
+             if time.time() - wrap.forktimes[0] < wrap.workers:
+-                LOG.info(_('Forking too fast, sleeping'))
++                LOG.info(_LI('Forking too fast, sleeping'))
+                 time.sleep(1)
+             wrap.forktimes.pop(0)
+@@ -324,7 +325,7 @@ class ProcessLauncher(object):
+             os._exit(status)
+-        LOG.info(_('Started child %d'), pid)
++        LOG.info(_LI('Started child %d'), pid)
+         wrap.children.add(pid)
+         self.children[pid] = wrap
+@@ -334,7 +335,7 @@ class ProcessLauncher(object):
+     def launch_service(self, service, workers=1):
+         wrap = ServiceWrapper(service, workers)
+-        LOG.info(_('Starting %d workers'), wrap.workers)
++        LOG.info(_LI('Starting %d workers'), wrap.workers)
+         while self.running and len(wrap.children) < wrap.workers:
+             self._start_child(wrap)
+@@ -351,15 +352,15 @@ class ProcessLauncher(object):
+         if os.WIFSIGNALED(status):
+             sig = os.WTERMSIG(status)
+-            LOG.info(_('Child %(pid)d killed by signal %(sig)d'),
++            LOG.info(_LI('Child %(pid)d killed by signal %(sig)d'),
+                      dict(pid=pid, sig=sig))
+         else:
+             code = os.WEXITSTATUS(status)
+-            LOG.info(_('Child %(pid)s exited with status %(code)d'),
++            LOG.info(_LI('Child %(pid)s exited with status %(code)d'),
+                      dict(pid=pid, code=code))
+         if pid not in self.children:
+-            LOG.warning(_('pid %d not in child list'), pid)
++            LOG.warning(_LW('pid %d not in child list'), pid)
+             return None
+         wrap = self.children.pop(pid)
+@@ -381,22 +382,25 @@ class ProcessLauncher(object):
+     def wait(self):
+         """Loop waiting on children to die and respawning as necessary."""
+-        LOG.debug(_('Full set of CONF:'))
++        LOG.debug('Full set of CONF:')
+         CONF.log_opt_values(LOG, std_logging.DEBUG)
+-        while True:
+-            self.handle_signal()
+-            self._respawn_children()
+-            if self.sigcaught:
+-                signame = _signo_to_signame(self.sigcaught)
+-                LOG.info(_('Caught %s, stopping children'), signame)
+-            if not _is_sighup_and_daemon(self.sigcaught):
+-                break
+-
+-            for pid in self.children:
+-                os.kill(pid, signal.SIGHUP)
+-            self.running = True
+-            self.sigcaught = None
++        try:
++            while True:
++                self.handle_signal()
++                self._respawn_children()
++                if self.sigcaught:
++                    signame = _signo_to_signame(self.sigcaught)
++                    LOG.info(_LI('Caught %s, stopping children'), signame)
++                if not _is_sighup_and_daemon(self.sigcaught):
++                    break
++
++                for pid in self.children:
++                    os.kill(pid, signal.SIGHUP)
++                self.running = True
++                self.sigcaught = None
++        except eventlet.greenlet.GreenletExit:
++            LOG.info(_LI("Wait called after thread killed.  Cleaning up."))
+         for pid in self.children:
+             try:
+@@ -407,7 +411,7 @@ class ProcessLauncher(object):
+         # Wait for children to die
+         if self.children:
+-            LOG.info(_('Waiting on %d children to exit'), len(self.children))
++            LOG.info(_LI('Waiting on %d children to exit'), len(self.children))
+             while self.children:
+                 self._wait_child()
+@@ -484,14 +488,16 @@ class Services(object):
+         """
+         service.start()
++        systemd.notify_once()
+         done.wait()
+-def launch(service, workers=None):
+-    if workers:
+-        launcher = ProcessLauncher()
+-        launcher.launch_service(service, workers=workers)
+-    else:
++def launch(service, workers=1):
++    if workers is None or workers == 1:
+         launcher = ServiceLauncher()
+         launcher.launch_service(service)
++    else:
++        launcher = ProcessLauncher()
++        launcher.launch_service(service, workers=workers)
++
+     return launcher
+diff --git a/neutron/openstack/common/systemd.py b/neutron/openstack/common/systemd.py
+new file mode 100644
+index 0000000..e1ba656
+--- /dev/null
++++ b/neutron/openstack/common/systemd.py
+@@ -0,0 +1,104 @@
++# Copyright 2012-2014 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.
++
++"""
++Helper module for systemd service readiness notification.
++"""
++
++import os
++import socket
++import sys
++
++from neutron.openstack.common import log as logging
++
++
++LOG = logging.getLogger(__name__)
++
++
++def _abstractify(socket_name):
++    if socket_name.startswith('@'):
++        # abstract namespace socket
++        socket_name = '\0%s' % socket_name[1:]
++    return socket_name
++
++
++def _sd_notify(unset_env, msg):
++    notify_socket = os.getenv('NOTIFY_SOCKET')
++    if notify_socket:
++        sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
++        try:
++            sock.connect(_abstractify(notify_socket))
++            sock.sendall(msg)
++            if unset_env:
++                del os.environ['NOTIFY_SOCKET']
++        except EnvironmentError:
++            LOG.debug("Systemd notification failed", exc_info=True)
++        finally:
++            sock.close()
++
++
++def notify():
++    """Send notification to Systemd that service is ready.
++    For details see
++      http://www.freedesktop.org/software/systemd/man/sd_notify.html
++    """
++    _sd_notify(False, 'READY=1')
++
++
++def notify_once():
++    """Send notification once to Systemd that service is ready.
++    Systemd sets NOTIFY_SOCKET environment variable with the name of the
++    socket listening for notifications from services.
++    This method removes the NOTIFY_SOCKET environment variable to ensure
++    notification is sent only once.
++    """
++    _sd_notify(True, 'READY=1')
++
++
++def onready(notify_socket, timeout):
++    """Wait for systemd style notification on the socket.
++
++    :param notify_socket: local socket address
++    :type notify_socket:  string
++    :param timeout:       socket timeout
++    :type timeout:        float
++    :returns:             0 service ready
++                          1 service not ready
++                          2 timeout occured
++    """
++    sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
++    sock.settimeout(timeout)
++    sock.bind(_abstractify(notify_socket))
++    try:
++        msg = sock.recv(512)
++    except socket.timeout:
++        return 2
++    finally:
++        sock.close()
++    if 'READY=1' in msg:
++        return 0
++    else:
++        return 1
++
++
++if __name__ == '__main__':
++    # simple CLI for testing
++    if len(sys.argv) == 1:
++        notify()
++    elif len(sys.argv) >= 2:
++        timeout = float(sys.argv[1])
++        notify_socket = os.getenv('NOTIFY_SOCKET')
++        if notify_socket:
++            retval = onready(notify_socket, timeout)
++            sys.exit(retval)
+diff --git a/openstack-common.conf b/openstack-common.conf
+index 9523f9c..395576f 100644
+--- a/openstack-common.conf
++++ b/openstack-common.conf
+@@ -26,6 +26,7 @@ module=processutils
+ module=rpc
+ module=service
+ module=sslutils
++module=systemd
+ module=threadgroup
+ module=timeutils
+ module=uuidutils
diff --git a/rpm/SOURCES/0005-Removed-signing_dir-from-neutron.conf.patch b/rpm/SOURCES/0005-Removed-signing_dir-from-neutron.conf.patch
new file mode 100644 (file)
index 0000000..65aecd0
--- /dev/null
@@ -0,0 +1,27 @@
+From 9738c5431008e2412e3b7509ff49a155b8cf175e Mon Sep 17 00:00:00 2001
+From: Ihar Hrachyshka <ihrachys@redhat.com>
+Date: Mon, 28 Apr 2014 15:05:30 +0200
+Subject: [PATCH] Removed signing_dir from neutron.conf
+
+The default value from keystone middleware ($TMPDIR) is good enough,
+so stick to it.
+
+Closes-Bug: 1313780
+Change-Id: Ideb393f9010f4f1706392ccdfdd5fa7307bda070
+(cherry picked from commit e423126965fb79d35f5f2281974cee6a216af8d4)
+---
+ etc/neutron.conf | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/etc/neutron.conf b/etc/neutron.conf
+index 775c757..e3ebf74 100644
+--- a/etc/neutron.conf
++++ b/etc/neutron.conf
+@@ -398,7 +398,6 @@ auth_protocol = http
+ admin_tenant_name = %SERVICE_TENANT_NAME%
+ admin_user = %SERVICE_USER%
+ admin_password = %SERVICE_PASSWORD%
+-signing_dir = $state_path/keystone-signing
+ [database]
+ # This line MUST be changed to actually run the plugin.
diff --git a/rpm/SOURCES/0006-Validate-CIDR-given-as-ip-prefix-in-security-group-r.patch b/rpm/SOURCES/0006-Validate-CIDR-given-as-ip-prefix-in-security-group-r.patch
new file mode 100644 (file)
index 0000000..f4c3c7c
--- /dev/null
@@ -0,0 +1,254 @@
+From 761fac6f0278322e914a5832cd32a6eee609cc6f Mon Sep 17 00:00:00 2001
+From: marios <marios@redhat.com>
+Date: Fri, 29 Nov 2013 18:23:54 +0200
+Subject: [PATCH] Validate CIDR given as ip-prefix in
+ security-group-rule-create
+
+There was no validation for the provided ip prefix. This just adds
+a simple parse using netaddr and explodes with appropriate message.
+Also makes sure ip prefix _is_ cidr (192.168.1.1-->192.168.1.1/32).
+
+Validation occurs at the attribute level (API model) as well as at
+the db level, where the ethertype is validated against the ip_prefix
+address type.
+
+Unit test cases added - bad prefix, unmasked prefix and incorrect
+ethertype. Also adds attribute test cases for the added
+convert_ip_prefix_to_cidr method
+
+Closes-Bug: 1255338
+
+Conflicts:
+       neutron/tests/unit/test_security_groups_rpc.py
+
+Change-Id: I71fb8c887963a122a5bd8cfdda800026c1cd3954
+(cherry picked from commit 65aa92b0348b7ab8413f359b00825610cdf66607)
+(cherry picked from commit 68a24e5f908412b83ca7c3f2d2d2014678e79570)
+---
+ neutron/common/exceptions.py                       |  4 +
+ neutron/db/securitygroups_db.py                    | 20 +++++
+ neutron/extensions/securitygroup.py                | 18 ++++-
+ .../tests/unit/test_extension_security_group.py    | 86 ++++++++++++++++++++++
+ 4 files changed, 127 insertions(+), 1 deletion(-)
+
+diff --git a/neutron/common/exceptions.py b/neutron/common/exceptions.py
+index bfd267e..e81b4af 100644
+--- a/neutron/common/exceptions.py
++++ b/neutron/common/exceptions.py
+@@ -319,3 +319,7 @@ class DuplicatedExtension(NeutronException):
+ class DeviceIDNotOwnedByTenant(Conflict):
+     message = _("The following device_id %(device_id)s is not owned by your "
+                 "tenant or matches another tenants router.")
++
++
++class InvalidCIDR(BadRequest):
++    message = _("Invalid CIDR %(input)s given as IP prefix")
+diff --git a/neutron/db/securitygroups_db.py b/neutron/db/securitygroups_db.py
+index 882a43d..de464d6 100644
+--- a/neutron/db/securitygroups_db.py
++++ b/neutron/db/securitygroups_db.py
+@@ -12,6 +12,7 @@
+ #    License for the specific language governing permissions and limitations
+ #    under the License.
++import netaddr
+ import sqlalchemy as sa
+ from sqlalchemy import orm
+ from sqlalchemy.orm import exc
+@@ -327,6 +328,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
+             new_rules.add(rule['security_group_id'])
+             self._validate_port_range(rule)
++            self._validate_ip_prefix(rule)
+             if rule['remote_ip_prefix'] and rule['remote_group_id']:
+                 raise ext_sg.SecurityGroupRemoteGroupAndRemoteIpPrefix()
+@@ -407,6 +409,24 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase):
+                 if (i['security_group_rule'] == db_rule):
+                     raise ext_sg.SecurityGroupRuleExists(id=id)
++    def _validate_ip_prefix(self, rule):
++        """Check that a valid cidr was specified as remote_ip_prefix
++
++        No need to check that it is in fact an IP address as this is already
++        validated by attribute validators.
++        Check that rule ethertype is consistent with remote_ip_prefix ip type.
++        Add mask to ip_prefix if absent (192.168.1.10 -> 192.168.1.10/32).
++        """
++        input_prefix = rule['remote_ip_prefix']
++        if input_prefix:
++            addr = netaddr.IPNetwork(input_prefix)
++            # set input_prefix to always include the netmask:
++            rule['remote_ip_prefix'] = str(addr)
++            # check consistency of ethertype with addr version
++            if rule['ethertype'] != "IPv%d" % (addr.version):
++                raise ext_sg.SecurityGroupRuleParameterConflict(
++                    ethertype=rule['ethertype'], cidr=input_prefix)
++
+     def get_security_group_rules(self, context, filters=None, fields=None,
+                                  sorts=None, limit=None, marker=None,
+                                  page_reverse=False):
+diff --git a/neutron/extensions/securitygroup.py b/neutron/extensions/securitygroup.py
+index ad2960f..637dbe3 100644
+--- a/neutron/extensions/securitygroup.py
++++ b/neutron/extensions/securitygroup.py
+@@ -17,6 +17,7 @@
+ from abc import ABCMeta
+ from abc import abstractmethod
++import netaddr
+ from oslo.config import cfg
+ import six
+@@ -103,6 +104,10 @@ class SecurityGroupRuleExists(qexception.InUse):
+     message = _("Security group rule already exists. Group id is %(id)s.")
++class SecurityGroupRuleParameterConflict(qexception.InvalidInput):
++    message = _("Conflicting value ethertype %(ethertype)s for CIDR %(cidr)s")
++
++
+ def convert_protocol(value):
+     if value is None:
+         return
+@@ -153,6 +158,16 @@ def convert_to_uuid_list_or_none(value_list):
+     return value_list
++def convert_ip_prefix_to_cidr(ip_prefix):
++    if not ip_prefix:
++        return
++    try:
++        cidr = netaddr.IPNetwork(ip_prefix)
++        return str(cidr)
++    except (TypeError, netaddr.AddrFormatError):
++        raise qexception.InvalidCIDR(input=ip_prefix)
++
++
+ def _validate_name_not_default(data, valid_values=None):
+     if data == "default":
+         raise SecurityGroupDefaultAlreadyExists()
+@@ -208,7 +223,8 @@ RESOURCE_ATTRIBUTE_MAP = {
+                       'convert_to': convert_ethertype_to_case_insensitive,
+                       'validate': {'type:values': sg_supported_ethertypes}},
+         'remote_ip_prefix': {'allow_post': True, 'allow_put': False,
+-                             'default': None, 'is_visible': True},
++                             'default': None, 'is_visible': True,
++                             'convert_to': convert_ip_prefix_to_cidr},
+         'tenant_id': {'allow_post': True, 'allow_put': False,
+                       'required_by_policy': True,
+                       'is_visible': True},
+diff --git a/neutron/tests/unit/test_extension_security_group.py b/neutron/tests/unit/test_extension_security_group.py
+index 1881d8c..6de9e2a 100644
+--- a/neutron/tests/unit/test_extension_security_group.py
++++ b/neutron/tests/unit/test_extension_security_group.py
+@@ -21,10 +21,12 @@ import webob.exc
+ from neutron.api.v2 import attributes as attr
+ from neutron.common import constants as const
++from neutron.common import exceptions as n_exc
+ from neutron import context
+ from neutron.db import db_base_plugin_v2
+ from neutron.db import securitygroups_db
+ from neutron.extensions import securitygroup as ext_sg
++from neutron.tests import base
+ from neutron.tests.unit import test_db_plugin
+ DB_PLUGIN_KLASS = ('neutron.tests.unit.test_extension_security_group.'
+@@ -404,6 +406,70 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
+             self.deserialize(self.fmt, res)
+             self.assertEqual(res.status_int, webob.exc.HTTPBadRequest.code)
++    def test_create_security_group_rule_invalid_ip_prefix(self):
++        name = 'webservers'
++        description = 'my webservers'
++        for bad_prefix in ['bad_ip', 256, "2001:db8:a::123/129", '172.30./24']:
++            with self.security_group(name, description) as sg:
++                sg_id = sg['security_group']['id']
++                remote_ip_prefix = bad_prefix
++                rule = self._build_security_group_rule(
++                    sg_id,
++                    'ingress',
++                    const.PROTO_NAME_TCP,
++                    '22', '22',
++                    remote_ip_prefix)
++                res = self._create_security_group_rule(self.fmt, rule)
++                self.assertEqual(res.status_int, webob.exc.HTTPBadRequest.code)
++
++    def test_create_security_group_rule_invalid_ethertype_for_prefix(self):
++        name = 'webservers'
++        description = 'my webservers'
++        test_addr = {'192.168.1.1/24': 'ipv4', '192.168.1.1/24': 'IPv6',
++                     '2001:db8:1234::/48': 'ipv6',
++                     '2001:db8:1234::/48': 'IPv4'}
++        for prefix, ether in test_addr.iteritems():
++            with self.security_group(name, description) as sg:
++                sg_id = sg['security_group']['id']
++                ethertype = ether
++                remote_ip_prefix = prefix
++                rule = self._build_security_group_rule(
++                    sg_id,
++                    'ingress',
++                    const.PROTO_NAME_TCP,
++                    '22', '22',
++                    remote_ip_prefix,
++                    None,
++                    None,
++                    ethertype)
++                res = self._create_security_group_rule(self.fmt, rule)
++                self.assertEqual(res.status_int, webob.exc.HTTPBadRequest.code)
++
++    def test_create_security_group_rule_with_unmasked_prefix(self):
++        name = 'webservers'
++        description = 'my webservers'
++        addr = {'10.1.2.3': {'mask': '32', 'ethertype': 'IPv4'},
++                'fe80::2677:3ff:fe7d:4c': {'mask': '128', 'ethertype': 'IPv6'}}
++        for ip in addr:
++            with self.security_group(name, description) as sg:
++                sg_id = sg['security_group']['id']
++                ethertype = addr[ip]['ethertype']
++                remote_ip_prefix = ip
++                rule = self._build_security_group_rule(
++                    sg_id,
++                    'ingress',
++                    const.PROTO_NAME_TCP,
++                    '22', '22',
++                    remote_ip_prefix,
++                    None,
++                    None,
++                    ethertype)
++                res = self._create_security_group_rule(self.fmt, rule)
++                self.assertEqual(res.status_int, 201)
++                res_sg = self.deserialize(self.fmt, res)
++                prefix = res_sg['security_group_rule']['remote_ip_prefix']
++                self.assertEqual(prefix, '%s/%s' % (ip, addr[ip]['mask']))
++
+     def test_create_security_group_rule_tcp_protocol_as_number(self):
+         name = 'webservers'
+         description = 'my webservers'
+@@ -1335,5 +1401,25 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
+                 self.assertEqual(res.status_int, webob.exc.HTTPBadRequest.code)
++class TestConvertIPPrefixToCIDR(base.BaseTestCase):
++
++    def test_convert_bad_ip_prefix_to_cidr(self):
++        for val in ['bad_ip', 256, "2001:db8:a::123/129"]:
++            self.assertRaises(n_exc.InvalidCIDR,
++                              ext_sg.convert_ip_prefix_to_cidr, val)
++        self.assertIsNone(ext_sg.convert_ip_prefix_to_cidr(None))
++
++    def test_convert_ip_prefix_no_netmask_to_cidr(self):
++        addr = {'10.1.2.3': '32', 'fe80::2677:3ff:fe7d:4c': '128'}
++        for k, v in addr.iteritems():
++            self.assertEqual(ext_sg.convert_ip_prefix_to_cidr(k),
++                             '%s/%s' % (k, v))
++
++    def test_convert_ip_prefix_with_netmask_to_cidr(self):
++        addresses = ['10.1.0.0/16', '10.1.2.3/32', '2001:db8:1234::/48']
++        for addr in addresses:
++            self.assertEqual(ext_sg.convert_ip_prefix_to_cidr(addr), addr)
++
++
+ class TestSecurityGroupsXML(TestSecurityGroups):
+     fmt = 'xml'
diff --git a/rpm/SOURCES/0007-netaddr-0.7.10-raises-ValueError-instead-of-AddrForm.patch b/rpm/SOURCES/0007-netaddr-0.7.10-raises-ValueError-instead-of-AddrForm.patch
new file mode 100644 (file)
index 0000000..f28fed5
--- /dev/null
@@ -0,0 +1,30 @@
+From a5dfffa50fd863bcd6676873b58ac2afce544aa0 Mon Sep 17 00:00:00 2001
+From: Aaron Rosen <aaronorosen@gmail.com>
+Date: Wed, 16 Apr 2014 11:31:25 -0700
+Subject: [PATCH] netaddr<=0.7.10 raises ValueError instead of AddrFormatError
+
+This patch ensures that ValueError is also caught in addition to
+AddrFormatError as in netaddr>=0.7.11 AddrFormatError is raised and
+in netaddr<=0.7.10 ValueError is raised.
+
+Change-Id: I595c90e42129a2d365f3860e3042e826bd031365
+Closes-bug: #1308675
+(cherry picked from commit dd2ccd12adfb6c7d4aa500ba4120f767beeed35c)
+(cherry picked from commit 42a8539d497322716df0150c2123befd246d69d8)
+---
+ neutron/extensions/securitygroup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/neutron/extensions/securitygroup.py b/neutron/extensions/securitygroup.py
+index 637dbe3..37031e2 100644
+--- a/neutron/extensions/securitygroup.py
++++ b/neutron/extensions/securitygroup.py
+@@ -164,7 +164,7 @@ def convert_ip_prefix_to_cidr(ip_prefix):
+     try:
+         cidr = netaddr.IPNetwork(ip_prefix)
+         return str(cidr)
+-    except (TypeError, netaddr.AddrFormatError):
++    except (ValueError, TypeError, netaddr.AddrFormatError):
+         raise qexception.InvalidCIDR(input=ip_prefix)
diff --git a/rpm/SOURCES/0008-Remove-kernel-version-check-for-OVS-VXLAN.patch b/rpm/SOURCES/0008-Remove-kernel-version-check-for-OVS-VXLAN.patch
new file mode 100644 (file)
index 0000000..8ca8c9b
--- /dev/null
@@ -0,0 +1,196 @@
+From b4ce02e85bcd3d08d02e7e2917fb78429909b92f Mon Sep 17 00:00:00 2001
+From: Miguel Angel Ajo <mangelajo@redhat.com>
+Date: Mon, 26 May 2014 15:56:23 +0200
+Subject: [PATCH] Remove kernel version check for OVS VXLAN
+
+Upstream kernel version check for OVS VXLAN doesn't work
+in RHEL, because we backport those features to our 2.6.x
+kernel branch. The check is removed downstream until
+a solution that works for everyone is available.
+
+Resolves rhbz: 1100164
+Downstream-Only
+Upstream-Juno: https://review.openstack.org/#/c/88121/
+
+Change-Id: Ica9188c624bf8f7ba91eee2537a2219a97017b54
+Reviewed-on: https://code.engineering.redhat.com/gerrit/25694
+Tested-by: RHOS Jenkins <apevec+rhosci@redhat.com>
+Reviewed-by: Miguel Angel Ajo Pelayo <majopela@redhat.com>
+Reviewed-by: Ihar Hrachyshka <ihrachys@redhat.com>
+Tested-by: Ihar Hrachyshka <ihrachys@redhat.com>
+---
+ neutron/plugins/ofagent/agent/ofa_neutron_agent.py       |  1 -
+ neutron/plugins/openvswitch/agent/ovs_neutron_agent.py   |  1 -
+ neutron/tests/unit/ofagent/test_ofa_neutron_agent.py     | 10 +++++-----
+ neutron/tests/unit/openvswitch/test_ovs_lib.py           | 12 ++++++------
+ neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py | 10 +++++-----
+ neutron/tests/unit/openvswitch/test_ovs_tunnel.py        |  2 +-
+ 6 files changed, 17 insertions(+), 19 deletions(-)
+
+diff --git a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
+index c6e65e5..5caef4b 100644
+--- a/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
++++ b/neutron/plugins/ofagent/agent/ofa_neutron_agent.py
+@@ -266,7 +266,6 @@ class OFANeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin):
+         self.local_ip = local_ip
+         self.tunnel_count = 0
+         self.vxlan_udp_port = cfg.CONF.AGENT.vxlan_udp_port
+-        self._check_ovs_version()
+         if self.enable_tunneling:
+             self.setup_tunnel_br(tun_br)
+         # Collect additional bridges to monitor
+diff --git a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
+index 11ff682..603a5c7 100644
+--- a/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
++++ b/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
+@@ -211,7 +211,6 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
+         self.local_ip = local_ip
+         self.tunnel_count = 0
+         self.vxlan_udp_port = cfg.CONF.AGENT.vxlan_udp_port
+-        self._check_ovs_version()
+         if self.enable_tunneling:
+             self.setup_tunnel_br(tun_br)
+         # Collect additional bridges to monitor
+diff --git a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
+index 71afcd2..9d8e83a 100644
+--- a/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
++++ b/neutron/tests/unit/ofagent/test_ofa_neutron_agent.py
+@@ -534,30 +534,30 @@ class TestOFANeutronAgent(OFAAgentTestCase):
+                         version_ok = False
+                 self.assertEqual(version_ok, expecting_ok)
+-    def test_check_minimum_version(self):
++    def _test_check_minimum_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_future_version(self):
++    def _test_check_future_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_fail_version(self):
++    def _test_check_fail_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=False)
+-    def test_check_fail_no_version(self):
++    def _test_check_fail_no_version(self):
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(None, None,
+                                       min_kernel_ver, expecting_ok=False)
+-    def test_check_fail_klm_version(self):
++    def _test_check_fail_klm_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
+         install_ver = str(float(min_vxlan_ver) - 0.01)
+diff --git a/neutron/tests/unit/openvswitch/test_ovs_lib.py b/neutron/tests/unit/openvswitch/test_ovs_lib.py
+index a9c1b98..647f631 100644
+--- a/neutron/tests/unit/openvswitch/test_ovs_lib.py
++++ b/neutron/tests/unit/openvswitch/test_ovs_lib.py
+@@ -827,31 +827,31 @@ class OVS_Lib_Test(base.BaseTestCase):
+                         version_ok = False
+                 self.assertEqual(version_ok, expecting_ok)
+-    def test_check_minimum_version(self):
++    def _test_check_minimum_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_future_version(self):
++    def _test_check_future_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_fail_version(self):
++    def _test_check_fail_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=False)
+-    def test_check_fail_no_version(self):
++    def _test_check_fail_no_version(self):
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(None, None,
+                                       min_kernel_ver,
+                                       expecting_ok=False)
+-    def test_check_fail_klm_version(self):
++    def _test_check_fail_klm_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
+         install_ver = str(float(min_vxlan_ver) - 0.01)
+@@ -860,7 +860,7 @@ class OVS_Lib_Test(base.BaseTestCase):
+                                       min_kernel_ver,
+                                       expecting_ok=False)
+-    def test_check_pass_kernel_version(self):
++    def _test_check_pass_kernel_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
+diff --git a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
+index e6eebef..b2f30ab 100644
+--- a/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
++++ b/neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py
+@@ -514,30 +514,30 @@ class TestOvsNeutronAgent(base.BaseTestCase):
+                         version_ok = False
+                 self.assertEqual(version_ok, expecting_ok)
+-    def test_check_minimum_version(self):
++    def _test_check_minimum_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(min_vxlan_ver, min_vxlan_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_future_version(self):
++    def _test_check_future_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) + 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=True)
+-    def test_check_fail_version(self):
++    def _test_check_fail_version(self):
+         install_ver = str(float(constants.MINIMUM_OVS_VXLAN_VERSION) - 0.01)
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(install_ver, install_ver,
+                                       min_kernel_ver, expecting_ok=False)
+-    def test_check_fail_no_version(self):
++    def _test_check_fail_no_version(self):
+         min_kernel_ver = constants.MINIMUM_LINUX_KERNEL_OVS_VXLAN
+         self._check_ovs_vxlan_version(None, None,
+                                       min_kernel_ver, expecting_ok=False)
+-    def test_check_fail_klm_version(self):
++    def _test_check_fail_klm_version(self):
+         min_vxlan_ver = constants.MINIMUM_OVS_VXLAN_VERSION
+         min_kernel_ver = OVS_LINUX_KERN_VERS_WITHOUT_VXLAN
+         install_ver = str(float(min_vxlan_ver) - 0.01)
+diff --git a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
+index 1940730..809f807 100644
+--- a/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
++++ b/neutron/tests/unit/openvswitch/test_ovs_tunnel.py
+@@ -247,7 +247,7 @@ class TunnelTest(base.BaseTestCase):
+                                           self.VETH_MTU)
+         self._verify_mock_calls()
+-    def test_construct_vxlan(self):
++    def _test_construct_vxlan(self):
+         with mock.patch.object(ovs_lib, 'get_installed_ovs_klm_version',
+                                return_value="1.10") as klm_ver:
+             with mock.patch.object(ovs_lib, 'get_installed_ovs_usr_version',
diff --git a/rpm/SOURCES/neutron-dhcp-setup b/rpm/SOURCES/neutron-dhcp-setup
deleted file mode 100755 (executable)
index 4055768..0000000
+++ /dev/null
@@ -1,136 +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 DHCP agent.
-
-Usage: neutron-dhcp-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
-}
-
-DHCP_CONF=/etc/neutron/dhcp_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
-;;
-
-"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 ${DHCP_CONF} DEFAULT auth_url ${OS_AUTH_URL}
-openstack-config --set ${DHCP_CONF} DEFAULT admin_username ${OS_USERNAME}
-openstack-config --set ${DHCP_CONF} DEFAULT admin_password ${OS_PASSWORD}
-openstack-config --set ${DHCP_CONF} DEFAULT admin_tenant_name ${OS_TENANT_NAME}
-
-# Update interface driver
-openstack-config --set ${DHCP_CONF} DEFAULT interface_driver ${LINUX_INTERFACE_DRIVER}
-
-echo "Configuration updates complete!"
index a4a55c8fe64c17042e7c2f22a7f02af49142691b..17882aca825bd51e6832121b71b56b38b35190ee 100644 (file)
@@ -3,8 +3,9 @@ verbose = True
 lock_path = $state_path/lock
 auth_strategy = noauth
 notification_driver = neutron.openstack.common.notifier.rpc_notifier
-rpc_backend = neutron.openstack.common.rpc.impl_qpid
 allow_overlapping_ips = True
+use_stderr = False
+api_paste_config = /usr/share/neutron/api-paste.ini
 
 [quotas]
 
@@ -18,7 +19,6 @@ auth_protocol = http
 admin_tenant_name = %SERVICE_TENANT_NAME%
 admin_user = %SERVICE_USER%
 admin_password = %SERVICE_PASSWORD%
-signing_dir = $state_path/keystone-signing
 
 [database]
 max_pool_size = 10
@@ -27,3 +27,4 @@ pool_timeout = 10
 
 [service_providers]
 service_provider = LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
+
diff --git a/rpm/SOURCES/neutron-l3-setup b/rpm/SOURCES/neutron-l3-setup
deleted file mode 100755 (executable)
index 44cdf0e..0000000
+++ /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!"
diff --git a/rpm/SOURCES/neutron-node-setup b/rpm/SOURCES/neutron-node-setup
deleted file mode 100755 (executable)
index de051ad..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: neutron-node-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
-}
-
-NEUTRON_USER=neutron
-LB_CONF=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini
-OVS_CONF=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-
-# Nova specific
-NOVA_CONF=/etc/nova/nova.conf
-
-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 ! [ -e "/etc/neutron/plugins/${NEUTRON_PLUGIN}" ]; then
-       echo "Please install the ${NEUTRON_PLUGIN} neutron plugin"
-        exit 0
-fi
-
-#if the database hostname and is not defined and is required
-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")
-;;
-
-"openvswitch")
-        if ! rpm -q openvswitch > /dev/null
-        then
-                echo "Please install openvswitch"
-                exit 0
-        fi
-        OVS_CONF=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-        openstack-config --set ${OVS_CONF} SECURITYGROUP firewall_driver neutron.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:-neutron}
-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.neutronv2.api.API"
-        echo "    neutron_admin_username=${OS_USERNAME}"
-        echo "    neutron_admin_password=${OS_PASSWORD}"
-        echo "    neutron_admin_auth_url=${OS_AUTH_URL}"
-        echo "    neutron_auth_strategy=keystone"
-        echo "    neutron_admin_tenant_name=${OS_TENANT_NAME}"
-        echo "    neutron_url=http://${Q_HOST}:${Q_PORT}/"
-        echo "    firewall_driver=nova.virt.firewall.NoopFirewallDriver"
-        echo "    security_group_api=neutron"
-else
-        openstack-config --set ${NOVA_CONF} DEFAULT network_api_class nova.network.neutronv2.api.API
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_username ${OS_USERNAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_password ${OS_PASSWORD}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_auth_url ${OS_AUTH_URL}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_auth_strategy keystone 
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_tenant_name ${OS_TENANT_NAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_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 neutron
-fi
-
-echo "Configuration updates complete!"
diff --git a/rpm/SOURCES/neutron-server-setup b/rpm/SOURCES/neutron-server-setup
deleted file mode 100755 (executable)
index 268c64c..0000000
+++ /dev/null
@@ -1,376 +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 database support for the selected plugin.
-Please note that some plugins do not require database support. These are addressed in the script.
-The setup of MySQL with a multi-server OpenStack installation is outside of the scope of 
-this simple helper script.
-
-Usage: neutron-server-setup [options]
-Options:
-       --help        | -h
-               Print usage information.
-        --qpw <pw>    | -q <pw>
-                Specify the password for the 'neutron' MySQL user that neutron will
-                use to connect to the 'neutron' MySQL database.  By default,
-                the password 'neutron' will be used.
-
-       --rootpw <pw> | -r <pw>
-               Specify the root MySQL password.  If the script installs
-               the MySQL server, it will set the root password to this value
-               instead of prompting for a password.  If the MySQL server is
-               already installed, this password will be used to connect to the
-               database instead of having to prompt for it.
-       --yes         | -y
-               In cases where the script would normally ask for confirmation
-               before doing something, such as installing mysql-server,
-               just assume yes.  This is useful if you want to run the script
-               non-interactively.
-        --user        | -u
-               The neutron user. 
-        --plugin      | -p
-                The neutron plugin. Supported plugins:-
-                    ${SUPPORTED_PLUGINS[*]}
-EOF
-
-       exit 0
-}
-
-install_mysql_server() {
-       if [ -z "${ASSUME_YES}" ] ; then
-               yum install mysql-server
-       else
-               yum install -y mysql-server
-       fi
-}
-
-start_mysql_server() {
-       service mysqld start
-}
-
-is_valid_plugin() {
-       local i=
-       for i in "${SUPPORTED_PLUGINS[@]}"; do
-               if [ "$i" == "$1" ]; then
-                       return 0 
-               fi
-       done
-       return 1
-}
-
-ASSUME_YES=""
-NEUTRON_USER=neutron
-MYSQL_Q_PW=neutron
-Q_CONF=/etc/neutron/neutron.conf
-LB_CONF=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini
-OVS_CONF=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-Q_HOST='localhost'
-Q_PORT=9696
-
-# Keystone specific
-OS_USERNAME=${OS_USERNAME:-neutron}
-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}
-
-# Nova specific
-NOVA_CONF=/etc/nova/nova.conf
-SCHEDULER_DRIVER=""
-
-while [ $# -gt 0 ]
-do
-       case "$1" in
-               -h|--help)
-                       usage
-                       ;;
-               -q|--qpw)
-                       shift
-                       MYSQL_Q_PW==${1}
-                       ;;
-               -r|--rootpw)
-                       shift
-                       MYSQL_ROOT_PW=${1}
-                       ;;
-               -y|--yes)
-                       ASSUME_YES="yes"
-                       ;;
-                -u|--user)
-                        shift
-                        NEUTRON_USER=${1}
-                        ;;
-                -p|--plugin)
-                        shift
-                        NEUTRON_PLUGIN=${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 ! [ -e "${Q_CONF}" ]; then
-       echo "Please install the neutron package"
-       exit 0
-fi
-
-if ! [ -e "/etc/neutron/plugins/${NEUTRON_PLUGIN}" ]; then
-       echo "Please install the ${NEUTRON_PLUGIN} neutron plugin"
-        exit 0
-fi
-
-case "${NEUTRON_PLUGIN}" in
-"linuxbridge")
-       DB_NAME="neutron_linux_bridge"
-        Q_PLUGIN_CLASS="neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2"
-;;
-
-"openvswitch")
-       if ! rpm -q --whatprovides openvswitch > /dev/null 
-       then
-               echo "Please install openvswitch"
-               exit 0
-       fi
-       DB_NAME="ovs_neutron"
-        Q_PLUGIN_CLASS="neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2"
-;;
-esac
-
-# Update neutron.conf
-# Plugin
-openstack-config --set ${Q_CONF} DEFAULT core_plugin $Q_PLUGIN_CLASS
-# QPID
-openstack-config --set ${Q_CONF} DEFAULT rpc_backend neutron.openstack.common.rpc.impl_qpid
-openstack-config --set ${Q_CONF} DEFAULT qpid_hostname localhost
-# Authentication
-openstack-config --set ${Q_CONF} DEFAULT auth_strategy keystone
-
-openstack-config --del ${Q_CONF} keystone_authtoken admin_tenant_name
-openstack-config --del ${Q_CONF} keystone_authtoken admin_user
-openstack-config --del ${Q_CONF} keystone_authtoken admin_password
-
-openstack-config --set ${Q_CONF} keystone_authtoken admin_tenant_name ${OS_TENANT_NAME}
-openstack-config --set ${Q_CONF} keystone_authtoken admin_user ${OS_USERNAME}
-openstack-config --set ${Q_CONF} keystone_authtoken admin_password ${OS_PASSWORD}
-
-echo "Plugin: ${NEUTRON_PLUGIN} => Database: ${DB_NAME}"
-
-# Make sure MySQL is installed.
-
-NEW_MYSQL_INSTALL=0
-if ! rpm -q --whatprovides mysql-server > /dev/null
-then
-       if [ -z "${ASSUME_YES}" ] ; then
-               printf "mysql-server is not installed.  Would you like to install it now? (y/n): "
-               read response
-               case "$response" in
-                       y|Y)
-                               ;;
-                       n|N)
-                               echo "mysql-server must be installed.  Please install it before proceeding."
-                               exit 0
-                               ;;
-                       *)
-                               echo "Invalid response."
-                               exit 1
-               esac
-       fi
-
-       NEW_MYSQL_INSTALL=1
-       install_mysql_server
-fi
-
-
-# Make sure mysqld is running.
-
-if ! service mysqld status > /dev/null
-then
-       if [ -z "${ASSUME_YES}" ] ; then
-               printf "mysqld is not running.  Would you like to start it now? (y/n): "
-               read response
-               case "$response" in
-                       y|Y)
-                               ;;
-                       n|N)
-                               echo "mysqld must be running.  Please start it before proceeding."
-                               exit 0
-                               ;;
-                       *)
-                               echo "Invalid response."
-                               exit 1
-               esac
-       fi
-
-       start_mysql_server
-
-       # If we both installed and started, ensure it starts at boot
-       [ $NEW_MYSQL_INSTALL -eq 1 ] && chkconfig mysqld on
-fi
-
-# Get MySQL root access.
-if [ $NEW_MYSQL_INSTALL -eq 1 ]
-then
-       if [ ! "${MYSQL_ROOT_PW+defined}" ] ; then
-               echo "Since this is a fresh installation of MySQL, please set a password for the 'root' mysql user."
-
-               PW_MATCH=0
-               while [ $PW_MATCH -eq 0 ]
-               do
-                       printf "Enter new password for 'root' mysql user: "
-                       read -s MYSQL_ROOT_PW
-                       echo
-                       printf "Enter new password again: "
-                       read -s PW2
-                       echo
-                       if [ "${MYSQL_ROOT_PW}" = "${PW2}" ] ; then
-                               PW_MATCH=1
-                       else
-                               echo "Passwords did not match."
-                       fi
-               done
-       fi
-
-       echo "UPDATE mysql.user SET password = password('${MYSQL_ROOT_PW}') WHERE user = 'root'; DELETE FROM mysql.user WHERE user = ''; flush privileges;" | mysql -u root
-       if ! [ $? -eq 0 ] ; then
-               echo "Failed to set password for 'root' MySQL user."
-               exit 1
-       fi
-elif [ ! "${MYSQL_ROOT_PW+defined}" ] ; then
-       printf "Please enter the password for the 'root' MySQL user: "
-       read -s MYSQL_ROOT_PW
-       echo
-fi
-
-# Sanity check MySQL credentials.
-
-MYSQL_ROOT_PW_ARG=""
-if [ "${MYSQL_ROOT_PW+defined}" ]
-then
-       MYSQL_ROOT_PW_ARG="--password=${MYSQL_ROOT_PW}"
-fi
-echo "SELECT 1;" | mysql -u root ${MYSQL_ROOT_PW_ARG} > /dev/null
-if ! [ $? -eq 0 ]
-then
-       echo "Failed to connect to the MySQL server.  Please check your root user credentials."
-       exit 1
-fi
-echo "Verified connectivity to MySQL."
-
-# Create a database user - check if it does not exist prior
-USER_EXISTS=$(mysql -u root ${MYSQL_ROOT_PW_ARG} -e "SELECT user FROM mysql.user WHERE user='${NEUTRON_USER}'"|grep ${NEUTRON_USER} | wc -l)
-if [ ${USER_EXISTS} -ne 0 ]; then
-       echo "User ${NEUTRON_USER} already exists"
-else
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "create user '${NEUTRON_USER}'@'%' identified by '${MYSQL_Q_PW}'"
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "create user '${NEUTRON_USER}'@'localhost' identified by '${MYSQL_Q_PW}'"
-fi
-
-#create database
-DB_EXISTS=$(mysql -u root ${MYSQL_ROOT_PW_ARG} -e "show databases"|grep ${DB_NAME}| wc -l)
-if [ ${DB_EXISTS} -ne 0 ]; then
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "drop database ${DB_NAME}"
-fi
-mysql -u root ${MYSQL_ROOT_PW_ARG} -e "create database ${DB_NAME}"
-
-# Configure database specifics
-case "${NEUTRON_PLUGIN}" in
-"linuxbridge")
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on neutron_linux_bridge.* to '${NEUTRON_USER}'@'%'"
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on neutron_linux_bridge.* to '${NEUTRON_USER}'@'localhost'"
-       openstack-config --set ${LB_CONF} DATABASE sql_connection mysql://${NEUTRON_USER}:${MYSQL_Q_PW}@`hostname`/neutron_linux_bridge
-       
-       echo "Please enter network device for VLAN trunking:"
-       read NETWORK_DEVICE
-        openstack-config --set ${LB_CONF} LINUX_BRIDGE physical_interface ${NETWORK_DEVICE}
-
-       ln -s ${LB_CONF} /etc/neutron/plugin.ini
-;;
-
-"openvswitch")
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on ovs_neutron.* to '${NEUTRON_USER}'@'%'"
-       mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on ovs_neutron.* to '${NEUTRON_USER}'@'localhost'"
-        openstack-config --set ${OVS_CONF} DATABASE sql_connection mysql://${NEUTRON_USER}:${MYSQL_Q_PW}@`hostname`/ovs_neutron
-        openstack-config --set ${OVS_CONF} SECURITYGROUP firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
-       ln -s ${OVS_CONF} /etc/neutron/plugin.ini
-;;
-esac
-
-if [ -z "${ASSUME_YES}" ] ; then
-    echo "Would you like to update the nova configuration files? (y/n): "
-    read response
-    case "$response" in
-    y|Y)
-       ;;
-    *)
-       echo "Complete!"
-       exit 0
-    esac
-fi
-
-# 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_classi=nova.network.neutronv2.api.API"
-        echo "    neutron_admin_username=${OS_USERNAME}"
-        echo "    neutron_admin_password=${OS_PASSWORD}"
-        echo "    neutron_admin_auth_url=${OS_AUTH_URL}"
-        echo "    neutron_auth_strategy=keystone"
-        echo "    neutron_admin_tenant_name=${OS_TENANT_NAME}"
-        echo "    neutron_url=http://${Q_HOST}:${Q_PORT}/"
-        echo "    firewall_driver=nova.virt.firewall.NoopFirewallDriver"
-        echo "    security_group_api=neutron"
-else
-        openstack-config --set ${NOVA_CONF} DEFAULT network_api_class nova.network.neutronv2.api.API
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_username ${OS_USERNAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_password ${OS_PASSWORD}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_auth_url ${OS_AUTH_URL}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_auth_strategy keystone 
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_admin_tenant_name ${OS_TENANT_NAME}
-        openstack-config --set ${NOVA_CONF} DEFAULT neutron_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 neutron
-fi
-
-echo "Configuration updates complete!"
index 6140ece109d5b12d8c32999a082bcfd4f4ac31d5..feb4af521f19656034a418885a96afd0736005b5 100644 (file)
@@ -17,6 +17,7 @@ configs=(
     "/etc/$proj/$proj.conf" \
     "/etc/$proj/vpn_agent.ini" \
     "/etc/$proj/l3_agent.ini" \
+    "/etc/$proj/fwaas_driver.ini" \
 )
 pidfile="/var/run/$proj/$prog.pid"
 
index 94830d7db239c49b99587e39eda79d7bc9739f78..d31274d7fe169b23f5fe39f7a25b3bbf594618da 100644 (file)
@@ -5,4 +5,4 @@ stop on runlevel [S016]
 
 respawn
 
-exec su -s /bin/sh -c "exec /usr/bin/neutron-vpn-agent --log-file /var/log/neutron/vpn-agent.log --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/vpn_agent.ini --config-file /etc/neutron/l3_agent.ini" neutron
+exec su -s /bin/sh -c "exec /usr/bin/neutron-vpn-agent --log-file /var/log/neutron/vpn-agent.log --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/vpn_agent.ini --config-file /etc/neutron/l3_agent.ini --config-file /etc/neutron/fwaas_driver.ini" neutron
index 23fff013847863de4bfa36866bafd9c440be195d..c984a9d52c8adda1aefb577e4252f9b82d376f6c 100644 (file)
@@ -1,8 +1,8 @@
-%global release_name icehouse 
+%global release_name icehouse
 
 Name:          openstack-neutron
 Version:       2014.1
-Release:       0.9.rc1%{?dist}
+Release:       20%{?dist}
 Provides:      openstack-quantum = %{version}-%{release}
 Obsoletes:     openstack-quantum < 2013.2-0.3.b3
 
@@ -12,14 +12,9 @@ Group:               Applications/System
 License:       ASL 2.0
 URL:           http://launchpad.net/neutron/
 
-#Source0:      http://launchpad.net/neutron/%{release_name}/%{version}/+download/neutron-%{version}.rc1.tar.gz
-Source0:       http://launchpad.net/neutron/%{release_name}/%{release_name}-rc1/+download/neutron-%{version}.rc1.tar.gz
+Source0:       http://launchpad.net/neutron/%{release_name}/%{version}/+download/neutron-%{version}.tar.gz
 Source1:       neutron.logrotate
 Source2:       neutron-sudoers
-Source4:       neutron-server-setup
-Source5:       neutron-node-setup
-Source6:       neutron-dhcp-setup
-Source7:       neutron-l3-setup
 
 Source10:      neutron-server.init
 Source20:      neutron-server.upstart
@@ -50,10 +45,16 @@ Source42:   neutron-metering-agent.upstart
 
 Source90:      neutron-dist.conf
 #
-# patches_base=2014.1.rc1+1
+# patches_base=2014.1+1
 #
 Patch0001: 0001-use-parallel-installed-versions-in-RHEL6.patch
 Patch0002: 0002-Remove-dnsmasq-version-warning.patch
+Patch0003: 0003-remove-runtime-dependency-on-pbr.patch
+Patch0004: 0004-Sync-service-and-systemd-modules-from-oslo-incubator.patch
+Patch0005: 0005-Removed-signing_dir-from-neutron.conf.patch
+Patch0006: 0006-Validate-CIDR-given-as-ip-prefix-in-security-group-r.patch
+Patch0007: 0007-netaddr-0.7.10-raises-ValueError-instead-of-AddrForm.patch
+Patch0008: 0008-Remove-kernel-version-check-for-OVS-VXLAN.patch
 
 BuildArch:     noarch
 
@@ -62,7 +63,7 @@ BuildRequires:        python-setuptools
 # Build require these parallel versions
 # as setup.py build imports neutron.openstack.common.setup
 # which will then check for these
-BuildRequires: python-sqlalchemy0.7
+BuildRequires: python-sqlalchemy
 BuildRequires: python-webob1.2
 BuildRequires: python-paste-deploy1.5
 BuildRequires: python-routes1.12
@@ -71,17 +72,10 @@ BuildRequires:      dos2unix
 BuildRequires: python-pbr
 BuildRequires: python-d2to1
 
-
 Requires:      dnsmasq-utils
 Requires:      python-neutron = %{version}-%{release}
+Requires:      python-oslo-rootwrap
 Requires:      openstack-utils
-Requires:      python-keystone
-Requires:      python-pbr
-
-# this require fixes bz#1019487 due to this patch 
-# https://review.openstack.org/#/c/61105/8/neutron/agent/linux/ovs_lib.py
-# which might need refactor to remove this dependency here
-Requires:       openstack-neutron-openvswitch
 
 Requires(post):                chkconfig
 Requires(postun):      initscripts
@@ -121,13 +115,13 @@ Requires: python-greenlet
 Requires:      python-httplib2 >= 0.7.5
 Requires:      python-iso8601
 Requires:      python-jinja2-26
-Requires:      python-keystoneclient >= 0.6.0
+Requires:      python-keystoneclient >= 0.7.0
 Requires:      python-kombu
 Requires:      python-lxml
 Requires:      python-oslo-rootwrap
 Requires:      python-paste-deploy1.5
 Requires:      python-routes1.12
-Requires:      python-sqlalchemy0.7 >= 0.7.8
+Requires:      python-sqlalchemy >= 0.7.8
 Requires:      python-webob1.2 >= 1.2.3
 Requires:      python-netaddr
 Requires:      python-oslo-config >= 1:1.2.0
@@ -136,6 +130,7 @@ Requires:   python-neutronclient >= 2.3.4
 Requires:      python-stevedore
 Requires:      python-six >= 1.4.1
 # requires.txt six >=1.5.2 actually
+Requires:      python-novaclient >= 1:2.17.0
 Requires:      sudo
 
 %description -n python-neutron
@@ -145,7 +140,7 @@ networks.
 This package contains the neutron Python library.
 
 
-%package -n openstack-neutron-bigswitch
+%package bigswitch
 Summary:       Neutron Big Switch plugin
 Group:         Applications/System
 
@@ -155,7 +150,7 @@ Obsoletes:  openstack-quantum-bigswitch < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-bigswitch
+%description bigswitch
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -164,7 +159,7 @@ networks using the FloodLight Openflow Controller or the Big Switch
 Networks Controller.
 
 
-%package -n openstack-neutron-brocade
+%package brocade
 Summary:       Neutron Brocade plugin
 Group:         Applications/System
 
@@ -174,7 +169,7 @@ Obsoletes:  openstack-quantum-brocade < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-brocade
+%description brocade
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -182,7 +177,7 @@ This package contains the neutron plugin that implements virtual
 networks using Brocade VCS switches running NOS.
 
 
-%package -n openstack-neutron-cisco
+%package cisco
 Summary:       Neutron Cisco plugin
 Group:         Applications/System
 
@@ -193,7 +188,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 Requires:      python-configobj
 
 
-%description -n openstack-neutron-cisco
+%description cisco
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -201,7 +196,7 @@ This package contains the neutron plugin that implements virtual
 networks using Cisco UCS and Nexus.
 
 
-%package -n openstack-neutron-hyperv
+%package hyperv
 Summary:       Neutron Hyper-V plugin
 Group:         Applications/System
 
@@ -211,7 +206,7 @@ Obsoletes:  openstack-quantum-hyperv < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-hyperv
+%description hyperv
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -219,14 +214,14 @@ This package contains the neutron plugin that implements virtual
 networks using Microsoft Hyper-V.
 
 
-%package -n openstack-neutron-ibm
+%package ibm
 Summary:       Neutron IBM plugin
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-ibm
+%description ibm
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -234,7 +229,7 @@ This package contains the neutron plugin that implements virtual
 networks from IBM.
 
 
-%package -n openstack-neutron-linuxbridge
+%package linuxbridge
 Summary:       Neutron linuxbridge plugin
 Group:         Applications/System
 
@@ -243,10 +238,9 @@ Obsoletes: openstack-quantum-linuxbridge < 2013.2-0.3.b3
 
 Requires:      bridge-utils
 Requires:      openstack-neutron = %{version}-%{release}
-Requires:      python-pyudev
 
 
-%description -n openstack-neutron-linuxbridge
+%description linuxbridge
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -254,7 +248,7 @@ This package contains the neutron plugin that implements virtual
 networks as VLANs using Linux bridging.
 
 
-%package -n openstack-neutron-midonet
+%package midonet
 Summary:       Neutron MidoNet plugin
 Group:         Applications/System
 
@@ -264,7 +258,7 @@ Obsoletes:  openstack-quantum-midonet < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-midonet
+%description midonet
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -272,7 +266,7 @@ This package contains the neutron plugin that implements virtual
 networks using MidoNet from Midokura.
 
 
-%package -n openstack-neutron-ml2
+%package ml2
 Summary:       Neutron ML2 plugin
 Group:         Applications/System
 
@@ -282,7 +276,7 @@ Obsoletes:  openstack-quantum-ml2 < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-ml2
+%description ml2
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -291,7 +285,7 @@ to support separately extensible sets of network types and the mechanisms
 for accessing those types.
 
 
-%package -n openstack-neutron-mellanox
+%package mellanox
 Summary:       Neutron Mellanox plugin
 Group:         Applications/System
 
@@ -301,48 +295,42 @@ Obsoletes:        openstack-quantum-mellanox < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-mellanox
+%description mellanox
 This plugin implements Neutron v2 APIs with support for Mellanox embedded
 switch functionality as part of the VPI (Ethernet/InfiniBand) HCA.
 
 
-%package -n openstack-neutron-ofagent
-Summary:       Neutron ofagent plugin from ryu project
-Group:         Applications/system
+%package nuage
+Summary:    Neutron Nuage plugin
+Group:      Applications/System
 
-Requires:      openstack-neutron = %{version}-%{release}
+Requires:   openstack-neutron = %{version}-%{release}
 
-%description -n openstack-neutron-ofagent
-This plugin implements Neutron v2 APIs with support for the ryu ofagent
-plugin.
 
+%description nuage
+This plugin implements Neutron v2 APIs with support for Nuage Networks
+Virtual Service Platform (VSP).
 
-%package -n openstack-neutron-nicira
-Summary:       Neutron Nicira plugin
-Group:         Applications/System
 
-Provides:      openstack-quantum-nicira = %{version}-%{release}
-Obsoletes:     openstack-quantum-nicira < 2013.2-0.3.b3
+%package ofagent
+Summary:       Neutron ofagent plugin from ryu project
+Group:         Applications/system
 
 Requires:      openstack-neutron = %{version}-%{release}
 
-
-%description -n openstack-neutron-nicira
-Neutron provides an API to dynamically request and configure virtual
-networks.
-
-This package contains the neutron plugin that implements virtual
-networks using Nicira NVP.
+%description ofagent
+This plugin implements Neutron v2 APIs with support for the ryu ofagent
+plugin.
 
 
-%package -n openstack-neutron-oneconvergence-nvsd
+%package oneconvergence-nvsd
 Summary:       Neutron One Convergence NVSD plugin
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-oneconvergence-nvsd
+%description oneconvergence-nvsd
 Neutron provides an API to dynamnically request and configure virtual
 networks.
 
@@ -350,7 +338,7 @@ This package contains the neutron plugin that implements virtual
 networks using One Convergence NVSD
 
 
-%package -n openstack-neutron-openvswitch
+%package openvswitch
 Summary:       Neutron openvswitch plugin
 Group:         Applications/System
 
@@ -361,7 +349,7 @@ Requires:   openstack-neutron = %{version}-%{release}
 Requires:      openvswitch
 
 
-%description -n openstack-neutron-openvswitch
+%description openvswitch
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -369,7 +357,7 @@ This package contains the neutron plugin that implements virtual
 networks using Open vSwitch.
 
 
-%package -n openstack-neutron-plumgrid
+%package plumgrid
 Summary:       Neutron PLUMgrid plugin
 Group:         Applications/System
 
@@ -379,7 +367,7 @@ Obsoletes:  openstack-quantum-plumgrid < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-plumgrid
+%description plumgrid
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -387,7 +375,7 @@ This package contains the neutron plugin that implements virtual
 networks using the PLUMgrid platform.
 
 
-%package -n openstack-neutron-ryu
+%package ryu
 Summary:       Neutron Ryu plugin
 Group:         Applications/System
 
@@ -397,7 +385,7 @@ Obsoletes:  openstack-quantum-ryu < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-ryu
+%description ryu
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -405,7 +393,7 @@ This package contains the neutron plugin that implements virtual
 networks using the Ryu Network Operating System.
 
 
-%package -n openstack-neutron-nec
+%package nec
 Summary:       Neutron NEC plugin
 Group:         Applications/System
 
@@ -415,7 +403,7 @@ Obsoletes:  openstack-quantum-nec < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-nec
+%description nec
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -423,7 +411,7 @@ This package contains the neutron plugin that implements virtual
 networks using the NEC OpenFlow controller.
 
 
-%package -n openstack-neutron-metaplugin
+%package metaplugin
 Summary:       Neutron meta plugin
 Group:         Applications/System
 
@@ -433,7 +421,7 @@ Obsoletes:  openstack-quantum-metaplugin < 2013.2-0.3.b3
 Requires:      openstack-neutron = %{version}-%{release}
 
 
-%description -n openstack-neutron-metaplugin
+%description metaplugin
 Neutron provides an API to dynamically request and configure virtual
 networks.
 
@@ -441,38 +429,38 @@ This package contains the neutron plugin that implements virtual
 networks using multiple other neutron plugins.
 
 
-%package -n openstack-neutron-vmware
+%package vmware
 Summary:       Neutron VMWare NSX support
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 Provides:      openstack-neutron-nicira = %{version}-%{release}
-Obsoletes:     openstack-neutron-nicira < 2014.1-0.5.b2
+Obsoletes:     openstack-neutron-nicira < 2014.1-4
 
-%description -n openstack-neutron-vmware
+%description vmware
 This package adds VMWare NSX support for neutron
 
 
-%package -n openstack-neutron-metering-agent
+%package metering-agent
 Summary:       Neutron bandwidth metering agent
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
-%description -n openstack-neutron-metering-agent
+%description metering-agent
 Neutron provides an API to measure bandwidth utilization
 
 This package contains the neutron agent responsible for generating bandwidth
 utilization notifications.
 
 
-%package -n openstack-neutron-vpn-agent
+%package vpn-agent
 Summary:       Neutron VPNaaS agent
 Group:         Applications/System
 
 Requires:      openstack-neutron = %{version}-%{release}
 
-%description -n openstack-neutron-vpn-agent
+%description vpn-agent
 Neutron provides an API to implement VPN as a service
 
 This package contains the neutron agent responsible for implenting VPNaaS with
@@ -484,9 +472,23 @@ IPSec.
 
 %patch0001 -p1
 %patch0002 -p1
+%patch0003 -p1
+%patch0004 -p1
+%patch0005 -p1
+%patch0006 -p1
+%patch0007 -p1
+%patch0008 -p1
 
 find neutron -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
 
+# Ensure SOURCES.txt ends in a newline and if any patches have added files, append them to SOURCES.txt
+[ -n "$(tail -c 1 < neutron.egg-info/SOURCES.txt)" ] && echo >> neutron.egg-info/SOURCES.txt
+if ls %{_sourcedir}/*.patch >/dev/null 2>&1; then
+awk '/^new file/ {split(a,files," ");print substr(files[3],3)} {a = $0}' %{_sourcedir}/*.patch >> neutron.egg-info/SOURCES.txt
+fi
+
+sed -i 's/RPMVERSION/%{version}/; s/RPMRELEASE/%{release}/' neutron/version.py
+
 chmod 644 neutron/plugins/cisco/README
 
 # Let's handle dependencies ourseleves
@@ -530,6 +532,7 @@ mv %{buildroot}/usr/etc/neutron/rootwrap.d/*.filters %{buildroot}%{_datarootdir}
 # Move config files to proper location
 install -d -m 755 %{buildroot}%{_sysconfdir}/neutron
 mv %{buildroot}/usr/etc/neutron/* %{buildroot}%{_sysconfdir}/neutron
+mv %{buildroot}%{_sysconfdir}/neutron/api-paste.ini %{buildroot}%{_datadir}/neutron/api-paste.ini
 chmod 640  %{buildroot}%{_sysconfdir}/neutron/plugins/*/*.ini
 
 # Install logrotate
@@ -559,12 +562,6 @@ install -d -m 755 %{buildroot}%{_sharedstatedir}/neutron
 install -d -m 755 %{buildroot}%{_localstatedir}/log/neutron
 install -d -m 755 %{buildroot}%{_localstatedir}/run/neutron
 
-# Install setup helper scripts
-install -p -D -m 755 %{SOURCE4} %{buildroot}%{_bindir}/neutron-server-setup
-install -p -D -m 755 %{SOURCE5} %{buildroot}%{_bindir}/neutron-node-setup
-install -p -D -m 755 %{SOURCE6} %{buildroot}%{_bindir}/neutron-dhcp-setup
-install -p -D -m 755 %{SOURCE7} %{buildroot}%{_bindir}/neutron-l3-setup
-
 # Install upstart jobs examples
 install -p -m 644 %{SOURCE20} %{buildroot}%{_datadir}/neutron/
 install -p -m 644 %{SOURCE21} %{buildroot}%{_datadir}/neutron/
@@ -671,73 +668,73 @@ if [ -e %{_localstatedir}/lib/rpm-state/UPGRADE_FROM_QUANTUM ];then
 fi
 
 
-%post -n openstack-neutron-linuxbridge
+%post linuxbridge
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-linuxbridge-agent
 fi
 
-%preun -n openstack-neutron-linuxbridge
+%preun linuxbridge
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-linuxbridge-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-linuxbridge-agent
 fi
 
-%postun -n openstack-neutron-linuxbridge
+%postun linuxbridge
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-linuxbridge-agent condrestart >/dev/null 2>&1 || :
 fi
 
 
-%post -n openstack-neutron-openvswitch
+%post openvswitch
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-openvswitch-agent
 fi
 
-%preun -n openstack-neutron-openvswitch
+%preun openvswitch
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-openvswitch-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-openvswitch-agent
 fi
 
-%postun -n openstack-neutron-openvswitch
+%postun openvswitch
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-openvswitch-agent condrestart >/dev/null 2>&1 || :
 fi
 
 
-%post -n openstack-neutron-ryu
+%post ryu
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-ryu-agent
 fi
 
-%preun -n openstack-neutron-ryu
+%preun ryu
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-ryu-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-ryu-agent
 fi
 
-%postun -n openstack-neutron-ryu
+%postun ryu
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-ryu-agent condrestart >/dev/null 2>&1 || :
 fi
 
 
-%post -n openstack-neutron-nec
+%post nec
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-nec-agent
 fi
 
-%preun -n openstack-neutron-nec
+%preun nec
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-nec-agent stop >/dev/null 2>&1
@@ -745,7 +742,7 @@ if [ $1 -eq 0 ] ; then
 fi
 
 
-%postun -n openstack-neutron-nec
+%postun nec
 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
@@ -753,60 +750,60 @@ if [ $1 -ge 1 ] ; then
 fi
 
 
-%post -n openstack-neutron-mellanox
+%post mellanox
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-mlnx-agent
 fi
 
-%preun -n openstack-neutron-mellanox
+%preun mellanox
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-mlnx-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-mlnx-agent
 fi
 
-%postun -n openstack-neutron-mellanox
+%postun mellanox
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-mlnx-agent condrestart >/dev/null 2>&1 || :
 fi
 
 
-%post -n openstack-neutron-vpn-agent
+%post vpn-agent
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-vpn-agent
 fi
 
-%preun -n openstack-neutron-vpn-agent
+%preun vpn-agent
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-vpn-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-vpn-agent
 fi
 
-%postun -n openstack-neutron-vpn-agent
+%postun vpn-agent
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-vpn-agent condrestart >/dev/null 2>&1 || :
 fi
 
 
-%post -n openstack-neutron-metering-agent
+%post metering-agent
 if [ $1 -eq 1 ] ; then
     # Initial installation
     /sbin/chkconfig --add neutron-metering-agent
 fi
 
-%preun -n openstack-neutron-metering-agent
+%preun metering-agent
 if [ $1 -eq 0 ] ; then
     # Package removal, not upgrade
     /sbin/service neutron-metering-agent stop >/dev/null 2>&1
     /sbin/chkconfig --del neutron-metering-agent
 fi
 
-%postun -n openstack-neutron-metering-agent
+%postun metering-agent
 if [ $1 -ge 1 ] ; then
     # Package upgrade, not uninstall
     /sbin/service neutron-metering-agent condrestart >/dev/null 2>&1 || :
@@ -831,18 +828,14 @@ fi
 %{_bindir}/neutron-db-manage
 %{_bindir}/neutron-debug
 %{_bindir}/neutron-dhcp-agent
-%{_bindir}/neutron-dhcp-setup
 %{_bindir}/neutron-l3-agent
-%{_bindir}/neutron-l3-setup
 %{_bindir}/neutron-lbaas-agent
 %{_bindir}/neutron-metadata-agent
 %{_bindir}/neutron-netns-cleanup
-%{_bindir}/neutron-node-setup
 %{_bindir}/neutron-ns-metadata-proxy
 %{_bindir}/neutron-rootwrap
 %{_bindir}/neutron-rootwrap-xen-dom0
 %{_bindir}/neutron-server
-%{_bindir}/neutron-server-setup
 %{_bindir}/neutron-usage-audit
 
 %{_initrddir}/neutron-server
@@ -860,7 +853,7 @@ fi
 %dir %{_sysconfdir}/neutron
 %{_sysconfdir}/neutron/release
 %attr(-, root, neutron) %{_datadir}/neutron/neutron-dist.conf
-%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/api-paste.ini
+%attr(-, root, neutron) %{_datadir}/neutron/api-paste.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/dhcp_agent.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/fwaas_driver.ini
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/l3_agent.ini
@@ -898,6 +891,7 @@ fi
 %exclude %{python_sitelib}/neutron/plugins/midonet
 %exclude %{python_sitelib}/neutron/plugins/ml2
 %exclude %{python_sitelib}/neutron/plugins/mlnx
+%exclude %{python_sitelib}/neutron/plugins/nuage
 %exclude %{python_sitelib}/neutron/plugins/nec
 %exclude %{python_sitelib}/neutron/plugins/nicira
 %exclude %{python_sitelib}/neutron/plugins/ofagent
@@ -909,7 +903,7 @@ fi
 %{python_sitelib}/neutron-%%{version}*.egg-info
 
 
-%files -n openstack-neutron-bigswitch
+%files bigswitch
 %doc LICENSE
 %doc neutron/plugins/bigswitch/README
 %{_bindir}/neutron-restproxy-agent
@@ -919,7 +913,7 @@ fi
 %doc %{_sysconfdir}/neutron/plugins/bigswitch/README
 
 
-%files -n openstack-neutron-brocade
+%files brocade
 %doc LICENSE
 %doc neutron/plugins/brocade/README.md
 %{python_sitelib}/neutron/plugins/brocade
@@ -927,7 +921,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/brocade/*.ini
 
 
-%files -n openstack-neutron-cisco
+%files cisco
 %doc LICENSE
 %doc neutron/plugins/cisco/README
 %{python_sitelib}/neutron/plugins/cisco
@@ -935,7 +929,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/cisco/*.ini
 
 
-%files -n openstack-neutron-hyperv
+%files hyperv
 %doc LICENSE
 #%%doc neutron/plugins/hyperv/README
 %{_bindir}/neutron-hyperv-agent
@@ -946,7 +940,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/hyperv/*.ini
 
 
-%files -n openstack-neutron-ibm
+%files ibm
 %doc LICENSE
 %{_bindir}/neutron-ibm-agent
 %{_bindir}/quantum-ibm-agent
@@ -956,7 +950,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/ibm/*.ini
 
 
-%files -n openstack-neutron-linuxbridge
+%files linuxbridge
 %doc LICENSE
 %doc neutron/plugins/linuxbridge/README
 %{_bindir}/neutron-linuxbridge-agent
@@ -969,7 +963,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/linuxbridge/*.ini
 
 
-%files -n openstack-neutron-midonet
+%files midonet
 %doc LICENSE
 #%%doc neutron/plugins/midonet/README
 %{python_sitelib}/neutron/plugins/midonet
@@ -977,14 +971,14 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/midonet/*.ini
 
 
-%files -n openstack-neutron-ml2
+%files ml2
 %doc neutron/plugins/ml2/README
 %{python_sitelib}/neutron/plugins/ml2
 %dir %{_sysconfdir}/neutron/plugins/ml2
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/ml2/*.ini
 
 
-%files -n openstack-neutron-mellanox
+%files mellanox
 %doc neutron/plugins/mlnx/README
 %{_bindir}/neutron-mlnx-agent
 %{_bindir}/quantum-mlnx-agent
@@ -994,14 +988,20 @@ fi
 %dir %{_sysconfdir}/neutron/plugins/mlnx
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/mlnx/*.ini
 
+%files nuage
+%doc LICENSE
+#%doc neutron/plugins/nuage/README
+%{python_sitelib}/neutron/plugins/nuage
+#%dir %{_sysconfdir}/neutron/plugins/nuage
+#%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/nuage/*.ini
 
-%files -n openstack-neutron-ofagent
+%files ofagent
 %doc neutron/plugins/ofagent/README
 %{_bindir}/neutron-ofagent-agent
 %{python_sitelib}/neutron/plugins/ofagent
 
 
-%files -n openstack-neutron-oneconvergence-nvsd
+%files oneconvergence-nvsd
 %doc LICENSE
 %doc neutron/plugins/oneconvergence/README
 %dir %{_sysconfdir}/neutron/plugins/oneconvergence
@@ -1011,7 +1011,7 @@ fi
 %{python_sitelib}/neutron/plugins/oneconvergence
 
 
-%files -n openstack-neutron-openvswitch
+%files openvswitch
 %doc LICENSE
 %doc neutron/plugins/openvswitch/README
 %{_bindir}/neutron-openvswitch-agent
@@ -1028,7 +1028,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/openvswitch/*.ini
 
 
-%files -n openstack-neutron-plumgrid
+%files plumgrid
 %doc LICENSE
 %doc neutron/plugins/plumgrid/README
 %{python_sitelib}/neutron/plugins/plumgrid
@@ -1036,7 +1036,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/plumgrid/*.ini
 
 
-%files -n openstack-neutron-ryu
+%files ryu
 %doc LICENSE
 %doc neutron/plugins/ryu/README
 %{_bindir}/neutron-ryu-agent
@@ -1049,7 +1049,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/ryu/*.ini
 
 
-%files -n openstack-neutron-nec
+%files nec
 %doc LICENSE
 %doc neutron/plugins/nec/README
 %{_bindir}/neutron-nec-agent
@@ -1062,7 +1062,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/nec/*.ini
 
 
-%files -n openstack-neutron-metaplugin
+%files metaplugin
 %doc LICENSE
 %doc neutron/plugins/metaplugin/README
 %{python_sitelib}/neutron/plugins/metaplugin
@@ -1070,7 +1070,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/metaplugin/*.ini
 
 
-%files -n openstack-neutron-metering-agent
+%files metering-agent
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/metering_agent.ini
 %{_initrddir}/neutron-metering-agent
@@ -1078,7 +1078,7 @@ fi
 %{_bindir}/neutron-metering-agent
 
 
-%files -n openstack-neutron-vmware
+%files vmware
 %doc LICENSE
 %{_bindir}/neutron-check-nvp-config
 %{_bindir}/quantum-check-nvp-config
@@ -1091,7 +1091,7 @@ fi
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/nicira/*.ini
 
 
-%files -n openstack-neutron-vpn-agent
+%files vpn-agent
 %doc LICENSE
 %config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/vpn_agent.ini
 %{_initrddir}/neutron-vpn-agent
@@ -1101,6 +1101,83 @@ fi
 
 
 %changelog
+* Thu May 29 2014 Miguel Ángel Ajo <majopela@redhat.com> 2014.1-20
+- Add nuage plugin packaging as openstack-neutron-nuage
+
+* Wed May 28 2014 Miguel Angel Ajo <majopela@redhat.com> 2014.1-19
+- Remove kernel version check for OVS VXLAN, not revelant for RDO
+  bz#1081011
+
+* Mon May 19 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-18
+- netaddr<=0.7.10 raises ValueError instead of AddrFormatError, bz#1090137
+
+* Mon May 19 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-17
+- Validate CIDR given as ip-prefix in security-group-rule-create, bz#1090137
+
+* Fri May 16 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-16
+- Fixed neutron-server startup due to duplicate options
+
+* Thu May 15 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-15
+- Make neutron-vpn-agent read fwaas_driver.ini, bz#1098121
+
+* Tue Apr 29 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-14
+- Removed signing_dir from neutron-dist.conf, again (bz#1050842)
+
+* Wed Apr 23 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-13
+- Removed obsolete setup scripts
+
+* Mon Apr 23 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-12
+- Removed signing_dir from neutron.conf
+
+* Tue Apr 22 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-11
+- Pin python-novaclient dependency to >= 2.17.0
+
+* Fri Apr 18 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-10
+- Remove uneeded dep on python-keystone
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-7
+- Require python-novaclient (used for Nova notifications)
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-6
+- We no longer specify notification_driver in neutron-dist.conf
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-5
+- Move api-paste.ini to /usr to make sure new values are applied on upgrade
+
+* Fri Apr 18 2014 Terry Wilson <twilson@redhat.com> - 2014.1-4
+- Rename nicira plugin to vmware
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-3
+- Clean up neutron-dist.conf to reflect identical upstream defaults
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-2
+- Set use_stderr = False to avoid duplicate logging for stderr
+
+* Fri Apr 18 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-1
+- Update to upstream 2014.1
+
+* Tue Apr 15 2014 Miguel Ángel Ajo <majopela@redhat.com> -2014.1-0.19.rc2
+- Include the systemd readiness notification patch
+
+* Tue Apr 15 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.18.rc2
+- Add missing dependency on python-oslo-rootwrap
+
+* Fri Apr 11 2014 Miguel Angel Ajo <mangelajo@redhat.com> 2014.1-0.17.rc2
+- Update to upstream 2014.1.rc2
+
+* Fri Apr 11 2014 Miguel Ángel Ajo <majopela@redhat.com> 2014.1-0.16.rc1
+- Use rabbitmq by default
+
+* Thu Apr 10 2014 Miguel Ángel Ajo <majopela@redhat.com> 2014.1-0.15.rc1
+- Removes the python-pyudev dependency, bz#1053001
+
+* Thu Apr 10 2014 Ihar Hrachyshka <ihrachys@redhat.com> 2014.1-0.14.rc1
+- Remove signing_dir from neutron-dist.conf, bz#1050842
+
+* Fri Apr 04 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.13.rc1
+- Fix startup issue due to invalid group permissions, bz#1080560
+- Remove runtime dependency on python-pbr
+
 * Wed Apr 02 2014 Terry Wilson <twilson@redhat.com> 2014.1-0.9.rc1
 - Update to upstream 2014.1.rc1
 - Remove python-psutil requires