From: Roman Date: Thu, 26 Sep 2013 16:32:41 +0000 (+0400) Subject: add build branch X-Git-Tag: 2014.1~24 X-Git-Url: https://review.fuel-infra.org/gitweb?p=openstack-build%2Fneutron-build.git;a=commitdiff_plain;h=b6d392370814f21b32ba5f5325a1ebaa1241e103 add build branch --- b6d392370814f21b32ba5f5325a1ebaa1241e103 diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..5b10a1115 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,7 @@ +[run] +branch = True +source = neutron +omit = neutron/tests/*,neutron/plugins/cisco/test/*,neutron/openstack/* + +[report] +ignore-errors = True diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..038c6d28e --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +AUTHORS +build/* +build-stamp +ChangeLog +cover/ +.coverage +covhtml/ +dist/ +doc/build +*.DS_Store +*.pyc +neutron.egg-info/ +neutron/vcsversion.py +neutron/versioninfo +pbr*.egg/ +quantum.egg-info/ +quantum/vcsversion.py +quantum/versioninfo +run_tests.err.log +run_tests.log +setuptools*.egg/ +subunit.log +.testrepository +.tox/ +.venv/ +*.mo +*.swp +*.swo diff --git a/.gitreview b/.gitreview new file mode 100644 index 000000000..184583f0d --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.openstack.org +port=29418 +project=openstack/neutron.git diff --git a/.mailmap b/.mailmap new file mode 100644 index 000000000..7bdd06e5e --- /dev/null +++ b/.mailmap @@ -0,0 +1,7 @@ +# Format is: +# +# +lawrancejing +Jiajun Liu +Zhongyue Luo +Kun Huang diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..021856b92 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,43 @@ +# The format of this file isn't really documented; just use --generate-rcfile +[MASTER] +# Add to the black list. It should be a base name, not a +# path. You may set this option multiple times. +ignore=test + +[Messages Control] +# NOTE(justinsb): We might want to have a 2nd strict pylintrc in future +# C0111: Don't require docstrings on every method +# W0511: TODOs in code comments are fine. +# W0142: *args and **kwargs are fine. +# W0622: Redefining id is fine. +disable=C0111,W0511,W0142,W0622 + +[Basic] +# Variable names can be 1 to 31 characters long, with lowercase and underscores +variable-rgx=[a-z_][a-z0-9_]{0,30}$ + +# Argument names can be 2 to 31 characters long, with lowercase and underscores +argument-rgx=[a-z_][a-z0-9_]{1,30}$ + +# Method names should be at least 3 characters long +# and be lowecased with underscores +method-rgx=([a-z_][a-z0-9_]{2,50}|setUp|tearDown)$ + +# Module names matching neutron-* are ok (files in bin/) +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(neutron-[a-z0-9_-]+))$ +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(quantum-[a-z0-9_-]+))$ + +# Don't require docstrings on tests. +no-docstring-rgx=((__.*__)|([tT]est.*)|setUp|tearDown)$ + +[Design] +max-public-methods=100 +min-public-methods=0 +max-args=6 + +[Variables] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +# _ is used by our localization +additional-builtins=_ diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 000000000..01d160ec5 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ neutron/tests/unit $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/debian/compat b/debian/compat new file mode 100755 index 000000000..45a4fb75d --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..cd66de395 --- /dev/null +++ b/debian/control @@ -0,0 +1,552 @@ +Source: quantum +Section: net +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Chuck Short +Build-Depends: debhelper (>= 8.0.0), python-all (>= 2.6) +Build-Depends-Indep: + alembic (>= 0.4.1), + pep8, + python-amqplib, + python-anyjson, + python-cliff, + python-configobj, + python-coverage, + python-eventlet, + python-fixtures (>= 0.3.12), + python-httplib2, + python-iso8601, + python-keystone, + python-kombu, + python-lxml, + python-mock (>= 1.0b1), + python-mox, + python-netaddr, + python-netifaces, + python-nose, + python-novaclient, + python-oslo.config, + python-paste, + python-pastedeploy, + python-pyudev, + python-quantumclient (>= 1:2.2.0), + python-routes, + python-setuptools, + python-setuptools-git, + python-simplejson, + python-sqlalchemy, + python-testtools, + python-webob, + python-webtest +XS-Python-Version: >= 2.6 +Standards-Version: 3.9.4 + +Package: quantum-server +Architecture: all +Depends: + adduser, + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Recommends: quantum-plugin-openvswitch +Description: Quantum is a virtual network service for Openstack - server + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Quantum server + +Package: quantum-common +Architecture: all +Depends: + adduser, + python-quantum (= ${source:Version}), + ${misc:Depends}, + ${python:Depends} +Breaks: quantum-server ( <= 2013.1~g2-0ubuntu1 ) +Replaces: quantum-server ( <= 2013.1~g2-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - common + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the common files. + +Package: quantum-plugin-cisco +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Cisco plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Cisco plugin. + +Package: quantum-plugin-nec +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - NEC plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the NEC plugin. + +Package: quantum-plugin-nec-agent +Architecture: all +Depends: + openvswitch-switch, + quantum-common (= ${source:Version}), + quantum-plugin-nec, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-plugin-nec ( <= 2013.1~g2-0ubuntu1 ) +Replaces: quantum-plugin-nec ( <= 2013.1~g2-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - NEC plugin agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the NEC plugin agent. + +Package: quantum-plugin-bigswitch +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - BigSwitch plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the BigSwitch plugin. + +Package: quantum-plugin-hyperv +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Hyper-V plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Hyper-V plugin. + +Package: quantum-plugin-brocade +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Brocade plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Brocade plugin. + +Package: quantum-plugin-plumgrid +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - PLUMgrid plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the PLUMgrid plugin. + +Package: quantum-plugin-metaplugin +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Metaplugin plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Metaplugin plugin. + +Package: quantum-plugin-nicira +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Nicira plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Nicira NVP plugin + +Package: quantum-l3-agent +Architecture: all +Depends: + quantum-common (= ${source:Version}), + quantum-metadata-agent (= ${source:Version}), + iputils-arping, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: + quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ), + quantum-server ( <= 2013.1~g2-0ubuntu1 ) +Replaces: + quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ), + quantum-server ( <= 2013.1~g2-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - l3 agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the layer 3 routing agent. + +Package: quantum-dhcp-agent +Architecture: all +Depends: + dnsmasq-base, + dnsmasq-utils, + quantum-common (= ${source:Version}), + quantum-metadata-agent (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Replaces: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - DHCP agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the DHCP agent. + +Package: quantum-metadata-agent +Architecture: all +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-l3-agent (<= 2013.1.g3-0ubuntu1) +Replaces: quantum-l3-agent (<= 2013.1.g3-0ubuntu1) +Description: Quantum is a virtual network service for Openstack - metadata agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the metadata proxy agent. + +Package: quantum-lbaas-agent +Architecture: all +Depends: + haproxy, + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Replaces: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - LBaaS agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Load Balancing as-a Service (LBaaS) agent. + +Package: python-quantum +Architecture: all +Section: python +Depends: + python-amqplib, + python-anyjson, + python-configobj, + python-eventlet, + python-gflags, + python-httplib2, + python-iso8601, + python-keystone, + python-kombu, + python-lxml, + python-netaddr, + python-paste, + python-pastedeploy, + python-pyudev, + python-quantumclient (>= 1:0.1.0.1-0ubuntu1), + python-routes, + python-simplejson, + python-sqlalchemy, + python-webob, + ${misc:Depends}, + ${python:Depends} +Provides: ${python:Provides} +XB-Python-Version: ${python:Versions} +Description: Quantum is a virutal network service for Openstack - Python library + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Python library. + +Package: quantum-plugin-openvswitch +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Open vSwitch plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Open vSwitch plugin. + +Package: quantum-plugin-openvswitch-agent +Architecture: all +Depends: + openvswitch-switch, + quantum-common (= ${source:Version}), + quantum-plugin-openvswitch, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Replaces: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - Open vSwitch plugin agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Open vSwitch plugin agent. + +Package: quantum-plugin-linuxbridge +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - linuxbridge plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the linuxbridge plugin. + +Package: quantum-plugin-linuxbridge-agent +Architecture: all +Depends: + bridge-utils, + quantum-common (= ${source:Version}), + quantum-plugin-linuxbridge, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Replaces: quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ) +Description: Quantum is a virtual network service for Openstack - linuxbridge plugin agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the linuxbridge plugin agent. + +Package: quantum-plugin-ryu +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - RYU plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the RYU plugin. + +Package: quantum-plugin-ryu-agent +Architecture: all +Depends: + quantum-common (= ${source:Version}), + quantum-plugin-ryu, + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Breaks: + quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ), + quantum-server ( << 2012.1-0ubuntu3 ) +Replaces: + quantum-common ( <= 2012.2~rc1~20120907.1154-0ubuntu1 ), + quantum-server ( << 2012.1-0ubuntu3 ) +Description: Quantum is a virtual network service for Openstack - RYU plugin agent + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the RYU plugin agent. + +Package: quantum-plugin-midonet +Architecture: all +Provides: quantum-plugin +Depends: + quantum-common (= ${source:Version}), + ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends} +Description: Quantum is a virtual network service for Openstack - Midonet plugin + Quantum is a virtual network service for Openstack, and a part of + Netstack. Just like OpenStack Nova provides an API to dynamically + request and configure virtual servers, Quantum provides an API to + dynamically request and configure virtual networks. These networks + connect "interfaces" from other OpenStack services (e.g., virtual NICs + from Nova VMs). The Quantum API supports extensions to provide + advanced network capabilities (e.g., QoS, ACLs, network monitoring, + etc.) + . + This package provides the Midonet plugin. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..06381fdb8 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,37 @@ +Format: http://dep.debian.net/deps/dep5 +Upstream-Name: quantum +Source: http://github.com/openstack/quantum + +Files: * +Copyright: 2011 OpenStack, LLC. + 2011 Cisco Systems + 2011 Nicira Networks + 2011 Citrix Systems +License: Apache-2 + 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. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0' + +Files: tools/rfc.sh +Copyright: Copyright (c) 2010-2011 Gluster, Inc +License: GPL-v3 + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + . + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/GPL-3' diff --git a/debian/cron.d/quantum-dhcp-agent-netns-cleanup b/debian/cron.d/quantum-dhcp-agent-netns-cleanup new file mode 100644 index 000000000..e2c72bb3d --- /dev/null +++ b/debian/cron.d/quantum-dhcp-agent-netns-cleanup @@ -0,0 +1,4 @@ +# vim: set filetype=crontab: +# Periodically cleans Quantum's network namespaces on behalf of the Quantum +# DHCP agent. +30 * * * * quantum if [ -x /usr/bin/quantum-netns-cleanup ] ; then /usr/bin/quantum-netns-cleanup --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/dhcp_agent.ini >/dev/null 2>&1; fi diff --git a/debian/cron.d/quantum-l3-agent-netns-cleanup b/debian/cron.d/quantum-l3-agent-netns-cleanup new file mode 100644 index 000000000..edb18b611 --- /dev/null +++ b/debian/cron.d/quantum-l3-agent-netns-cleanup @@ -0,0 +1,4 @@ +# vim: set filetype=crontab: +# Periodically cleans Quantum's network namespaces on behalf of the Quantum +# L3 agent. +0 * * * * quantum if [ -x /usr/bin/quantum-netns-cleanup ] ; then /usr/bin/quantum-netns-cleanup --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/l3_agent.ini >/dev/null 2>&1; fi diff --git a/debian/cron.d/quantum-lbaas-agent-netns-cleanup b/debian/cron.d/quantum-lbaas-agent-netns-cleanup new file mode 100644 index 000000000..799729cfc --- /dev/null +++ b/debian/cron.d/quantum-lbaas-agent-netns-cleanup @@ -0,0 +1,4 @@ +# vim: set filetype=crontab: +# Periodically cleans Quantum's network namespaces on behalf of the Quantum +# L3 agent. +0 * * * * quantum if [ -x /usr/bin/quantum-netns-cleanup ] ; then /usr/bin/quantum-netns-cleanup --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/lbaas_agent.ini >/dev/null 2>&1; fi diff --git a/debian/mans/quantum-linuxbridge-agent.8 b/debian/mans/quantum-linuxbridge-agent.8 new file mode 100644 index 000000000..87e39d1e0 --- /dev/null +++ b/debian/mans/quantum-linuxbridge-agent.8 @@ -0,0 +1,11 @@ +.TH quantum\-linuxbridge\-agent 8 +.SH NAME +quantum\-linuxbridge\-agent \- OpenStack Virtual network service \- linuxbridge agent + +.SH SYNOPSIS +.B quantum\-linuxbridge\-agent + +.SH DESCRIPTION +.B quantum\-linuxbridge\-agent + +This man page is a stub. Please contribute. diff --git a/debian/mans/quantum-nec-agent.8 b/debian/mans/quantum-nec-agent.8 new file mode 100644 index 000000000..c0889c78a --- /dev/null +++ b/debian/mans/quantum-nec-agent.8 @@ -0,0 +1,11 @@ +.TH quantum\-nec\-agent 8 +.SH NAME +quantum\-nec\-agent \- OpenStack Virtual network service \- nec agent + +.SH SYNOPSIS +.B quantum\-nec\-agent + +.SH DESCRIPTION +.B quantum\-nec\-agent + +This man page is a stub. Please contribute. diff --git a/debian/mans/quantum-openvswitch-agent.8 b/debian/mans/quantum-openvswitch-agent.8 new file mode 100644 index 000000000..c4db9fedd --- /dev/null +++ b/debian/mans/quantum-openvswitch-agent.8 @@ -0,0 +1,11 @@ +.TH quantum\-openvswitch\-agent 8 +.SH NAME +quantum\-openvswitch\-agent \- OpenStack Virtual network service \- openvswitch agent + +.SH SYNOPSIS +.B quantum\-openvswitch\-agent + +.SH DESCRIPTION +.B quantum\-openvswitch\-agent + +This man page is a stub. Please contribute. diff --git a/debian/mans/quantum-rootwrap.8 b/debian/mans/quantum-rootwrap.8 new file mode 100644 index 000000000..0f5f19926 --- /dev/null +++ b/debian/mans/quantum-rootwrap.8 @@ -0,0 +1,11 @@ +.TH quantum-rootwrap 8 +.SH NAME +quantum-rootwrap \- OpenStack Virtual network service \- sudo helper + +.SH SYNOPSIS +.B quantum-rootwrap + +.SH DESCRIPTION +.B quantum-rootwrap + +This man page is a stub. Please contribute. diff --git a/debian/mans/quantum-ryu-agent.8 b/debian/mans/quantum-ryu-agent.8 new file mode 100644 index 000000000..06e12572d --- /dev/null +++ b/debian/mans/quantum-ryu-agent.8 @@ -0,0 +1,11 @@ +.TH quantum\-ryu\-agent 8 +.SH NAME +quantum\-ryu\-agent \- OpenStack Virtual network service \- ryu agent + +.SH SYNOPSIS +.B quantum\-ryu\-agent + +.SH DESCRIPTION +.B quantum\-ryu\-agent + +This man page is a stub. Please contribute. diff --git a/debian/mans/quantum-server.8 b/debian/mans/quantum-server.8 new file mode 100644 index 000000000..37ec4b68b --- /dev/null +++ b/debian/mans/quantum-server.8 @@ -0,0 +1,11 @@ +.TH quantum-server 8 +.SH NAME +quantum-server \- OpenStack Virtual network service \- server + +.SH SYNOPSIS +.B quantum-server + +.SH DESCRIPTION +.B quantum-server + +This man page is a stub. Please contribute. diff --git a/debian/patches/fix-quantum-configuration.patch b/debian/patches/fix-quantum-configuration.patch new file mode 100644 index 000000000..bdfc073f6 --- /dev/null +++ b/debian/patches/fix-quantum-configuration.patch @@ -0,0 +1,133 @@ +--- a/etc/quantum/plugins/bigswitch/restproxy.ini ++++ b/etc/quantum/plugins/bigswitch/restproxy.ini +@@ -6,7 +6,7 @@ + # sql_connection = mysql://root:pass@127.0.0.1:3306/restproxy_quantum + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/bigswitch.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +--- a/etc/quantum/plugins/brocade/brocade.ini ++++ b/etc/quantum/plugins/brocade/brocade.ini +@@ -11,7 +11,7 @@ + # ostype = NOS + + [DATABASE] +-# sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/brocade.sqlite + # Enable the use of eventlet's db_pool for MySQL. The flags sql_min_pool_size, + # sql_max_pool_size and sql_idle_timeout are relevant only if this is enabled. + # sql_dbpool_enable = False +--- a/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini ++++ b/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini +@@ -26,7 +26,7 @@ + # sql_connection = mysql://root:nova@127.0.0.1:3306/quantum_linux_bridge + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/linuxbridge.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +--- a/etc/quantum/plugins/nec/nec.ini ++++ b/etc/quantum/plugins/nec/nec.ini +@@ -6,7 +6,7 @@ + # sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/nec.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +@@ -37,7 +37,7 @@ polling_interval = 2 + # Use "sudo quantum-rootwrap /etc/quantum/rootwrap.conf" to use the real + # root filter facility. + # Change to "sudo" to skip the filtering and just run the comand directly +-root_helper = sudo ++root_helper = sudo /usr/bin/quantum-rootwrap /etc/quantum/rootwrap.conf + + [SECURITYGROUP] + # Firewall driver for realizing quantum security group function +--- a/etc/quantum/plugins/nicira/nvp.ini ++++ b/etc/quantum/plugins/nicira/nvp.ini +@@ -4,7 +4,7 @@ + # sql_connection = mysql://root:quantum@127.0.0.1:3306/nvp_quantum + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/nvp.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +--- a/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini ++++ b/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini +@@ -4,7 +4,7 @@ + # sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/ovs.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +--- a/etc/quantum/plugins/plumgrid/plumgrid.ini ++++ b/etc/quantum/plugins/plumgrid/plumgrid.ini +@@ -6,7 +6,7 @@ + # sql_connection = mysql://:@:3306/plumgrid_quantum + # Replace above with the IP address of the database used by the + # main quantum server. +-# sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/plumgrid.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 +--- a/etc/quantum/plugins/ryu/ryu.ini ++++ b/etc/quantum/plugins/ryu/ryu.ini +@@ -2,7 +2,7 @@ + # This line MUST be changed to actually run the plugin. + # Example: sql_connection = mysql://root:nova@127.0.0.1:3306/ryu_quantum + #sql_connection = mysql://:@:/ +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/ryu.sqlite + # Enable the use of eventlet's db_pool for MySQL. The flags sql_min_pool_size, + # sql_max_pool_size and sql_idle_timeout are relevant only if this is enabled. + # sql_dbpool_enable = False +--- a/etc/quantum.conf ++++ b/etc/quantum.conf +@@ -43,12 +43,13 @@ bind_port = 9696 + + # Quantum plugin provider module + # core_plugin = ++core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2 + + # Advanced service modules + # service_plugins = + + # Paste configuration file +-api_paste_config = api-paste.ini ++api_paste_config = /etc/quantum/api-paste.ini + + # The strategy to be used for auth. + # Supported values are 'keystone'(default), 'noauth'. +@@ -251,6 +252,7 @@ notification_topics = notifications + # root filter facility. + # Change to "sudo" to skip the filtering and just run the comand directly + # root_helper = sudo ++root_helper = sudo quantum-rootwrap /etc/quantum/rootwrap.conf + + # =========== items for agent management extension ============= + # seconds between nodes reporting state to server, should be less than +--- a/etc/quantum/plugins/midonet/midonet.ini ++++ b/etc/quantum/plugins/midonet/midonet.ini +@@ -4,7 +4,7 @@ + # sql_connection = mysql://root:pass@127.0.0.1:3306/midonet_quantum + # Replace 127.0.0.1 above with the IP address of the database used by the + # main quantum server. (Leave it as is if the database runs on this host.) +-sql_connection = sqlite:// ++sql_connection = sqlite:////var/lib/quantum/midonet.sqlite + # Database reconnection retry times - in event connectivity is lost + # set to -1 implies an infinite retry count + # sql_max_retries = 10 diff --git a/debian/patches/fix-ubuntu-tests.patch b/debian/patches/fix-ubuntu-tests.patch new file mode 100644 index 000000000..7b25a103e --- /dev/null +++ b/debian/patches/fix-ubuntu-tests.patch @@ -0,0 +1,54 @@ +--- a/quantum/tests/unit/midonet/test_midonet_plugin.py ++++ b/quantum/tests/unit/midonet/test_midonet_plugin.py +@@ -470,6 +470,7 @@ class TestMidonetSubnetsV2(test_plugin.T + self).test_create_subnet_with_one_host_route() + + def test_create_subnet_with_two_host_routes(self): ++ self.skipTest("Disabled by Ubuntu packaging") + _bridge, _subnet = self._setup_subnet_mocks() + super(TestMidonetSubnetsV2, + self).test_create_subnet_with_two_host_routes() +--- a/quantum/tests/unit/test_db_plugin.py ++++ b/quantum/tests/unit/test_db_plugin.py +@@ -1394,6 +1394,7 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_ + self._delete('ports', port4['port']['id']) + + def test_range_allocation(self): ++ self.skipTest("Disabled by Ubuntu packaging") + with self.subnet(gateway_ip='10.0.0.3', + cidr='10.0.0.0/29') as subnet: + kwargs = {"fixed_ips": +@@ -2293,6 +2294,7 @@ class TestNetworksV2(QuantumDbPluginV2Te + class TestSubnetsV2(QuantumDbPluginV2TestCase): + + def _test_create_subnet(self, network=None, expected=None, **kwargs): ++ self.skipTest('Disabled by ubuntu packaging') + keys = kwargs.copy() + keys.setdefault('cidr', '10.0.0.0/24') + keys.setdefault('ip_version', 4) +@@ -3280,6 +3282,7 @@ class TestSubnetsV2(QuantumDbPluginV2Tes + host_routes=host_routes) + + def test_create_subnet_with_two_host_routes(self): ++ self.skipTest("Disabled by Ubuntu Packaging") + gateway_ip = '10.0.0.1' + cidr = '10.0.0.0/24' + allocation_pools = [{'start': '10.0.0.2', +@@ -3384,6 +3387,7 @@ class TestSubnetsV2(QuantumDbPluginV2Tes + self.assertEqual(res.status_int, 400) + + def test_delete_subnet_with_dns(self): ++ self.skipTest("Disabled by Ubuntu packaging") + gateway_ip = '10.0.0.1' + cidr = '10.0.0.0/24' + dns_nameservers = ['1.2.3.4'] +--- a/quantum/tests/unit/linuxbridge/test_lb_quantum_agent.py ++++ b/quantum/tests/unit/linuxbridge/test_lb_quantum_agent.py +@@ -29,6 +29,7 @@ class TestLinuxBridge(base.BaseTestCase) + + def setUp(self): + super(TestLinuxBridge, self).setUp() ++ self.skipTest('No udev access on Ubuntu buildd.') + self.addCleanup(cfg.CONF.reset) + interface_mappings = {'physnet1': 'eth1'} + root_helper = cfg.CONF.AGENT.root_helper diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..c1bf38222 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +fix-quantum-configuration.patch +fix-ubuntu-tests.patch diff --git a/debian/pydist-overrides b/debian/pydist-overrides new file mode 100755 index 000000000..7b448d324 --- /dev/null +++ b/debian/pydist-overrides @@ -0,0 +1,3 @@ +quantum_server quantum-server +quantum_common quantum-common +setuptools-git diff --git a/debian/python-quantum.install b/debian/python-quantum.install new file mode 100644 index 000000000..036c6b9db --- /dev/null +++ b/debian/python-quantum.install @@ -0,0 +1 @@ +usr/lib/python*/dist-packages/* diff --git a/debian/quantum-common.dirs b/debian/quantum-common.dirs new file mode 100644 index 000000000..9931de7c7 --- /dev/null +++ b/debian/quantum-common.dirs @@ -0,0 +1,5 @@ +var/log/quantum +var/lib/quantum +etc/quantum +etc/quantum/rootwrap.d +etc/quantum/plugins diff --git a/debian/quantum-common.install b/debian/quantum-common.install new file mode 100644 index 000000000..1c8c6a8ca --- /dev/null +++ b/debian/quantum-common.install @@ -0,0 +1,13 @@ +bin/quantum-db-manage usr/bin +bin/quantum-debug usr/bin +bin/quantum-netns-cleanup usr/bin +bin/quantum-ovs-cleanup usr/bin +bin/quantum-rootwrap usr/bin +bin/quantum-usage-audit usr/bin +debian/quantum_sudoers etc/sudoers.d +etc/api-paste.ini etc/quantum +etc/policy.json etc/quantum +etc/quantum.conf etc/quantum +etc/quantum/rootwrap.d/debug.filters etc/quantum/rootwrap.d +etc/quantum/rootwrap.d/iptables-firewall.filters etc/quantum/rootwrap.d +etc/rootwrap.conf etc/quantum diff --git a/debian/quantum-common.postinst b/debian/quantum-common.postinst new file mode 100644 index 000000000..0366e00c5 --- /dev/null +++ b/debian/quantum-common.postinst @@ -0,0 +1,31 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] +then + if ! getent group quantum > /dev/null 2>&1 + then + addgroup --system quantum >/dev/null + fi + if ! getent passwd quantum > /dev/null 2>&1 + then + adduser --system --home /var/lib/quantum --ingroup quantum --no-create-home --shell /bin/false quantum + fi + chown -R quantum:quantum /var/lib/quantum/ + + chown -R quantum:adm /var/log/quantum/ + chmod 0750 /var/log/quantum/ + + chown -R root:quantum /etc/quantum/ + chmod 0750 /etc/quantum/ + chown root:root /etc/quantum/rootwrap.conf + chown -R root:root /etc/quantum/rootwrap.d + chmod 0755 /etc/quantum/rootwrap.d + + if [ -f /etc/sudoers.d/quantum_sudoers ] ; then + chmod 0440 /etc/sudoers.d/quantum_sudoers + fi +fi + +#DEBHELPER# diff --git a/debian/quantum-dhcp-agent.install b/debian/quantum-dhcp-agent.install new file mode 100644 index 000000000..75cb521a9 --- /dev/null +++ b/debian/quantum-dhcp-agent.install @@ -0,0 +1,5 @@ +bin/quantum-dhcp-agent usr/bin +bin/quantum-dhcp-agent-dnsmasq-lease-update usr/bin +debian/cron.d/quantum-dhcp-agent-netns-cleanup etc/cron.d +etc/dhcp_agent.ini etc/quantum +etc/quantum/rootwrap.d/dhcp.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-dhcp-agent.logrotate b/debian/quantum-dhcp-agent.logrotate new file mode 100755 index 000000000..c0287574c --- /dev/null +++ b/debian/quantum-dhcp-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/dhcp-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-dhcp-agent.upstart b/debian/quantum-dhcp-agent.upstart new file mode 100644 index 000000000..0aec6cbc8 --- /dev/null +++ b/debian/quantum-dhcp-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum l3 agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-dhcp-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/dhcp_agent.ini --log-file=/var/log/quantum/dhcp-agent.log diff --git a/debian/quantum-l3-agent.install b/debian/quantum-l3-agent.install new file mode 100644 index 000000000..7457c2af2 --- /dev/null +++ b/debian/quantum-l3-agent.install @@ -0,0 +1,4 @@ +bin/quantum-l3-agent usr/bin +debian/cron.d/quantum-l3-agent-netns-cleanup etc/cron.d +etc/l3_agent.ini etc/quantum +etc/quantum/rootwrap.d/l3.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-l3-agent.logrotate b/debian/quantum-l3-agent.logrotate new file mode 100755 index 000000000..9b9a88beb --- /dev/null +++ b/debian/quantum-l3-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/l3-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-l3-agent.upstart b/debian/quantum-l3-agent.upstart new file mode 100644 index 000000000..514afa6ac --- /dev/null +++ b/debian/quantum-l3-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum l3 plugin agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-l3-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/l3_agent.ini --log-file=/var/log/quantum/l3-agent.log diff --git a/debian/quantum-lbaas-agent.install b/debian/quantum-lbaas-agent.install new file mode 100644 index 000000000..174cdb31b --- /dev/null +++ b/debian/quantum-lbaas-agent.install @@ -0,0 +1,4 @@ +bin/quantum-lbaas-agent usr/bin +debian/cron.d/quantum-lbaas-agent-netns-cleanup etc/cron.d +etc/lbaas_agent.ini etc/quantum +etc/quantum/rootwrap.d/lbaas-haproxy.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-lbaas-agent.logrotate b/debian/quantum-lbaas-agent.logrotate new file mode 100755 index 000000000..9f11f47d7 --- /dev/null +++ b/debian/quantum-lbaas-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/lbaas-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-lbaas-agent.upstart b/debian/quantum-lbaas-agent.upstart new file mode 100644 index 000000000..1bd7a2ba2 --- /dev/null +++ b/debian/quantum-lbaas-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum LBaaS agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-lbaas-agent -- --config-file=/etc/quantum/lbaas_agent.ini --config-file=/etc/quantum/quantum.conf --log-file=/var/log/quantum/lbaas-agent.log diff --git a/debian/quantum-metadata-agent.install b/debian/quantum-metadata-agent.install new file mode 100644 index 000000000..c7aa3c116 --- /dev/null +++ b/debian/quantum-metadata-agent.install @@ -0,0 +1,3 @@ +bin/quantum-metadata-agent usr/bin +bin/quantum-ns-metadata-proxy usr/bin +etc/metadata_agent.ini etc/quantum diff --git a/debian/quantum-metadata-agent.logrotate b/debian/quantum-metadata-agent.logrotate new file mode 100755 index 000000000..601b3cb74 --- /dev/null +++ b/debian/quantum-metadata-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/metadata-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-metadata-agent.upstart b/debian/quantum-metadata-agent.upstart new file mode 100644 index 000000000..67d904d70 --- /dev/null +++ b/debian/quantum-metadata-agent.upstart @@ -0,0 +1,16 @@ +description "Quantum metadata plugin agent" +author "Yolanda Robla " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-metadata-agent -- \ + --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/metadata_agent.ini \ + --log-file=/var/log/quantum/metadata-agent.log diff --git a/debian/quantum-plugin-bigswitch.install b/debian/quantum-plugin-bigswitch.install new file mode 100644 index 000000000..1a34e652f --- /dev/null +++ b/debian/quantum-plugin-bigswitch.install @@ -0,0 +1 @@ +etc/quantum/plugins/bigswitch/* etc/quantum/plugins/bigswitch diff --git a/debian/quantum-plugin-brocade.install b/debian/quantum-plugin-brocade.install new file mode 100644 index 000000000..913eb4c84 --- /dev/null +++ b/debian/quantum-plugin-brocade.install @@ -0,0 +1 @@ +etc/quantum/plugins/brocade/* etc/quantum/plugins/brocade diff --git a/debian/quantum-plugin-cisco.install b/debian/quantum-plugin-cisco.install new file mode 100644 index 000000000..c63d24c79 --- /dev/null +++ b/debian/quantum-plugin-cisco.install @@ -0,0 +1 @@ +etc/quantum/plugins/cisco/* etc/quantum/plugins/cisco diff --git a/debian/quantum-plugin-hyperv.install b/debian/quantum-plugin-hyperv.install new file mode 100644 index 000000000..de4fa9ffb --- /dev/null +++ b/debian/quantum-plugin-hyperv.install @@ -0,0 +1 @@ +etc/quantum/plugins/hyperv/* etc/quantum/plugins/hyperv diff --git a/debian/quantum-plugin-linuxbridge-agent.install b/debian/quantum-plugin-linuxbridge-agent.install new file mode 100644 index 000000000..9624d77c8 --- /dev/null +++ b/debian/quantum-plugin-linuxbridge-agent.install @@ -0,0 +1,2 @@ +bin/quantum-linuxbridge-agent usr/bin +etc/quantum/rootwrap.d/linuxbridge-plugin.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-plugin-linuxbridge-agent.logrotate b/debian/quantum-plugin-linuxbridge-agent.logrotate new file mode 100755 index 000000000..2f3de9c67 --- /dev/null +++ b/debian/quantum-plugin-linuxbridge-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/linuxbridge-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-plugin-linuxbridge-agent.manpages b/debian/quantum-plugin-linuxbridge-agent.manpages new file mode 100644 index 000000000..5b29bb93e --- /dev/null +++ b/debian/quantum-plugin-linuxbridge-agent.manpages @@ -0,0 +1 @@ +debian/mans/quantum-linuxbridge-agent.8 diff --git a/debian/quantum-plugin-linuxbridge-agent.upstart b/debian/quantum-plugin-linuxbridge-agent.upstart new file mode 100644 index 000000000..12ef8c0f9 --- /dev/null +++ b/debian/quantum-plugin-linuxbridge-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum server" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-linuxbridge-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini --log-file=/var/log/quantum/linuxbridge-agent.log diff --git a/debian/quantum-plugin-linuxbridge.install b/debian/quantum-plugin-linuxbridge.install new file mode 100644 index 000000000..0a19c8d23 --- /dev/null +++ b/debian/quantum-plugin-linuxbridge.install @@ -0,0 +1 @@ +etc/quantum/plugins/linuxbridge/* etc/quantum/plugins/linuxbridge diff --git a/debian/quantum-plugin-metaplugin.install b/debian/quantum-plugin-metaplugin.install new file mode 100644 index 000000000..aeadbe57a --- /dev/null +++ b/debian/quantum-plugin-metaplugin.install @@ -0,0 +1 @@ +etc/quantum/plugins/metaplugin/* etc/quantum/plugins/metaplugin diff --git a/debian/quantum-plugin-midonet.install b/debian/quantum-plugin-midonet.install new file mode 100644 index 000000000..625fec1a2 --- /dev/null +++ b/debian/quantum-plugin-midonet.install @@ -0,0 +1 @@ +etc/quantum/plugins/midonet/* etc/quantum/plugins/midonet diff --git a/debian/quantum-plugin-nec-agent.install b/debian/quantum-plugin-nec-agent.install new file mode 100644 index 000000000..affc0f2bb --- /dev/null +++ b/debian/quantum-plugin-nec-agent.install @@ -0,0 +1,2 @@ +bin/quantum-nec-agent usr/bin +etc/quantum/rootwrap.d/nec-plugin.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-plugin-nec-agent.logrotate b/debian/quantum-plugin-nec-agent.logrotate new file mode 100755 index 000000000..400429073 --- /dev/null +++ b/debian/quantum-plugin-nec-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/nec-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-plugin-nec-agent.manpages b/debian/quantum-plugin-nec-agent.manpages new file mode 100644 index 000000000..20852be64 --- /dev/null +++ b/debian/quantum-plugin-nec-agent.manpages @@ -0,0 +1 @@ +debian/mans/quantum-nec-agent.8 diff --git a/debian/quantum-plugin-nec-agent.upstart b/debian/quantum-plugin-nec-agent.upstart new file mode 100644 index 000000000..6793a7436 --- /dev/null +++ b/debian/quantum-plugin-nec-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum plugin NEC agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [!2345] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-nec-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/plugins/nec/nec.ini --log-file=/var/log/quantum/nec-agent.log diff --git a/debian/quantum-plugin-nec.install b/debian/quantum-plugin-nec.install new file mode 100644 index 000000000..90aad0d81 --- /dev/null +++ b/debian/quantum-plugin-nec.install @@ -0,0 +1 @@ +etc/quantum/plugins/nec/* etc/quantum/plugins/nec diff --git a/debian/quantum-plugin-nicira.install b/debian/quantum-plugin-nicira.install new file mode 100644 index 000000000..fa6aa2345 --- /dev/null +++ b/debian/quantum-plugin-nicira.install @@ -0,0 +1,2 @@ +etc/quantum/plugins/nicira/* etc/quantum/plugins/nicira +bin/quantum-check-nvp-config usr/bin diff --git a/debian/quantum-plugin-openvswitch-agent.install b/debian/quantum-plugin-openvswitch-agent.install new file mode 100644 index 000000000..a5139367f --- /dev/null +++ b/debian/quantum-plugin-openvswitch-agent.install @@ -0,0 +1,2 @@ +bin/quantum-openvswitch-agent usr/bin +etc/quantum/rootwrap.d/openvswitch-plugin.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-plugin-openvswitch-agent.logrotate b/debian/quantum-plugin-openvswitch-agent.logrotate new file mode 100755 index 000000000..212776c06 --- /dev/null +++ b/debian/quantum-plugin-openvswitch-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/openvswitch-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-plugin-openvswitch-agent.manpages b/debian/quantum-plugin-openvswitch-agent.manpages new file mode 100644 index 000000000..ea1e54bc6 --- /dev/null +++ b/debian/quantum-plugin-openvswitch-agent.manpages @@ -0,0 +1 @@ +debian/mans/quantum-openvswitch-agent.8 diff --git a/debian/quantum-plugin-openvswitch-agent.upstart b/debian/quantum-plugin-openvswitch-agent.upstart new file mode 100644 index 000000000..106d17873 --- /dev/null +++ b/debian/quantum-plugin-openvswitch-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum openvswitch plugin agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-openvswitch-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini --log-file=/var/log/quantum/openvswitch-agent.log diff --git a/debian/quantum-plugin-openvswitch.install b/debian/quantum-plugin-openvswitch.install new file mode 100644 index 000000000..e8c1d8edc --- /dev/null +++ b/debian/quantum-plugin-openvswitch.install @@ -0,0 +1 @@ +etc/quantum/plugins/openvswitch/* etc/quantum/plugins/openvswitch diff --git a/debian/quantum-plugin-plumgrid.install b/debian/quantum-plugin-plumgrid.install new file mode 100644 index 000000000..2647e8ee1 --- /dev/null +++ b/debian/quantum-plugin-plumgrid.install @@ -0,0 +1 @@ +etc/quantum/plugins/plumgrid/* etc/quantum/plugins/plumgrid diff --git a/debian/quantum-plugin-ryu-agent.install b/debian/quantum-plugin-ryu-agent.install new file mode 100644 index 000000000..a8698ecb2 --- /dev/null +++ b/debian/quantum-plugin-ryu-agent.install @@ -0,0 +1,2 @@ +bin/quantum-ryu-agent usr/bin +etc/quantum/rootwrap.d/ryu-plugin.filters etc/quantum/rootwrap.d diff --git a/debian/quantum-plugin-ryu-agent.logrotate b/debian/quantum-plugin-ryu-agent.logrotate new file mode 100755 index 000000000..a687587a1 --- /dev/null +++ b/debian/quantum-plugin-ryu-agent.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/ryu-agent.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-plugin-ryu-agent.manpages b/debian/quantum-plugin-ryu-agent.manpages new file mode 100644 index 000000000..0db5f3248 --- /dev/null +++ b/debian/quantum-plugin-ryu-agent.manpages @@ -0,0 +1 @@ +debian/mans/quantum-ryu-agent.8 diff --git a/debian/quantum-plugin-ryu-agent.upstart b/debian/quantum-plugin-ryu-agent.upstart new file mode 100644 index 000000000..5185feecd --- /dev/null +++ b/debian/quantum-plugin-ryu-agent.upstart @@ -0,0 +1,14 @@ +description "Quantum plugin ryu agent" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-ryu-agent -- --config-file=/etc/quantum/quantum.conf --config-file=/etc/quantum/plugins/ryu/ryu.ini --log-file=/var/log/quantum/ryu-agent.log diff --git a/debian/quantum-plugin-ryu.install b/debian/quantum-plugin-ryu.install new file mode 100644 index 000000000..ff574af39 --- /dev/null +++ b/debian/quantum-plugin-ryu.install @@ -0,0 +1 @@ +etc/quantum/plugins/ryu/* etc/quantum/plugins/ryu diff --git a/debian/quantum-server.default b/debian/quantum-server.default new file mode 100644 index 000000000..e2f168e01 --- /dev/null +++ b/debian/quantum-server.default @@ -0,0 +1,5 @@ +# defaults for quantum-server + +# path to config file corresponding to the core_plugin specified in +# quantum.conf +QUANTUM_PLUGIN_CONFIG="/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini" diff --git a/debian/quantum-server.install b/debian/quantum-server.install new file mode 100644 index 000000000..d9ddf1ca2 --- /dev/null +++ b/debian/quantum-server.install @@ -0,0 +1 @@ +bin/quantum-server usr/bin diff --git a/debian/quantum-server.logrotate b/debian/quantum-server.logrotate new file mode 100755 index 000000000..4af0c92f0 --- /dev/null +++ b/debian/quantum-server.logrotate @@ -0,0 +1,7 @@ +/var/log/quantum/server.log { + daily + missingok + compress + delaycompress + notifempty +} diff --git a/debian/quantum-server.manpages b/debian/quantum-server.manpages new file mode 100644 index 000000000..d90b24641 --- /dev/null +++ b/debian/quantum-server.manpages @@ -0,0 +1,2 @@ +debian/mans/quantum-server.8 +debian/mans/quantum-rootwrap.8 diff --git a/debian/quantum-server.upstart b/debian/quantum-server.upstart new file mode 100644 index 000000000..125faf6d7 --- /dev/null +++ b/debian/quantum-server.upstart @@ -0,0 +1,20 @@ +description "Quantum server" +author "Chuck Short " + +start on runlevel [2345] +stop on runlevel [016] + +chdir /var/run + +pre-start script + mkdir -p /var/run/quantum + chown quantum:root /var/run/quantum +end script + +script + [ -r /etc/default/quantum-server ] && . /etc/default/quantum-server + [ -r "$QUANTUM_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $QUANTUM_PLUGIN_CONFIG" + exec start-stop-daemon --start --chuid quantum --exec /usr/bin/quantum-server -- \ + --config-file /etc/quantum/quantum.conf \ + --log-file /var/log/quantum/server.log $CONF_ARG +end script diff --git a/debian/quantum_sudoers b/debian/quantum_sudoers new file mode 100755 index 000000000..d67e576f4 --- /dev/null +++ b/debian/quantum_sudoers @@ -0,0 +1,3 @@ +Defaults:quantum !requiretty + +quantum ALL = (root) NOPASSWD: /usr/bin/quantum-rootwrap diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..9910de92d --- /dev/null +++ b/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with python2 + +override_dh_install: + dh_install --fail-missing -X/usr/etc -X/usr/bin + +get-orig-source: + uscan --verbose --force-download --rename --destdir=../build-area + +override_dh_auto_clean: + dh_clean + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + ./run_tests.sh -N -P +endif diff --git a/debian/source/format b/debian/source/format new file mode 100755 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100755 index 000000000..f110dffd3 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/\.([a-zA-Z])/~$1/;s/%7E/~/" \ + https://launchpad.net/quantum/+download https://launchpad.net/quantum/.*/.*/.*/quantum-(.*)\.tar\.gz diff --git a/rpm/SOURCES/0001-use-parallel-installed-versions-in-RHEL6.patch b/rpm/SOURCES/0001-use-parallel-installed-versions-in-RHEL6.patch new file mode 100644 index 000000000..7e61ab757 --- /dev/null +++ b/rpm/SOURCES/0001-use-parallel-installed-versions-in-RHEL6.patch @@ -0,0 +1,53 @@ +From a62cd977bcf59cfd6b40cfc607364ab698443b85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Fri, 13 Apr 2012 17:24:40 +0100 +Subject: [PATCH] use parallel installed versions in RHEL6 + +of webob sqlalchemy python-routes and paste-deploy + +Change-Id: I290f56eae61c87893639a9e5d29f7fff760452cf +--- + quantum/__init__.py | 30 ++++++++++++++++++++++++++++++ + 1 files changed, 30 insertions(+), 0 deletions(-) + +diff --git a/quantum/__init__.py b/quantum/__init__.py +index 25ce3af..eb5a3fa 100644 +--- a/quantum/__init__.py ++++ b/quantum/__init__.py +@@ -15,6 +15,36 @@ + # License for the specific language governing permissions and limitations + # under the License. + ++import sys ++import pkg_resources ++ ++# If there is a conflicting non egg module, ++# i.e. an older standard system module installed, ++# then replace it with this requirement ++def replace_dist(requirement): ++ try: ++ return pkg_resources.require(requirement) ++ except pkg_resources.VersionConflict: ++ e = sys.exc_info()[1] ++ dist=e.args[0] ++ req=e.args[1] ++ if dist.key == req.key and not dist.location.endswith('.egg'): ++ del pkg_resources.working_set.by_key[dist.key] ++ # We assume there is no need to adjust sys.path ++ # and the associated pkg_resources.working_set.entries ++ return pkg_resources.require(requirement) ++ ++replace_dist("WebOb >= 1.0") ++replace_dist("SQLAlchemy >= 0.6.3") ++replace_dist("Routes >= 1.12.3") ++ ++replace_dist("PasteDeploy >= 1.5.0") ++# This hack is needed because replace_dist() results in ++# the standard paste module path being at the start of __path__. ++# TODO: See can we get pkg_resources to do the right thing directly ++import paste ++paste.__path__.insert(0, paste.__path__.pop(-1)) ++ + import gettext + + diff --git a/rpm/SOURCES/0002-avoid-code-path-causing-qpid-exchange-leaks.patch b/rpm/SOURCES/0002-avoid-code-path-causing-qpid-exchange-leaks.patch new file mode 100644 index 000000000..59c03dff7 --- /dev/null +++ b/rpm/SOURCES/0002-avoid-code-path-causing-qpid-exchange-leaks.patch @@ -0,0 +1,26 @@ +From 1357576ab6f40a6bc9674d64355843cc9408d9cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Wed, 17 Jul 2013 16:27:31 +0100 +Subject: [PATCH] avoid code path causing qpid exchange leaks + +Always assume amqp_rpc_single_reply_queue is True, +so that the problematic code path is ignored. +The issue is discussed at https://pad.lv/1178375 +--- + quantum/openstack/common/rpc/amqp.py | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/quantum/openstack/common/rpc/amqp.py b/quantum/openstack/common/rpc/amqp.py +index dbfc790..c7ce7c7 100644 +--- a/quantum/openstack/common/rpc/amqp.py ++++ b/quantum/openstack/common/rpc/amqp.py +@@ -590,7 +590,8 @@ def multicall(conf, context, topic, msg, timeout, connection_pool): + + # TODO(pekowski): Remove this flag and the code under the if clause + # in Havana. +- if not conf.amqp_rpc_single_reply_queue: ++ # (p-draigbrady): This clause is disabled to avoid qpid exchange leaks ++ if False and not conf.amqp_rpc_single_reply_queue: + conn = ConnectionContext(conf, connection_pool) + wait_msg = MulticallWaiter(conf, conn, timeout) + conn.declare_direct_consumer(msg_id, wait_msg) diff --git a/rpm/SOURCES/0002-dhcp-agent-make-dnsmasq-tags-work-with-RHEL-6.patch b/rpm/SOURCES/0002-dhcp-agent-make-dnsmasq-tags-work-with-RHEL-6.patch new file mode 100644 index 000000000..bfb0bf74d --- /dev/null +++ b/rpm/SOURCES/0002-dhcp-agent-make-dnsmasq-tags-work-with-RHEL-6.patch @@ -0,0 +1,39 @@ +From 0c1e1a1d753bb822d3783778f94878a9ef390dd2 Mon Sep 17 00:00:00 2001 +From: Chris Wright +Date: Mon, 7 Jan 2013 18:21:20 -0800 +Subject: [PATCH] dhcp agent: make dnsmasq tags work with RHEL 6 + +rhbz 887369 + +RHEL 6 has dnsmasq-2.48 which has a different syntax for tags compared +with newer (>= dnsmasq-2.53). This patch updates command line and +options file contents to work with dnsmasq-2.48. + +Change-Id: Ibf9309007fbf62f1f176737f2a5d179eabcf89dc +Signed-off-by: Chris Wright +--- + quantum/agent/linux/dhcp.py | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/quantum/agent/linux/dhcp.py b/quantum/agent/linux/dhcp.py +index 709d7da..20752e3 100644 +--- a/quantum/agent/linux/dhcp.py ++++ b/quantum/agent/linux/dhcp.py +@@ -273,7 +273,7 @@ class Dnsmasq(DhcpLocalProcess): + # TODO (mark): how do we indicate other options + # ra-only, slaac, ra-nameservers, and ra-stateless. + mode = 'static' +- cmd.append('--dhcp-range=set:%s,%s,%s,%ss' % ++ cmd.append('--dhcp-range=%s,%s,%s,%ss' % + (self._TAG_PREFIX % i, + netaddr.IPNetwork(subnet.cidr).network, + mode, +@@ -404,7 +404,7 @@ class Dnsmasq(DhcpLocalProcess): + 'quantum-dhcp-agent-dnsmasq-lease-update') + + def _format_option(self, index, option_name, *args): +- return ','.join(('tag:' + self._TAG_PREFIX % index, ++ return ','.join((self._TAG_PREFIX % index, + 'option:%s' % option_name) + args) + + @classmethod diff --git a/rpm/SOURCES/0003-Create-veth-peer-in-namespace.patch b/rpm/SOURCES/0003-Create-veth-peer-in-namespace.patch new file mode 100644 index 000000000..9c875bbff --- /dev/null +++ b/rpm/SOURCES/0003-Create-veth-peer-in-namespace.patch @@ -0,0 +1,174 @@ +From edd624ef23d7e6e410aaaf356765c2568e46247d Mon Sep 17 00:00:00 2001 +From: Maru Newby +Date: Tue, 2 Apr 2013 22:43:37 +0000 +Subject: [PATCH] Create veth peer in namespace. + + * Update veth pair creation to set the namespace of the peer + device on creation rather than subsequently adding it to the + namespace. + * This change supports kernels with limited namespace support + (e.g. RHEL 6.5) so long as ovs_use_veth is set to True. + * Addresses bug 1171727 + +Change-Id: I1885acc9934e7627bb9872703df7f5edf2980722 +--- + quantum/agent/linux/interface.py | 19 +++++++++++-------- + quantum/agent/linux/ip_lib.py | 15 +++++++++++---- + quantum/tests/unit/test_linux_interface.py | 22 ++++++---------------- + quantum/tests/unit/test_linux_ip_lib.py | 11 +++++++++++ + 4 files changed, 39 insertions(+), 28 deletions(-) + +diff --git a/quantum/agent/linux/interface.py b/quantum/agent/linux/interface.py +index e057b24..c0305a2 100644 +--- a/quantum/agent/linux/interface.py ++++ b/quantum/agent/linux/interface.py +@@ -167,13 +167,17 @@ class OVSInterfaceDriver(LinuxInterfaceDriver): + tap_name = self._get_tap_name(device_name, prefix) + + if self.conf.ovs_use_veth: +- root_dev, ns_dev = ip.add_veth(tap_name, device_name) ++ # Create ns_dev in a namespace if one is configured. ++ root_dev, ns_dev = ip.add_veth(tap_name, ++ device_name, ++ namespace2=namespace) ++ else: ++ ns_dev = ip.device(device_name) + + internal = not self.conf.ovs_use_veth + self._ovs_add_port(bridge, tap_name, port_id, mac_address, + internal=internal) + +- ns_dev = ip.device(device_name) + ns_dev.link.set_address(mac_address) + + if self.conf.network_device_mtu: +@@ -181,7 +185,8 @@ class OVSInterfaceDriver(LinuxInterfaceDriver): + if self.conf.ovs_use_veth: + root_dev.link.set_mtu(self.conf.network_device_mtu) + +- if namespace: ++ # Add an interface created by ovs to the namespace. ++ if not self.conf.ovs_use_veth and namespace: + namespace_obj = ip.ensure_namespace(namespace) + namespace_obj.add_device_to_namespace(ns_dev) + +@@ -231,17 +236,15 @@ class BridgeInterfaceDriver(LinuxInterfaceDriver): + tap_name = device_name.replace(prefix, 'tap') + else: + tap_name = device_name.replace(self.DEV_NAME_PREFIX, 'tap') +- root_veth, ns_veth = ip.add_veth(tap_name, device_name) ++ # Create ns_veth in a namespace if one is configured. ++ root_veth, ns_veth = ip.add_veth(tap_name, device_name, ++ namespace2=namespace) + ns_veth.link.set_address(mac_address) + + if self.conf.network_device_mtu: + root_veth.link.set_mtu(self.conf.network_device_mtu) + ns_veth.link.set_mtu(self.conf.network_device_mtu) + +- if namespace: +- namespace_obj = ip.ensure_namespace(namespace) +- namespace_obj.add_device_to_namespace(ns_veth) +- + root_veth.link.set_up() + ns_veth.link.set_up() + +diff --git a/quantum/agent/linux/ip_lib.py b/quantum/agent/linux/ip_lib.py +index 5207c23..2f56672 100644 +--- a/quantum/agent/linux/ip_lib.py ++++ b/quantum/agent/linux/ip_lib.py +@@ -90,12 +90,19 @@ class IPWrapper(SubProcessBase): + self._as_root('', 'tuntap', ('add', name, 'mode', mode)) + return IPDevice(name, self.root_helper, self.namespace) + +- def add_veth(self, name1, name2): +- self._as_root('', 'link', +- ('add', name1, 'type', 'veth', 'peer', 'name', name2)) ++ def add_veth(self, name1, name2, namespace2=None): ++ args = ['add', name1, 'type', 'veth', 'peer', 'name', name2] ++ ++ if namespace2 is None: ++ namespace2 = self.namespace ++ else: ++ self.ensure_namespace(namespace2) ++ args += ['netns', namespace2] ++ ++ self._as_root('', 'link', tuple(args)) + + return (IPDevice(name1, self.root_helper, self.namespace), +- IPDevice(name2, self.root_helper, self.namespace)) ++ IPDevice(name2, self.root_helper, namespace2)) + + def ensure_namespace(self, name): + if not self.netns.exists(name): +diff --git a/quantum/tests/unit/test_linux_interface.py b/quantum/tests/unit/test_linux_interface.py +index a386f93..dc1e464 100644 +--- a/quantum/tests/unit/test_linux_interface.py ++++ b/quantum/tests/unit/test_linux_interface.py +@@ -199,12 +199,11 @@ class TestOVSInterfaceDriverWithVeth(TestOVSInterfaceDriver): + self.device_exists.side_effect = device_exists + + root_dev = mock.Mock() +- _ns_dev = mock.Mock() + ns_dev = mock.Mock() +- self.ip().add_veth = mock.Mock(return_value=(root_dev, _ns_dev)) +- self.ip().device = mock.Mock(return_value=(ns_dev)) +- expected = [mock.call('sudo'), mock.call().add_veth('tap0', devname), +- mock.call().device(devname)] ++ self.ip().add_veth = mock.Mock(return_value=(root_dev, ns_dev)) ++ expected = [mock.call('sudo'), ++ mock.call().add_veth('tap0', devname, ++ namespace2=namespace)] + + vsctl_cmd = ['ovs-vsctl', '--', '--may-exist', 'add-port', + bridge, 'tap0', '--', 'set', 'Interface', 'tap0', +@@ -228,11 +227,6 @@ class TestOVSInterfaceDriverWithVeth(TestOVSInterfaceDriver): + if mtu: + ns_dev.assert_has_calls([mock.call.link.set_mtu(mtu)]) + root_dev.assert_has_calls([mock.call.link.set_mtu(mtu)]) +- if namespace: +- expected.extend( +- [mock.call().ensure_namespace(namespace), +- mock.call().ensure_namespace().add_device_to_namespace( +- mock.ANY)]) + + self.ip.assert_has_calls(expected) + root_dev.assert_has_calls([mock.call.link.set_up()]) +@@ -284,13 +278,9 @@ class TestBridgeInterfaceDriver(TestBase): + mac_address, + namespace=namespace) + +- ip_calls = [mock.call('sudo'), mock.call().add_veth('tap0', 'ns-0')] ++ ip_calls = [mock.call('sudo'), ++ mock.call().add_veth('tap0', 'ns-0', namespace2=namespace)] + ns_veth.assert_has_calls([mock.call.link.set_address(mac_address)]) +- if namespace: +- ip_calls.extend([ +- mock.call().ensure_namespace('01234567-1234-1234-99'), +- mock.call().ensure_namespace().add_device_to_namespace( +- ns_veth)]) + if mtu: + ns_veth.assert_has_calls([mock.call.link.set_mtu(mtu)]) + root_veth.assert_has_calls([mock.call.link.set_mtu(mtu)]) +diff --git a/quantum/tests/unit/test_linux_ip_lib.py b/quantum/tests/unit/test_linux_ip_lib.py +index 47b4063..e477f2f 100644 +--- a/quantum/tests/unit/test_linux_ip_lib.py ++++ b/quantum/tests/unit/test_linux_ip_lib.py +@@ -205,6 +205,17 @@ class TestIpWrapper(base.BaseTestCase): + 'peer', 'name', 'tap1'), + 'sudo', None) + ++ def test_add_veth_with_namespaces(self): ++ ns2 = 'ns2' ++ with mock.patch.object(ip_lib.IPWrapper, 'ensure_namespace') as en: ++ ip_lib.IPWrapper('sudo').add_veth('tap0', 'tap1', namespace2=ns2) ++ en.assert_has_calls([mock.call(ns2)]) ++ self.execute.assert_called_once_with('', 'link', ++ ('add', 'tap0', 'type', 'veth', ++ 'peer', 'name', 'tap1', ++ 'netns', ns2), ++ 'sudo', None) ++ + def test_get_device(self): + dev = ip_lib.IPWrapper('sudo', 'ns').device('eth0') + self.assertEqual(dev.root_helper, 'sudo') diff --git a/rpm/SOURCES/0004-Add-kill-metadata-rootwrap-filter-to-support-RHEL.patch b/rpm/SOURCES/0004-Add-kill-metadata-rootwrap-filter-to-support-RHEL.patch new file mode 100644 index 000000000..94b30cf55 --- /dev/null +++ b/rpm/SOURCES/0004-Add-kill-metadata-rootwrap-filter-to-support-RHEL.patch @@ -0,0 +1,39 @@ +From 8240ad0e64f0a58601906f628ad24a8ee1bc8b1e Mon Sep 17 00:00:00 2001 +From: Maru Newby +Date: Thu, 9 May 2013 21:04:44 +0000 +Subject: [PATCH] Add kill-metadata rootwrap filter to support RHEL. + + * Fixes bug 1178419 + +Change-Id: I9c1cf0d19d1134ec3b85c905c6c8bb7145847ce7 +--- + etc/quantum/rootwrap.d/dhcp.filters | 2 ++ + etc/quantum/rootwrap.d/l3.filters | 2 ++ + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/etc/quantum/rootwrap.d/dhcp.filters b/etc/quantum/rootwrap.d/dhcp.filters +index 89abb02..4a4635a 100644 +--- a/etc/quantum/rootwrap.d/dhcp.filters ++++ b/etc/quantum/rootwrap.d/dhcp.filters +@@ -30,6 +30,8 @@ metadata_proxy: CommandFilter, /usr/bin/quantum-ns-metadata-proxy, root + # If installed from source (say, by devstack), the prefix will be + # /usr/local instead of /usr/bin. + metadata_proxy_local: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root ++# RHEL invocation of the metadata proxy will report /usr/bin/python ++kill_metadata: KillFilter, root, /usr/bin/python, -9 + kill_metadata7: KillFilter, root, /usr/bin/python2.7, -9 + kill_metadata6: KillFilter, root, /usr/bin/python2.6, -9 + +diff --git a/etc/quantum/rootwrap.d/l3.filters b/etc/quantum/rootwrap.d/l3.filters +index ec08d59..480a77b 100644 +--- a/etc/quantum/rootwrap.d/l3.filters ++++ b/etc/quantum/rootwrap.d/l3.filters +@@ -21,6 +21,8 @@ metadata_proxy: CommandFilter, /usr/bin/quantum-ns-metadata-proxy, root + # If installed from source (say, by devstack), the prefix will be + # /usr/local instead of /usr/bin. + metadata_proxy_local: CommandFilter, /usr/local/bin/quantum-ns-metadata-proxy, root ++# RHEL invocation of the metadata proxy will report /usr/bin/python ++kill_metadata: KillFilter, root, /usr/bin/python, -9 + kill_metadata7: KillFilter, root, /usr/bin/python2.7, -9 + kill_metadata6: KillFilter, root, /usr/bin/python2.6, -9 + diff --git a/rpm/SOURCES/openstack-quantum-newdeps.patch b/rpm/SOURCES/openstack-quantum-newdeps.patch new file mode 100644 index 000000000..65ddb460c --- /dev/null +++ b/rpm/SOURCES/openstack-quantum-newdeps.patch @@ -0,0 +1,39 @@ +--- quantum-2012.2/quantum/__init__.py.orig 2012-09-25 21:44:21.000000000 +0200 ++++ quantum-2012.2/quantum/__init__.py 2012-10-23 15:11:27.629591625 +0200 +@@ -15,6 +15,36 @@ + # License for the specific language governing permissions and limitations + # under the License. + ++import sys ++import pkg_resources ++ ++# If there is a conflicting non egg module, ++# i.e. an older standard system module installed, ++# then replace it with this requirement ++def replace_dist(requirement): ++ try: ++ return pkg_resources.require(requirement) ++ except pkg_resources.VersionConflict: ++ e = sys.exc_info()[1] ++ dist=e.args[0] ++ req=e.args[1] ++ if dist.key == req.key and not dist.location.endswith('.egg'): ++ del pkg_resources.working_set.by_key[dist.key] ++ # We assume there is no need to adjust sys.path ++ # and the associated pkg_resources.working_set.entries ++ return pkg_resources.require(requirement) ++ ++replace_dist("WebOb >= 1.0") ++replace_dist("SQLAlchemy >= 0.6.3") ++replace_dist("Routes >= 1.12.3") ++ ++replace_dist("PasteDeploy >= 1.5.0") ++# This hack is needed because replace_dist() results in ++# the standard paste module path being at the start of __path__. ++# TODO: See can we get pkg_resources to do the right thing directly ++import paste ++paste.__path__.insert(0, paste.__path__.pop(-1)) ++ + import gettext + + diff --git a/rpm/SOURCES/quantum-dhcp-agent.init b/rpm/SOURCES/quantum-dhcp-agent.init new file mode 100644 index 000000000..1344a989e --- /dev/null +++ b/rpm/SOURCES/quantum-dhcp-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-dhcp-agent OpenStack Quantum DHCP Agent +# +# chkconfig: - 98 02 +# description: OpenStack Quantum DHCP Agent +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=dhcp-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/dhcp_agent.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-dhcp-agent.upstart b/rpm/SOURCES/quantum-dhcp-agent.upstart new file mode 100644 index 000000000..74a568e5c --- /dev/null +++ b/rpm/SOURCES/quantum-dhcp-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum DHCP Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-dhcp-agent --log-file /var/log/quantum/dhcp-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/dhcp_agent.ini" quantum diff --git a/rpm/SOURCES/quantum-dhcp-setup b/rpm/SOURCES/quantum-dhcp-setup new file mode 100755 index 000000000..ddbc44470 --- /dev/null +++ b/rpm/SOURCES/quantum-dhcp-setup @@ -0,0 +1,136 @@ +#!/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: quantum-dhcp-setup [options] +Options: + --help | -h + Print usage information. + --plugin | -p + The quantum plugin. Supported plugins:- + ${SUPPORTED_PLUGINS[*]} + --qhost | -q + The Quantum hostname (assumes that this is also the QPID host). +EOF + + exit 0 +} + +is_valid_plugin() { + local i= + for i in "${SUPPORTED_PLUGINS[@]}"; do + if [ "$i" == "$1" ]; then + return 0 + fi + done + return 1 +} + +DHCP_CONF=/etc/quantum/dhcp_agent.ini + +while [ $# -gt 0 ] +do + case "$1" in + -h|--help) + usage + ;; + -p|--plugin) + shift + QUANTUM_PLUGIN=${1} + ;; + -q|--qhost) + shift + Q_HOST=${1} + ;; + *) + # ignore + shift + ;; + esac + shift +done + +# if the plugin is not defined +if [ -z ${QUANTUM_PLUGIN} ] ; then + echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}" + echo "Choice:" + read QUANTUM_PLUGIN +fi + +# check that the plugin is valid +is_valid_plugin ${QUANTUM_PLUGIN} +if [ $? -ne 0 ]; then + echo "Plugin '${QUANTUM_PLUGIN}' not supported. Supported plugins:-" + echo " ${SUPPORTED_PLUGINS[*]}" + exit 0 +fi + +echo "Quantum plugin: ${QUANTUM_PLUGIN}" + +if [ -z ${Q_HOST} ] ; then + echo "Please enter the Quantum hostname:" + read Q_HOST +fi + +Q_PORT=9696 +Q_CONF=/etc/quantum/quantum.conf +# QPID +openstack-config --set ${Q_CONF} DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid +openstack-config --set ${Q_CONF} DEFAULT qpid_hostname ${Q_HOST} + +case "${QUANTUM_PLUGIN}" in +"linuxbridge") + LINUX_INTERFACE_DRIVER=quantum.agent.linux.interface.BridgeInterfaceDriver +;; + +"openvswitch") + if ! rpm -q openvswitch > /dev/null + then + echo "Please install openvswitch" + exit 0 + fi + LINUX_INTERFACE_DRIVER=quantum.agent.linux.interface.OVSInterfaceDriver +;; + +esac + +# Keystone specific +OS_USERNAME=${OS_USERNAME:-quantum} +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!" diff --git a/rpm/SOURCES/quantum-l3-agent.init b/rpm/SOURCES/quantum-l3-agent.init new file mode 100644 index 000000000..e81c4150a --- /dev/null +++ b/rpm/SOURCES/quantum-l3-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-l3-agent OpenStack Quantum Layer 3 Agent +# +# chkconfig: - 98 02 +# description: OpenStack Quantum Layer 3 Agent +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=l3-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/l3_agent.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-l3-agent.upstart b/rpm/SOURCES/quantum-l3-agent.upstart new file mode 100644 index 000000000..1bbcd3042 --- /dev/null +++ b/rpm/SOURCES/quantum-l3-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum Layer 3 Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-l3-agent --log-file /var/log/quantum/l3-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/l3_agent.ini" quantum diff --git a/rpm/SOURCES/quantum-l3-setup b/rpm/SOURCES/quantum-l3-setup new file mode 100755 index 000000000..4596260e2 --- /dev/null +++ b/rpm/SOURCES/quantum-l3-setup @@ -0,0 +1,138 @@ +#!/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: quantum-l3-setup [options] +Options: + --help | -h + Print usage information. + --plugin | -p + The quantum plugin. Supported plugins:- + ${SUPPORTED_PLUGINS[*]} + --qhost | -q + The Quantum hostname (assumes that this is also the QPID host). +EOF + + exit 0 +} + +is_valid_plugin() { + local i= + for i in "${SUPPORTED_PLUGINS[@]}"; do + if [ "$i" == "$1" ]; then + return 0 + fi + done + return 1 +} + +L3_CONF=/etc/quantum/l3_agent.ini +L3_META_CONF=/etc/quantum/metadata_agent.ini + +while [ $# -gt 0 ] +do + case "$1" in + -h|--help) + usage + ;; + -p|--plugin) + shift + QUANTUM_PLUGIN=${1} + ;; + -q|--qhost) + shift + Q_HOST=${1} + ;; + *) + # ignore + shift + ;; + esac + shift +done + +# if the plugin is not defined +if [ -z ${QUANTUM_PLUGIN} ] ; then + echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}" + echo "Choice:" + read QUANTUM_PLUGIN +fi + +# check that the plugin is valid +is_valid_plugin ${QUANTUM_PLUGIN} +if [ $? -ne 0 ]; then + echo "Plugin '${QUANTUM_PLUGIN}' not supported. Supported plugins:-" + echo " ${SUPPORTED_PLUGINS[*]}" + exit 0 +fi + +echo "Quantum plugin: ${QUANTUM_PLUGIN}" + +if [ -z ${Q_HOST} ] ; then + echo "Please enter the Quantum hostname:" + read Q_HOST +fi + +Q_PORT=9696 +Q_CONF=/etc/quantum/quantum.conf +# QPID +openstack-config --set ${Q_CONF} DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid +openstack-config --set ${Q_CONF} DEFAULT qpid_hostname ${Q_HOST} + +case "${QUANTUM_PLUGIN}" in +"linuxbridge") + LINUX_INTERFACE_DRIVER=quantum.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=quantum.agent.linux.interface.OVSInterfaceDriver +;; + +esac + +# Keystone specific +OS_USERNAME=${OS_USERNAME:-quantum} +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/quantum-lbaas-agent.init b/rpm/SOURCES/quantum-lbaas-agent.init new file mode 100644 index 000000000..913f52fa4 --- /dev/null +++ b/rpm/SOURCES/quantum-lbaas-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-lbaas-agent OpenStack Quantum LBaaS Agent +# +# chkconfig: - 98 02 +# description: OpenStack Quantum LBaaS Agent +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=lbaas-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/lbaas_agent.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-lbaas-agent.upstart b/rpm/SOURCES/quantum-lbaas-agent.upstart new file mode 100644 index 000000000..7564dff36 --- /dev/null +++ b/rpm/SOURCES/quantum-lbaas-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum LBaaS Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-lbaas-agent --log-file /var/log/quantum/lbaas-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/lbaas_agent.ini" quantum diff --git a/rpm/SOURCES/quantum-linuxbridge-agent.init b/rpm/SOURCES/quantum-linuxbridge-agent.init new file mode 100644 index 000000000..7d9d376c4 --- /dev/null +++ b/rpm/SOURCES/quantum-linuxbridge-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-linuxbridge-agent OpenStack linuxbridge plugin +# +# chkconfig: - 98 02 +# description: Support VLANs using Linux bridging +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=linuxbridge-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/plugins/linuxbridge/linuxbridge_conf.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-linuxbridge-agent.upstart b/rpm/SOURCES/quantum-linuxbridge-agent.upstart new file mode 100644 index 000000000..dd4b29e25 --- /dev/null +++ b/rpm/SOURCES/quantum-linuxbridge-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum Linux Bridge Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-linuxbridge-agent --log-file /var/log/quantum/linuxbridge-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini" quantum diff --git a/rpm/SOURCES/quantum-metadata-agent.init b/rpm/SOURCES/quantum-metadata-agent.init new file mode 100644 index 000000000..e6f146f15 --- /dev/null +++ b/rpm/SOURCES/quantum-metadata-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-metadata-agent OpenStack Quantum Metadata Agent +# +# chkconfig: - 98 02 +# description: OpenStack Quantum Metadata Agent +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=metadata-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/metadata_agent.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-metadata-agent.upstart b/rpm/SOURCES/quantum-metadata-agent.upstart new file mode 100644 index 000000000..c11261bf3 --- /dev/null +++ b/rpm/SOURCES/quantum-metadata-agent.upstart @@ -0,0 +1,9 @@ +description "OpenStack Quantum Layer 3 Agent" +description "OpenStack Quantum Metadata Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-metadata-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/metadata_agent.ini --log-file /var/log/quantum/metadata-agent.log" quantum diff --git a/rpm/SOURCES/quantum-nec-agent.init b/rpm/SOURCES/quantum-nec-agent.init new file mode 100644 index 000000000..44f8ab6f6 --- /dev/null +++ b/rpm/SOURCES/quantum-nec-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-nec-agent OpenStack Quantum NEC OpenFlow Agent +# +# chkconfig: - 98 02 +# description: OpenStack Quantum NEC OpenFlow Agent +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=nec-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/plugins/nec/nec.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-nec-agent.upstart b/rpm/SOURCES/quantum-nec-agent.upstart new file mode 100644 index 000000000..1a09dd320 --- /dev/null +++ b/rpm/SOURCES/quantum-nec-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum NEC OpenFlow Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-nec-agent --log-file /var/log/quantum/nec-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/nec/nec.ini" quantum diff --git a/rpm/SOURCES/quantum-node-setup b/rpm/SOURCES/quantum-node-setup new file mode 100755 index 000000000..4ecf8960c --- /dev/null +++ b/rpm/SOURCES/quantum-node-setup @@ -0,0 +1,173 @@ +#!/bin/bash +# +# Copyright (C) 2012, Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + +# The script supports the plugins below +declare -a SUPPORTED_PLUGINS=(linuxbridge openvswitch) + +# +# Print --help output and exit. +# +usage() { + +cat << EOF +The helper script will install the necessary support for the selected plugin. + +Usage: quantum-node-setup [options] +Options: + --help | -h + Print usage information. + --plugin | -p + The quantum plugin. Supported plugins:- + ${SUPPORTED_PLUGINS[*]} + --qhost | -q + The Quantum hostname (assumes that this is also the QPID host). +EOF + + exit 0 +} + +is_valid_plugin() { + local i= + for i in "${SUPPORTED_PLUGINS[@]}"; do + if [ "$i" == "$1" ]; then + return 0 + fi + done + return 1 +} + +QUANTUM_USER=quantum +LB_CONF=/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini +OVS_CONF=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini + +# Nova specific +NOVA_CONF=/etc/nova/nova.conf + +while [ $# -gt 0 ] +do + case "$1" in + -h|--help) + usage + ;; + -p|--plugin) + shift + QUANTUM_PLUGIN=${1} + ;; + -q|--qhost) + shift + Q_HOST=${1} + ;; + *) + # ignore + shift + ;; + esac + shift +done + +# if the plugin is not defined +if [ -z ${QUANTUM_PLUGIN} ] ; then + echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}" + echo "Choice:" + read QUANTUM_PLUGIN +fi + +# check that the plugin is valid +is_valid_plugin ${QUANTUM_PLUGIN} +if [ $? -ne 0 ]; then + echo "Plugin '${QUANTUM_PLUGIN}' not supported. Supported plugins:-" + echo " ${SUPPORTED_PLUGINS[*]}" + exit 0 +fi + +echo "Quantum plugin: ${QUANTUM_PLUGIN}" + +if ! [ -e "/etc/quantum/plugins/${QUANTUM_PLUGIN}" ]; then + echo "Please install the ${QUANTUM_PLUGIN} quantum plugin" + exit 0 +fi + +#if the database hostname and is not defined and is required +if [ -z ${Q_HOST} ] ; then + echo "Please enter the Quantum hostname:" + read Q_HOST +fi + +Q_PORT=9696 +Q_CONF=/etc/quantum/quantum.conf +# QPID +openstack-config --set ${Q_CONF} DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid +openstack-config --set ${Q_CONF} DEFAULT qpid_hostname ${Q_HOST} + +case "${QUANTUM_PLUGIN}" in +"linuxbridge") +;; + +"openvswitch") + if ! rpm -q openvswitch > /dev/null + then + echo "Please install openvswitch" + exit 0 + fi + OVS_CONF=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini + openstack-config --set ${OVS_CONF} SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver +;; + +esac + +echo "Would you like to update the nova configuration files? (y/n): " +read response +case "$response" in +y|Y) + ;; +*) + echo "Complete!" + exit 0 +esac + +# Keystone specific +OS_USERNAME=${OS_USERNAME:-quantum} +OS_PASSWORD=${OS_PASSWORD:-servicepass} +OS_AUTH_URL=${OS_AUTH_URL:-http://127.0.0.1:35357/v2.0/} +OS_TENANT_NAME=${OS_TENANT_NAME:-service} + +# If OpenStack is installed then configure nova.conf +if ! [ -e "${NOVA_CONF}" ]; then + echo "Please install OpenStack compute and then set the values" + echo "in /etc/nova/nova.conf DEFAULT section" + echo " network_api_class=nova.network.quantumv2.api.API" + echo " quantum_admin_username=${OS_USERNAME}" + echo " quantum_admin_password=${OS_PASSWORD}" + echo " quantum_admin_auth_url=${OS_AUTH_URL}" + echo " quantum_auth_strategy=keystone" + echo " quantum_admin_tenant_name=${OS_TENANT_NAME}" + echo " quantum_url=http://${Q_HOST}:${Q_PORT}/" + echo " firewall_driver=nova.virt.firewall.NoopFirewallDriver" + echo " security_group_api=quantum" +else + openstack-config --set ${NOVA_CONF} DEFAULT network_api_class nova.network.quantumv2.api.API + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_username ${OS_USERNAME} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_password ${OS_PASSWORD} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_auth_url ${OS_AUTH_URL} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_auth_strategy keystone + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_tenant_name ${OS_TENANT_NAME} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_url http://${Q_HOST}:${Q_PORT}/ + openstack-config --set ${NOVA_CONF} DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver + openstack-config --set ${NOVA_CONF} DEFAULT security_group_api quantum +fi + +echo "Configuration updates complete!" diff --git a/rpm/SOURCES/quantum-openvswitch-agent.init b/rpm/SOURCES/quantum-openvswitch-agent.init new file mode 100644 index 000000000..667089e27 --- /dev/null +++ b/rpm/SOURCES/quantum-openvswitch-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-openvswitch-agent OpenStack Open vSwitch plugin +# +# chkconfig: - 98 02 +# description: Support virtual networks using Open vSwitch +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=openvswitch-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/plugins/openvswitch/ovs_quantum_plugin.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-openvswitch-agent.upstart b/rpm/SOURCES/quantum-openvswitch-agent.upstart new file mode 100644 index 000000000..b26761919 --- /dev/null +++ b/rpm/SOURCES/quantum-openvswitch-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum Open vSwitch Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-openvswitch-agent --log-file /var/log/quantum/openvswitch-agent.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini" quantum diff --git a/rpm/SOURCES/quantum-ovs-cleanup.init b/rpm/SOURCES/quantum-ovs-cleanup.init new file mode 100644 index 000000000..7b58ad548 --- /dev/null +++ b/rpm/SOURCES/quantum-ovs-cleanup.init @@ -0,0 +1,41 @@ +#!/bin/sh +# +# quantum-ovs-cleanup OpenStack Open vSwitch cleanup utility +# +# chkconfig: - 97 02 +# description: Purge Open vSwitch of the Quantum devices +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +prog=$proj-ovs-cleanup +exec="/usr/bin/$prog" +pidfile="/var/run/$proj/$prog.pid" +config="/etc/$proj/plugins/openvswitch/ovs_quantum_plugin.ini" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + daemon --user quantum $exec --log-file /var/log/$proj/ovs-cleanup.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null + retval=$? + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +case "$1" in + start) + $1 + ;; + stop|restart|reload|force-reload|status|condrestart|try-restart) + # Do nothing + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-ovs-cleanup.upstart b/rpm/SOURCES/quantum-ovs-cleanup.upstart new file mode 100644 index 000000000..2d7a6fe00 --- /dev/null +++ b/rpm/SOURCES/quantum-ovs-cleanup.upstart @@ -0,0 +1,7 @@ +description "OpenStack Quantum Open vSwitch cleanup utility" + +start on stopped rc RUNLEVEL=[2345] + +task + +exec su -s /bin/sh -c "exec /usr/bin/quantum-ovs-cleanup --log-file /var/log/quantum/ovs-cleanup.log --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini" quantum diff --git a/rpm/SOURCES/quantum-ryu-agent.init b/rpm/SOURCES/quantum-ryu-agent.init new file mode 100644 index 000000000..26e886191 --- /dev/null +++ b/rpm/SOURCES/quantum-ryu-agent.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum-ryu-agent OpenStack Ryu Network OS plugin +# +# chkconfig: - 98 02 +# description: Support virtual networks using Ryu Network OS +### END INIT INFO + +. /etc/rc.d/init.d/functions + +proj=quantum +plugin=ryu-agent +prog=$proj-$plugin +exec="/usr/bin/$prog" +config="/etc/$proj/plugins/ryu/ryu.ini" +pidfile="/var/run/$proj/$prog.pid" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --log-file /var/log/$proj/$plugin.log --config-file /etc/$proj/$proj.conf --config-file $config &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-ryu-agent.upstart b/rpm/SOURCES/quantum-ryu-agent.upstart new file mode 100644 index 000000000..338911530 --- /dev/null +++ b/rpm/SOURCES/quantum-ryu-agent.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum Ryu Network Operating System Agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-ryu-agent --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugins/ryu/ryu.ini --log-file /var/log/quantum/ryu-agent.log" quantum diff --git a/rpm/SOURCES/quantum-server-setup b/rpm/SOURCES/quantum-server-setup new file mode 100755 index 000000000..065dc483a --- /dev/null +++ b/rpm/SOURCES/quantum-server-setup @@ -0,0 +1,376 @@ +#!/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: quantum-server-setup [options] +Options: + --help | -h + Print usage information. + --qpw | -q + Specify the password for the 'quantum' MySQL user that quantum will + use to connect to the 'quantum' MySQL database. By default, + the password 'quantum' will be used. + + --rootpw | -r + 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 quantum user. + --plugin | -p + The quantum 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="" +QUANTUM_USER=quantum +MYSQL_Q_PW=quantum +Q_CONF=/etc/quantum/quantum.conf +LB_CONF=/etc/quantum/plugins/linuxbridge/linuxbridge_conf.ini +OVS_CONF=/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini +Q_HOST='localhost' +Q_PORT=9696 + +# Keystone specific +OS_USERNAME=${OS_USERNAME:-quantum} +OS_PASSWORD=${OS_PASSWORD:-servicepass} +OS_AUTH_URL=${OS_AUTH_URL:-http://127.0.0.1:35357/v2.0/} +OS_TENANT_NAME=${OS_TENANT_NAME:-service} + +# 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 + QUANTUM_USER=${1} + ;; + -p|--plugin) + shift + QUANTUM_PLUGIN=${1} + ;; + *) + # ignore + shift + ;; + esac + shift +done + +# if the plugin is not defined +if [ -z ${QUANTUM_PLUGIN} ] ; then + echo "Please select a plugin from: ${SUPPORTED_PLUGINS[*]}" + echo "Choice:" + read QUANTUM_PLUGIN +fi + +# check that the plugin is valid +is_valid_plugin ${QUANTUM_PLUGIN} +if [ $? -ne 0 ]; then + echo "Plugin '${QUANTUM_PLUGIN}' not supported. Supported plugins:-" + echo " ${SUPPORTED_PLUGINS[*]}" + exit 0 +fi + +echo "Quantum plugin: ${QUANTUM_PLUGIN}" + +if ! [ -e "${Q_CONF}" ]; then + echo "Please install the quantum package" + exit 0 +fi + +if ! [ -e "/etc/quantum/plugins/${QUANTUM_PLUGIN}" ]; then + echo "Please install the ${QUANTUM_PLUGIN} quantum plugin" + exit 0 +fi + +case "${QUANTUM_PLUGIN}" in +"linuxbridge") + DB_NAME="quantum_linux_bridge" + Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2" +;; + +"openvswitch") + if ! rpm -q openvswitch > /dev/null + then + echo "Please install openvswitch" + exit 0 + fi + DB_NAME="ovs_quantum" + Q_PLUGIN_CLASS="quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2" +;; +esac + +# Update quantum.conf +# Plugin +openstack-config --set ${Q_CONF} DEFAULT core_plugin $Q_PLUGIN_CLASS +# QPID +openstack-config --set ${Q_CONF} DEFAULT rpc_backend quantum.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: ${QUANTUM_PLUGIN} => Database: ${DB_NAME}" + +# Make sure MySQL is installed. + +NEW_MYSQL_INSTALL=0 +if ! rpm -q 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='${QUANTUM_USER}'"|grep ${QUANTUM_USER} | wc -l) +if [ ${USER_EXISTS} -ne 0 ]; then + echo "User ${QUANTUM_USER} already exists" +else + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "create user '${QUANTUM_USER}'@'%' identified by '${MYSQL_Q_PW}'" + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "create user '${QUANTUM_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 "${QUANTUM_PLUGIN}" in +"linuxbridge") + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on quantum_linux_bridge.* to '${QUANTUM_USER}'@'%'" + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on quantum_linux_bridge.* to '${QUANTUM_USER}'@'localhost'" + openstack-config --set ${LB_CONF} DATABASE sql_connection mysql://${QUANTUM_USER}:${MYSQL_Q_PW}@`hostname`/quantum_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/quantum/plugin.ini +;; + +"openvswitch") + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on ovs_quantum.* to '${QUANTUM_USER}'@'%'" + mysql -u root ${MYSQL_ROOT_PW_ARG} -e "grant all on ovs_quantum.* to '${QUANTUM_USER}'@'localhost'" + openstack-config --set ${OVS_CONF} DATABASE sql_connection mysql://${QUANTUM_USER}:${MYSQL_Q_PW}@`hostname`/ovs_quantum + openstack-config --set ${OVS_CONF} SECURITYGROUP firewall_driver quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver + ln -s ${OVS_CONF} /etc/quantum/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.quantumv2.api.API" + echo " quantum_admin_username=${OS_USERNAME}" + echo " quantum_admin_password=${OS_PASSWORD}" + echo " quantum_admin_auth_url=${OS_AUTH_URL}" + echo " quantum_auth_strategy=keystone" + echo " quantum_admin_tenant_name=${OS_TENANT_NAME}" + echo " quantum_url=http://${Q_HOST}:${Q_PORT}/" + echo " firewall_driver=nova.virt.firewall.NoopFirewallDriver" + echo " security_group_api=quantum" +else + openstack-config --set ${NOVA_CONF} DEFAULT network_api_class nova.network.quantumv2.api.API + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_username ${OS_USERNAME} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_password ${OS_PASSWORD} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_auth_url ${OS_AUTH_URL} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_auth_strategy keystone + openstack-config --set ${NOVA_CONF} DEFAULT quantum_admin_tenant_name ${OS_TENANT_NAME} + openstack-config --set ${NOVA_CONF} DEFAULT quantum_url http://${Q_HOST}:${Q_PORT}/ + openstack-config --set ${NOVA_CONF} DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver + openstack-config --set ${NOVA_CONF} DEFAULT security_group_api quantum +fi + +echo "Configuration updates complete!" diff --git a/rpm/SOURCES/quantum-server.init b/rpm/SOURCES/quantum-server.init new file mode 100644 index 000000000..ed62f01a4 --- /dev/null +++ b/rpm/SOURCES/quantum-server.init @@ -0,0 +1,94 @@ +#!/bin/sh +# +# quantum OpenStack Software Defined Networking Service +# +# chkconfig: - 98 02 +# description: quantum provides an API to \ +# * request and configure virtual networks +### END INIT INFO + +. /etc/rc.d/init.d/functions + +prog=quantum +exec="/usr/bin/$prog-server" +config="/etc/$prog/$prog.conf" +pidfile="/var/run/$prog/$prog.pid" +logfile="/var/log/$prog/server.log" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog-server + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user quantum --pidfile $pidfile "$exec --config-file $config --config-file /etc/$prog/plugin.ini --log-file $logfile &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/quantum-server.upstart b/rpm/SOURCES/quantum-server.upstart new file mode 100644 index 000000000..7892b4f8a --- /dev/null +++ b/rpm/SOURCES/quantum-server.upstart @@ -0,0 +1,8 @@ +description "OpenStack Quantum Server" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/quantum-server --config-file /etc/quantum/quantum.conf --config-file /etc/quantum/plugin.ini --log-file /var/log/quantum/server.log" quantum diff --git a/rpm/SOURCES/quantum-sudoers b/rpm/SOURCES/quantum-sudoers new file mode 100644 index 000000000..3695e0395 --- /dev/null +++ b/rpm/SOURCES/quantum-sudoers @@ -0,0 +1,3 @@ +Defaults:quantum !requiretty + +quantum ALL = (root) NOPASSWD: SETENV: /usr/bin/quantum-rootwrap diff --git a/rpm/SOURCES/quantum.logrotate b/rpm/SOURCES/quantum.logrotate new file mode 100644 index 000000000..165ca6a47 --- /dev/null +++ b/rpm/SOURCES/quantum.logrotate @@ -0,0 +1,9 @@ +compress + +/var/log/quantum/*.log { + weekly + rotate 4 + missingok + compress + minsize 100k +} diff --git a/rpm/SPECS/openstack-quantum.spec b/rpm/SPECS/openstack-quantum.spec new file mode 100644 index 000000000..8ab92b5ae --- /dev/null +++ b/rpm/SPECS/openstack-quantum.spec @@ -0,0 +1,838 @@ +# +# This is 2013.1.2 release +# +%global release_name grizzly + +Name: openstack-quantum +Version: 2013.1.2 +Release: 2%{?dist} +Summary: OpenStack Networking Service + +Group: Applications/System +License: ASL 2.0 +URL: http://launchpad.net/quantum/ + +Source0: quantum-%{version}.tar.gz +Source1: quantum.logrotate +Source2: quantum-sudoers +Source4: quantum-server-setup +Source5: quantum-node-setup +Source6: quantum-dhcp-setup +Source7: quantum-l3-setup + +Source10: quantum-server.init +Source20: quantum-server.upstart +Source11: quantum-linuxbridge-agent.init +Source21: quantum-linuxbridge-agent.upstart +Source12: quantum-openvswitch-agent.init +Source22: quantum-openvswitch-agent.upstart +Source13: quantum-ryu-agent.init +Source23: quantum-ryu-agent.upstart +Source14: quantum-nec-agent.init +Source24: quantum-nec-agent.upstart +Source15: quantum-dhcp-agent.init +Source25: quantum-dhcp-agent.upstart +Source16: quantum-l3-agent.init +Source26: quantum-l3-agent.upstart +Source17: quantum-metadata-agent.init +Source27: quantum-metadata-agent.upstart +Source18: quantum-ovs-cleanup.init +Source28: quantum-ovs-cleanup.upstart +Source19: quantum-lbaas-agent.init +Source29: quantum-lbaas-agent.upstart + +# +# patches_base=2013.1.2 +# +Patch0001: 0001-use-parallel-installed-versions-in-RHEL6.patch +Patch0002: 0002-avoid-code-path-causing-qpid-exchange-leaks.patch + +BuildArch: noarch + +BuildRequires: python2-devel +BuildRequires: python-setuptools +# Build require these parallel versions +# as setup.py build imports quantum.openstack.common.setup +# which will then check for these +BuildRequires: python-sqlalchemy0.7 +BuildRequires: python-webob1.0 +BuildRequires: python-paste-deploy1.5 +BuildRequires: python-routes1.12 +BuildRequires: dos2unix + +Requires: python-quantum = %{version}-%{release} +Requires: openstack-utils +Requires: python-keystone + +Requires(post): chkconfig +Requires(postun): initscripts +Requires(preun): chkconfig +Requires(preun): initscripts +Requires(pre): shadow-utils + +# dnsmasq is not a hard requirement, but is currently the only option +# when quantum-dhcp-agent is deployed. +Requires: dnsmasq + + +%description +Quantum is a virtual network service for Openstack. Just like +OpenStack Nova provides an API to dynamically request and configure +virtual servers, Quantum provides an API to dynamically request and +configure virtual networks. These networks connect "interfaces" from +other OpenStack services (e.g., virtual NICs from Nova VMs). The +Quantum API supports extensions to provide advanced network +capabilities (e.g., QoS, ACLs, network monitoring, etc.) + + +%package -n python-quantum +Summary: Quantum Python libraries +Group: Applications/System + +Requires: MySQL-python +Requires: python-alembic +Requires: python-amqplib +Requires: python-anyjson +Requires: python-eventlet +Requires: python-greenlet +Requires: python-httplib2 +Requires: python-iso8601 +Requires: python-kombu +Requires: python-lxml +Requires: python-paste-deploy1.5 +Requires: python-routes1.12 +Requires: python-sqlalchemy0.7 +Requires: python-webob1.0 +Requires: python-netaddr +Requires: python-oslo-config +Requires: python-qpid +Requires: python-quantumclient >= 1:2.1.10 +Requires: sudo + +%description -n python-quantum +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum Python library. + + +%package -n openstack-quantum-bigswitch +Summary: Quantum Big Switch plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-bigswitch +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using the FloodLight Openflow Controller or the Big Switch +Networks Controller. + + +%package -n openstack-quantum-brocade +Summary: Quantum Brocade plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-brocade +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using Brocade VCS switches running NOS. + + +%package -n openstack-quantum-cisco +Summary: Quantum Cisco plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} +Requires: python-configobj + + +%description -n openstack-quantum-cisco +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using Cisco UCS and Nexus. + + +%package -n openstack-quantum-hyperv +Summary: Quantum Hyper-V plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-hyperv +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using Microsoft Hyper-V. + + +%package -n openstack-quantum-linuxbridge +Summary: Quantum linuxbridge plugin +Group: Applications/System + +Requires: bridge-utils +Requires: openstack-quantum = %{version}-%{release} +Requires: python-pyudev + + +%description -n openstack-quantum-linuxbridge +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks as VLANs using Linux bridging. + + +%package -n openstack-quantum-midonet +Summary: Quantum MidoNet plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-midonet +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using MidoNet from Midokura. + + +%package -n openstack-quantum-nicira +Summary: Quantum Nicira plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-nicira +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using Nicira NVP. + + +%package -n openstack-quantum-openvswitch +Summary: Quantum openvswitch plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} +Requires: openvswitch + + +%description -n openstack-quantum-openvswitch +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using Open vSwitch. + + +%package -n openstack-quantum-plumgrid +Summary: Quantum PLUMgrid plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-plumgrid +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using the PLUMgrid platform. + + +%package -n openstack-quantum-ryu +Summary: Quantum Ryu plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-ryu +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using the Ryu Network Operating System. + + +%package -n openstack-quantum-nec +Summary: Quantum NEC plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-nec +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using the NEC OpenFlow controller. + + +%package -n openstack-quantum-metaplugin +Summary: Quantum meta plugin +Group: Applications/System + +Requires: openstack-quantum = %{version}-%{release} + + +%description -n openstack-quantum-metaplugin +Quantum provides an API to dynamically request and configure virtual +networks. + +This package contains the quantum plugin that implements virtual +networks using multiple other quantum plugins. + + +%prep +%setup -q -n quantum-%{version} + +%patch0001 -p1 +%patch0002 -p1 + +sed -i 's/%{version}/%{version}/' PKG-INFO + +find quantum -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \; + +# let RPM handle deps +sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py + +chmod 644 quantum/plugins/cisco/README + +# Adjust configuration file content +sed -i 's/debug = True/debug = False/' etc/quantum.conf +sed -i 's/\# auth_strategy = keystone/auth_strategy = noauth/' etc/quantum.conf + + +%build +%{__python} setup.py build + + +%install +%{__python} setup.py install -O1 --skip-build --root %{buildroot} + +# Remove unused files +rm -rf %{buildroot}%{python_sitelib}/bin +rm -rf %{buildroot}%{python_sitelib}/doc +rm -rf %{buildroot}%{python_sitelib}/tools +rm -rf %{buildroot}%{python_sitelib}/quantum/tests +rm -rf %{buildroot}%{python_sitelib}/quantum/plugins/*/tests +rm -f %{buildroot}%{python_sitelib}/quantum/plugins/*/run_tests.* +rm %{buildroot}/usr/etc/init.d/quantum-server + +# Install execs (using hand-coded rather than generated versions) +install -p -D -m 755 bin/quantum-check-nvp-config %{buildroot}%{_bindir}/quantum-check-nvp-config +install -p -D -m 755 bin/quantum-db-manage %{buildroot}%{_bindir}/quantum-db-manage +install -p -D -m 755 bin/quantum-debug %{buildroot}%{_bindir}/quantum-debug +install -p -D -m 755 bin/quantum-dhcp-agent %{buildroot}%{_bindir}/quantum-dhcp-agent +install -p -D -m 755 bin/quantum-dhcp-agent-dnsmasq-lease-update %{buildroot}%{_bindir}/quantum-dhcp-agent-dnsmasq-lease-update +install -p -D -m 755 bin/quantum-l3-agent %{buildroot}%{_bindir}/quantum-l3-agent +install -p -D -m 755 bin/quantum-lbaas-agent %{buildroot}%{_bindir}/quantum-lbaas-agent +install -p -D -m 755 bin/quantum-linuxbridge-agent %{buildroot}%{_bindir}/quantum-linuxbridge-agent +install -p -D -m 755 bin/quantum-metadata-agent %{buildroot}%{_bindir}/quantum-metadata-agent +install -p -D -m 755 bin/quantum-nec-agent %{buildroot}%{_bindir}/quantum-nec-agent +install -p -D -m 755 bin/quantum-netns-cleanup %{buildroot}%{_bindir}/quantum-netns-cleanup +install -p -D -m 755 bin/quantum-ns-metadata-proxy %{buildroot}%{_bindir}/quantum-ns-metadata-proxy +install -p -D -m 755 bin/quantum-openvswitch-agent %{buildroot}%{_bindir}/quantum-openvswitch-agent +install -p -D -m 755 bin/quantum-ovs-cleanup %{buildroot}%{_bindir}/quantum-ovs-cleanup +install -p -D -m 755 bin/quantum-rootwrap %{buildroot}%{_bindir}/quantum-rootwrap +install -p -D -m 755 bin/quantum-ryu-agent %{buildroot}%{_bindir}/quantum-ryu-agent +install -p -D -m 755 bin/quantum-server %{buildroot}%{_bindir}/quantum-server +install -p -D -m 755 bin/quantum-usage-audit %{buildroot}%{_bindir}/quantum-usage-audit + +# Move rootwrap files to proper location +install -d -m 755 %{buildroot}%{_datarootdir}/quantum/rootwrap +mv %{buildroot}/usr/etc/quantum/rootwrap.d/*.filters %{buildroot}%{_datarootdir}/quantum/rootwrap + +# Move config files to proper location +install -d -m 755 %{buildroot}%{_sysconfdir}/quantum +mv %{buildroot}/usr/etc/quantum/* %{buildroot}%{_sysconfdir}/quantum +chmod 640 %{buildroot}%{_sysconfdir}/quantum/plugins/*/*.ini + +# Configure agents to use quantum-rootwrap +sed -i 's/^# root_helper.*/root_helper = sudo quantum-rootwrap \/etc\/quantum\/rootwrap.conf/g' %{buildroot}%{_sysconfdir}/quantum/quantum.conf + +# Configure quantum-dhcp-agent state_path +sed -i 's/state_path = \/opt\/stack\/data/state_path = \/var\/lib\/quantum/' %{buildroot}%{_sysconfdir}/quantum/dhcp_agent.ini + +# Install logrotate +install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-quantum + +# Install sudoers +install -p -D -m 440 %{SOURCE2} %{buildroot}%{_sysconfdir}/sudoers.d/quantum + +# Install sysv init scripts +install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/quantum-server +install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/quantum-linuxbridge-agent +install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/quantum-openvswitch-agent +install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/quantum-ryu-agent +install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/quantum-nec-agent +install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/quantum-dhcp-agent +install -p -D -m 755 %{SOURCE16} %{buildroot}%{_initrddir}/quantum-l3-agent +install -p -D -m 755 %{SOURCE17} %{buildroot}%{_initrddir}/quantum-metadata-agent +install -p -D -m 755 %{SOURCE18} %{buildroot}%{_initrddir}/quantum-ovs-cleanup +install -p -D -m 755 %{SOURCE19} %{buildroot}%{_initrddir}/quantum-lbaas-agent + +# Setup directories +install -d -m 755 %{buildroot}%{_datadir}/quantum +install -d -m 755 %{buildroot}%{_sharedstatedir}/quantum +install -d -m 755 %{buildroot}%{_localstatedir}/log/quantum +install -d -m 755 %{buildroot}%{_localstatedir}/run/quantum + +# Install setup helper scripts +install -p -D -m 755 %{SOURCE4} %{buildroot}%{_bindir}/quantum-server-setup +install -p -D -m 755 %{SOURCE5} %{buildroot}%{_bindir}/quantum-node-setup +install -p -D -m 755 %{SOURCE6} %{buildroot}%{_bindir}/quantum-dhcp-setup +install -p -D -m 755 %{SOURCE7} %{buildroot}%{_bindir}/quantum-l3-setup + +# Install upstart jobs examples +install -p -m 644 %{SOURCE20} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE21} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE22} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE23} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE24} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE25} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE26} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE27} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE28} %{buildroot}%{_datadir}/quantum/ +install -p -m 644 %{SOURCE29} %{buildroot}%{_datadir}/quantum/ + +# Install version info file +cat > %{buildroot}%{_sysconfdir}/quantum/release </dev/null || groupadd -r quantum --gid 164 +getent passwd quantum >/dev/null || \ + useradd --uid 164 -r -g quantum -d %{_sharedstatedir}/quantum -s /sbin/nologin \ + -c "OpenStack Quantum Daemons" quantum +exit 0 + + +%post +if [ $1 -eq 1 ] ; then + # Initial installation + /sbin/chkconfig --add quantum-server +fi + +%preun +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/service quantum-server stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-server + /sbin/service quantum-dhcp-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-dhcp-agent + /sbin/service quantum-l3-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-l3-agent + /sbin/service quantum-metadata-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-metadata-agent + /sbin/service quantum-lbaas-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-lbaas-agent +fi + +%postun +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /sbin/service quantum-server condrestart >/dev/null 2>&1 || : + /sbin/service quantum-dhcp-agent condrestart >/dev/null 2>&1 || : + /sbin/service quantum-l3-agent condrestart >/dev/null 2>&1 || : + /sbin/service quantum-metadata-agent condrestart >/dev/null 2>&1 || : + /sbin/service quantum-lbaas-agent condrestart >/dev/null 2>&1 || : +fi + + +%post -n openstack-quantum-linuxbridge +if [ $1 -eq 1 ] ; then + # Initial installation + /sbin/chkconfig --add quantum-linuxbridge-agent +fi + +%preun -n openstack-quantum-linuxbridge +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/service quantum-linuxbridge-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-linuxbridge-agent +fi + +%postun -n openstack-quantum-linuxbridge +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /sbin/service quantum-linuxbridge-agent condrestart >/dev/null 2>&1 || : +fi + + +%post -n openstack-quantum-openvswitch +if [ $1 -eq 1 ] ; then + # Initial installation + /sbin/chkconfig --add quantum-openvswitch-agent +fi + +%preun -n openstack-quantum-openvswitch +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/service quantum-openvswitch-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-openvswitch-agent +fi + +%postun -n openstack-quantum-openvswitch +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /sbin/service quantum-openvswitch-agent condrestart >/dev/null 2>&1 || : +fi + + +%post -n openstack-quantum-ryu +if [ $1 -eq 1 ] ; then + # Initial installation + /sbin/chkconfig --add quantum-ryu-agent +fi + +%preun -n openstack-quantum-ryu +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/service quantum-ryu-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-ryu-agent +fi + +%postun -n openstack-quantum-ryu +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /sbin/service quantum-ryu-agent condrestart >/dev/null 2>&1 || : +fi + + +%preun -n openstack-quantum-nec +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /sbin/service quantum-nec-agent stop >/dev/null 2>&1 + /sbin/chkconfig --del quantum-nec-agent +fi + + +%postun -n openstack-quantum-nec +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /sbin/service quantum-nec-agent condrestart >/dev/null 2>&1 || : +fi + + +%files +%doc LICENSE +%doc README +%{_bindir}/quantum-db-manage +%{_bindir}/quantum-debug +%{_bindir}/quantum-dhcp-agent +%{_bindir}/quantum-dhcp-agent-dnsmasq-lease-update +%{_bindir}/quantum-dhcp-setup +%{_bindir}/quantum-l3-agent +%{_bindir}/quantum-l3-setup +%{_bindir}/quantum-lbaas-agent +%{_bindir}/quantum-metadata-agent +%{_bindir}/quantum-netns-cleanup +%{_bindir}/quantum-node-setup +%{_bindir}/quantum-ns-metadata-proxy +%{_bindir}/quantum-rootwrap +%{_bindir}/quantum-server +%{_bindir}/quantum-server-setup +%{_bindir}/quantum-usage-audit +%{_initrddir}/quantum-server +%{_initrddir}/quantum-dhcp-agent +%{_initrddir}/quantum-l3-agent +%{_initrddir}/quantum-metadata-agent +%{_initrddir}/quantum-ovs-cleanup +%{_initrddir}/quantum-lbaas-agent +%dir %{_datadir}/quantum +%{_datadir}/quantum/quantum-server.upstart +%{_datadir}/quantum/quantum-dhcp-agent.upstart +%{_datadir}/quantum/quantum-metadata-agent.upstart +%{_datadir}/quantum/quantum-l3-agent.upstart +%{_datadir}/quantum/quantum-lbaas-agent.upstart +%dir %{_sysconfdir}/quantum +%{_sysconfdir}/quantum/release +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/api-paste.ini +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/dhcp_agent.ini +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/l3_agent.ini +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/metadata_agent.ini +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/lbaas_agent.ini +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/policy.json +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/quantum.conf +%config(noreplace) %{_sysconfdir}/quantum/rootwrap.conf +%dir %{_sysconfdir}/quantum/plugins +%config(noreplace) %{_sysconfdir}/logrotate.d/* +%config(noreplace) %{_sysconfdir}/sudoers.d/quantum +%dir %attr(0755, quantum, quantum) %{_sharedstatedir}/quantum +%dir %attr(0755, quantum, quantum) %{_localstatedir}/log/quantum +%dir %attr(0755, quantum, quantum) %{_localstatedir}/run/quantum +%dir %{_datarootdir}/quantum/rootwrap +%{_datarootdir}/quantum/rootwrap/dhcp.filters +%{_datarootdir}/quantum/rootwrap/iptables-firewall.filters +%{_datarootdir}/quantum/rootwrap/l3.filters +%{_datarootdir}/quantum/rootwrap/lbaas-haproxy.filters + + +%files -n python-quantum +%doc LICENSE +%doc README +%{python_sitelib}/quantum +%exclude %{python_sitelib}/quantum/plugins/bigswitch +%exclude %{python_sitelib}/quantum/plugins/brocade +%exclude %{python_sitelib}/quantum/plugins/cisco +%exclude %{python_sitelib}/quantum/plugins/hyperv +%exclude %{python_sitelib}/quantum/plugins/linuxbridge +%exclude %{python_sitelib}/quantum/plugins/metaplugin +%exclude %{python_sitelib}/quantum/plugins/midonet +%exclude %{python_sitelib}/quantum/plugins/nec +%exclude %{python_sitelib}/quantum/plugins/nicira +%exclude %{python_sitelib}/quantum/plugins/openvswitch +%exclude %{python_sitelib}/quantum/plugins/plumgrid +%exclude %{python_sitelib}/quantum/plugins/ryu +%{python_sitelib}/quantum-%%{version}-*.egg-info + + +%files -n openstack-quantum-bigswitch +%doc LICENSE +%doc quantum/plugins/bigswitch/README +%{python_sitelib}/quantum/plugins/bigswitch +%dir %{_sysconfdir}/quantum/plugins/bigswitch +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/bigswitch/*.ini + + +%files -n openstack-quantum-brocade +%doc LICENSE +%doc quantum/plugins/brocade/README.md +%{python_sitelib}/quantum/plugins/brocade +%dir %{_sysconfdir}/quantum/plugins/brocade +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/brocade/*.ini + + +%files -n openstack-quantum-cisco +%doc LICENSE +%doc quantum/plugins/cisco/README +%{python_sitelib}/quantum/plugins/cisco +%dir %{_sysconfdir}/quantum/plugins/cisco +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/cisco/*.ini + + +%files -n openstack-quantum-hyperv +%doc LICENSE +#%%doc quantum/plugins/hyperv/README +%{python_sitelib}/quantum/plugins/hyperv +%dir %{_sysconfdir}/quantum/plugins/hyperv +%exclude %{python_sitelib}/quantum/plugins/hyperv/agent +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/hyperv/*.ini + + +%files -n openstack-quantum-linuxbridge +%doc LICENSE +%doc quantum/plugins/linuxbridge/README +%{_bindir}/quantum-linuxbridge-agent +%{_initrddir}/quantum-linuxbridge-agent +%{_datadir}/quantum/quantum-linuxbridge-agent.upstart +%{python_sitelib}/quantum/plugins/linuxbridge +%{_datarootdir}/quantum/rootwrap/linuxbridge-plugin.filters +%dir %{_sysconfdir}/quantum/plugins/linuxbridge +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/linuxbridge/*.ini + + +%files -n openstack-quantum-midonet +%doc LICENSE +#%%doc quantum/plugins/midonet/README +%{python_sitelib}/quantum/plugins/midonet +%dir %{_sysconfdir}/quantum/plugins/midonet +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/midonet/*.ini + + +%files -n openstack-quantum-nicira +%doc LICENSE +%doc quantum/plugins/nicira/nicira_nvp_plugin/README +%{_bindir}/quantum-check-nvp-config +%{python_sitelib}/quantum/plugins/nicira +%dir %{_sysconfdir}/quantum/plugins/nicira +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/nicira/*.ini + + +%files -n openstack-quantum-openvswitch +%doc LICENSE +%doc quantum/plugins/openvswitch/README +%{_bindir}/quantum-openvswitch-agent +%{_bindir}/quantum-ovs-cleanup +%{_initrddir}/quantum-openvswitch-agent +%{_datadir}/quantum/quantum-openvswitch-agent.upstart +%{_initrddir}/quantum-ovs-cleanup +%{_datadir}/quantum/quantum-ovs-cleanup.upstart +%{python_sitelib}/quantum/plugins/openvswitch +%{_datarootdir}/quantum/rootwrap/openvswitch-plugin.filters +%dir %{_sysconfdir}/quantum/plugins/openvswitch +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/openvswitch/*.ini + + +%files -n openstack-quantum-plumgrid +%doc LICENSE +%doc quantum/plugins/plumgrid/README +%{python_sitelib}/quantum/plugins/plumgrid +%dir %{_sysconfdir}/quantum/plugins/plumgrid +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/plumgrid/*.ini + + +%files -n openstack-quantum-ryu +%doc LICENSE +%doc quantum/plugins/ryu/README +%{_bindir}/quantum-ryu-agent +%{_initrddir}/quantum-ryu-agent +%{_datadir}/quantum/quantum-ryu-agent.upstart +%{python_sitelib}/quantum/plugins/ryu +%{_datarootdir}/quantum/rootwrap/ryu-plugin.filters +%dir %{_sysconfdir}/quantum/plugins/ryu +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/ryu/*.ini + + +%files -n openstack-quantum-nec +%doc LICENSE +%doc quantum/plugins/nec/README +%{_bindir}/quantum-nec-agent +%{_initrddir}/quantum-nec-agent +%{_datadir}/quantum/quantum-nec-agent.upstart +%{python_sitelib}/quantum/plugins/nec +%{_datarootdir}/quantum/rootwrap/nec-plugin.filters +%dir %{_sysconfdir}/quantum/plugins/nec +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/nec/*.ini + + +%files -n openstack-quantum-metaplugin +%doc LICENSE +%doc quantum/plugins/metaplugin/README +%{python_sitelib}/quantum/plugins/metaplugin +%dir %{_sysconfdir}/quantum/plugins/metaplugin +%config(noreplace) %attr(0640, root, quantum) %{_sysconfdir}/quantum/plugins/metaplugin/*.ini + + +%changelog +* Wed Jul 17 2013 Pádraig Brady - 2013.1.2-2 +- Avoid qpid exchange leaks + +* Fri Jun 07 2013 Terry Wilson - 2013.1.2-1 +- Update to grizzly 2013.1.2 release + +* Sun May 26 2013 Gary Kotton - 2013.1.1-6 +- Fixes rootwarp path + +* Fri May 24 2013 Pádraig Brady - 2013.1.1-5 +- Fix inclusion of db migrations + +* Tue May 22 2013 Gary Kotton - 2013.1.1-3 +- Updates to work with namespaces +- Fix kill-metadata rootwrap filter + +* Mon May 13 2013 Gary Kotton - 2013.1.1-2 +- Update to grizzly stable release 2013.1.1 +- Update install scripts to configure security groups +- Update install scripts to remove virtual interface configurations + +* Mon Apr 29 2013 Pádraig Brady 2013.1-3 +- Fix quantum-ovs-cleanup.init to reference the correct config files + +* Wed Apr 4 2013 Gary Kotton - 2013.1-1 +- Update to grizzly release + +* Wed Apr 4 2013 Gary Kotton - 2013.1-0.7.rc3 +- Update to grizzly rc3 +- Update rootwrap (bug 947793) +- Update l3-agent-setup to support qpid (bug 947532) +- Update l3-agent-setup to support metadata-agent credentials +- Update keystone authentication details (bug 947776) + +* Tue Mar 26 2013 Terry Wilson - 2013.1-0.6.rc2 +- Update to grizzly rc2 + +* Tue Mar 12 2013 Pádraig Brady - 2013.1-0.5.g3 +- Relax the dependency requirements on sqlalchemy + +* Mon Feb 25 2013 Robert Kukura - 2013.1-0.4.g3 +- Update to grizzly milestone 3 +- Add brocade, hyperv, midonet, and plumgrid plugins as sub-packages +- Remove cisco files that were eliminated +- Add quantum-check-nvp-config +- Include patch for https://code.launchpad.net/bugs/1132889 +- Require python-oslo-config +- Require compatible version of python-sqlalchemy +- Various spec file improvements + +* Thu Feb 14 2013 Robert Kukura - 2013.1-0.3.g2 +- Update to grizzly milestone 2 +- Add quantum-db-manage, quantum-metadata-agent, + quantum-ns-metadata-proxy, quantum-ovs-cleanup, and + quantum-usage-audit executables +- Add systemd units for quantum-metadata-agent and quantum-ovs-cleanup +- Fix /etc/quantum/policy.json permissions (bug 877600) +- Require dnsmasq (bug 890041) +- Add the version info file +- Remove python-lxml dependency +- Add python-alembic dependency + +* Thu Feb 14 2013 Fedora Release Engineering - 2013.1-0.2.g1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 23 2013 Martin Magr - 2012.2.1-1 +- Added python-keystone requirement + +* Wed Dec 5 2012 Robert Kukura - 2013.1-0.1.g1 +- Update to grizzly milestone 1 +- Require python-quantumclient >= 1:2.1.10 +- Remove unneeded rpc control_exchange patch +- Add bigswitch plugin as sub-package +- Work around bigswitch conf file missing from setup.py + +* Mon Dec 3 2012 Robert Kukura - 2012.2.1-1 +- Update to folsom stable 2012.2.1 +- Add upstream patch: Fix rpc control_exchange regression. +- Remove workaround for missing l3_agent.ini + +* Thu Nov 01 2012 Alan Pevec 2012.2-2 +- l3_agent not disabling namespace use lp#1060559 + +* Fri Sep 28 2012 Robert Kukura - 2012.2-1 +- Update to folsom final +- Require python-quantumclient >= 1:2.1.1 + +* Tue Aug 21 2012 Robert Kukura - 2012.1-8 +- fix database config generated by install scripts (#847785) + +* Wed Jul 25 2012 Robert Kukura - 2012.1-6 +- Update to 20120715 essex stable branch snapshot + +* Mon May 28 2012 Pádraig Brady - 2012.1-5 +- Fix helper scripts to use the always available openstack-config util + +* Mon May 07 2012 Pádraig Brady - 2012.1-4 +- Fix handling of the mysql service in quantum-server-setup + +* Tue May 01 2012 Pádraig Brady - 2012.1-3 +- Start the services later in the boot sequence + +* Wed Apr 25 2012 Pádraig Brady - 2012.1-2 +- Use parallel installed versions of python-routes and python-paste-deploy + +* Thu Apr 12 2012 Pádraig Brady - 2012.1-1 +- Initial essex release