Commit Graph

115 Commits

Author SHA1 Message Date
Boden R 68fd13af40 remove neutron.common.exceptions
Today the neutron common exceptions already live in neutron-lib and are
shimmed from neutron. This patch removes the neutron.common.exceptions
module and changes neutron's imports over to use their respective
neutron-lib exception module instead.

NeutronLibImpact

Change-Id: I9704f20eb21da85d2cf024d83338b3d94593671e
2019-02-01 14:35:00 -07:00
Boden R 72cf434b16 shim remaining common exceptions
The remainder of the neutron.common.exceptions were rehomed into
neutron-lib with [1]. This patch shims them in neutron to reference
those in neutron-lib thereby allowing consumers to move over to them
at their leisure. Once everyone is over to lib's version of the
exceptions we can remove them from neutron.

[1] https://review.openstack.org/#/c/628004/

Change-Id: I6af654a9854fb09353e7aa48b96a533490da6e96
2019-01-25 08:52:33 -07:00
LIU Yulong 00bf365025 [L3][QoS] Neutron server side router gateway IP QoS
This patch enables to bind a QoS policy to the router gateway,
then in L3 agent side SNAT traffic for the VMs without floating
IPs can be limited under the policy bandwidth rules. This is
suit for all kinds of L3 routers: DVR, DVR with SNAT HA, L3 HA
and Legacy.

API update router gateway json:
{
router": {
  "external_gateway_info": {
    ...
    "qos_policy_id": "policy-uuid"
    }
  }
}

Depends-On: https://review.openstack.org/#/c/567497/

Partially-Implements blueprint: router-gateway-ip-qos
Closes-Bug: #1757044
Related-Bug: #1596611
Change-Id: I26e22bce7edd1f93b2ac0048b61b14f858938537
2018-12-01 17:45:46 +08:00
Boden R e33300a981 use TenantIdProjectIdFilterConflict from neutron-lib
The TenantIdProjectIdFilterConflict exception lives in neutron-lib now
and is not used anywhere in neutron. This patch removes the
TenantIdProjectIdFilterConflict class from neutron.

NeutronLibImpact

Change-Id: I0b56973f7500ce236b29ab858047f65d704347e1
2018-09-17 10:19:22 -06:00
Zuul 60463d65c4 Merge "Fix neutron-openvswitch-agent Windows support" 2018-08-27 15:53:28 +00:00
Boden R 4bd2f0e8f7 shim neutron rpc with neutron-lib
The common rpc and exceptions were rehomed into
neutron-lib with [1]. This patch shims those rehomed
modules in neutron to switch over to neutron-lib's
versions under the covers.

To do so:
- The rpc and common exceptions are changed to
reference their counterpart in neutron-lib effectively
swapping the impl over to neutron-lib.
- The fake_notifier is removed from neutron and lib's
version is used instead.
- The rpc tests are removed; they live in lib now.
- A few unit test related changes are required
including changing mock.patch to mock.patch.object,
changing the mock checks for a few UTs as they don't
quite work the same with the shim in place.
- Using the RPC fixture from neutron-lib rather than
that setup in neutron's base test class.

With this shim in place, consumers are effectively using
neutron-lib's RPC plumbing and thus we can move consumers
over to neutron-lib's version at will. Once all
consumers are moved over we can come back and remove
the RPC logic from neutron and follow-up with a consumption
patch.

NeutronLibImpact

[1] https://review.openstack.org/#/c/319328/

Change-Id: I87685be8764a152ac24366f13e190de9d4f6f8d8
2018-08-22 11:20:53 -06:00
Boden R d7942945c9 use get_port_binding_by_status_and_host from lib
The get_port_binding_by_status_and_host function was rehomed into
neutron-lib with https://review.openstack.org/#/c/580786/ and released
in neutron-lib 1.18.0. This patch consumes the function by removing it
in neutron and replacing all uses with lib's version.

NeutronLibImpact

Change-Id: Iac3246d0eb59709749e0b7e857091447d11a0133
2018-07-30 07:10:23 -06:00
Claudiu Belu fee630efaa Fix neutron-openvswitch-agent Windows support
Currently, the neutron-openvswitch-agent does not start on Windows
due to Linux specific imports. This patch addresses this issue.

Also, we're wrapping the object returned by subprocess.Popen using
tpool.Proxy in order to prevent IO operations on the stream
handles from blocking other threads. Currently, the ovs db monitor
blocks the whole process.

Closes-Bug: #1775382

Co-Authored-By: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Change-Id: I8bbc9d1f8332e5644a6071f599a7c6a66bef7928
2018-07-18 14:41:21 +03:00
Jakub Libosvar f7b62a7f29 Multiple port binding for ML2
Functionality is added to the ML2 plugin to handle multiple port
bindings

Co-Authored-By: Anindita Das <anindita.das@intel.com>
Co-Authored-By: Miguel Lavalle <miguel.lavalle@huawei.com>

Partial-Bug: #1580880

Change-Id: Ie31d4e27e3f55edfe334c4029ca9ed685e684c39
2018-07-13 18:14:50 -05:00
Boden R 2b3fdc871c remove unused common exceptions
This patch removes a handful of unused exceptions from
neutron.common.exceptions as follows:

The following exceptions already live in neutron-lib and are thus
duplicates in neutron:
PlacementEndpointNotFound
PlacementResourceProviderNotFound
PlacementInventoryNotFound
PlacementAggregateNotFound
PlacementInventoryUpdateConflict
NetworkVlanRangeError
PhysicalNetworkNameError
MacAddressGenerationFailure

The following exception is not used anywhere today:
TenantNetworksDisabled

NeutronLibImpact

Change-Id: Ie8227954681292ead1da0dedc950c54028ce84f1
2018-04-09 15:08:05 -06:00
Sławek Kapłoński a91d84cfb4 Fix error message when duplicate QoS rule is created
When user tries to create QoS rule which already exists in same
QoS policy, only check if rule is duplicated was done on DB layer.
Because of that, there was many retries of DB operations so user
waits to response from Neutron server long time.
Also error message returned from this DB related exception was not
user friendly.

This patch adds additional check of such duplicated rules before
there is attempt to save new/updated rule in database so in case
of error, response is send to user faster and it has proper
message.

Change-Id: I7d55df1eb931583c3dde064e073deb3e5479acc2
Closes-Bug: #1746526
2018-02-13 10:16:02 +01:00
LIU Yulong 8fcda21a06 [L3][QoS] Neutron server side Floating IP QoS
Add qos_policy_id to floating IP, then the user could set/update
the binding QoS policy of a floating IP.

APIImpact: a new parameter qos_policy_id was added to floating IP
related API.

Partial-Bug: #1596611
Partially-Implements blueprint: floating-ip-rate-limit
Change-Id: I4efe9e49d268dffeb3df4de4ea1780152218633b
2017-11-29 16:45:38 +08:00
LIU Yulong f40128b437 [L3][QoS] Adding L3 rate limit TC lib
This is the TC lib utils for L3 IP QoS implementation.
For more detail please see [1]: L3 agent side TC rules.

[1] https://review.openstack.org/#/c/374506/

Partially-Implements blueprint: floating-ip-rate-limit
Related-Bug: #1596611
Change-Id: Icfec83ca6dc31d7283d9c6c6ef0997d5e60daae6
2017-11-15 09:44:05 +00:00
Jenkins d37f0652b9 Merge "Remove unused exceptions" 2017-07-12 14:06:23 +00:00
Viktor Varga 8e5128e27a Remove unused exceptions
There are four exceptions (TenantNetworksDisabled,
InvalidExtensionEnv, DvrHaRouterNotSupported,
MissingMinSubnetPoolPrefix) that are not used in Neutron, thus
unnecessary to have them in neutron/common/exceptions.py.

- TenantNetworksDisabled was added in [1] to Quantum, and was
  raised when the tenant network type was TYPE_NONE.
  It was used in the openvswitch and linuxbridge plugins in Quantum,
  but now there are no occurrences of usage.
  It is still used in the Neutron plugin of OpenContrail though,
  so complete removal may be inappropriate right now.

- InvalidExtensionEnv (previously InvalidExtenstionEnv, renamed in
  [2a]) was added in [2b] to Quantum. It was raised when the
  appropriate quota driver was not provided, thus the extension
  environment was invalid. The usage was removed in [2c].

- DvrHaRouterNotSupported was added in [3a], and was raised when the
  router was both DVR and HA (it was not supported by that time).
  The usage was removed in [3b].

- MissingMinSubnetPoolPrefix was added in [4]. I did not find any
  prior usage of this exception.

This patch removes the last three exceptions from exceptions.py,
and adds a note to the first about possible removal in the future.

[1]: https://review.openstack.org/#/c/12362/

[2a]: https://review.openstack.org/#/c/23902/
[2b]: https://review.openstack.org/#/c/10484/
[2c]: https://review.openstack.org/#/c/23406/

[3a]: https://review.openstack.org/#/c/143733/
[3b]: https://review.openstack.org/#/c/196893/

[4]: https://review.openstack.org/#/c/148698/

Change-Id: Id47044e1feea4aea0d375b922aea7bd6cc50ac08
2017-07-11 14:16:21 +02:00
Rodolfo Alonso Hernandez 188aee25c6 Add QoS policy network binding OVO
Added QoS policy network binding OVO. Direct access to
'qos_network_policy_bindings' DB table is removed.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I2a2037dae5a071bd220fa04b0988bc8e7172eb59
2017-07-07 10:53:04 +01:00
Jenkins 94d32069cd Merge "Add QoS policy port binding OVO" 2017-07-06 17:59:09 +00:00
Luong Anh Tuan d5da2b5677 Remove unused class 'QoSPolicyDefaultNotFound'
This patch removes the dead code from neutron.

Change-Id: If5c7b0c81280218fe46f6c06076e9b268fd83d5f
2017-06-12 18:00:04 +07:00
Rodolfo Alonso Hernandez 034a7a6f2d Add QoS policy port binding OVO
Added QoS policy port binding OVO. Direct access to 'qos_port_policy_bindings'
DB table is removed.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I40268f84bef808dcebd5c123fafc7a50a4d036f4
2017-06-09 18:21:36 +00:00
Rodolfo Alonso Hernandez 9d69822e43 Add "default" behaviour to QoS policies
This patch implements the "default" behaviour for QoS policies.
If this flag is enabled for a QoS policy in a project, all
new networks created will have this QoS policy assigned by default.

If a new QoS policy is created or updated with this flag and another
QoS policy in the same project is set as the default policy, the new
one won't be created or updated. To set another QoS policy as default,
the current one must be unset.

DocImpact: A "default" flag is introduced for QoS policies. If this flag
           is enabled in a QoS policy (attached to a project), then all
           networks created in this project would have this QoS policy
           assigned, unless an explicit policy is specified.
APIImpact

Closes-Bug: #1639220
Change-Id: If5ff2b00fa828f93aa089e275ddbd1ff542b79d4
2017-05-26 23:31:36 +00:00
Miguel Angel Ajo 45fd7eef6e Add precommit calls to the QoSDriver class
Added create, update and delete precommit calls for QoS
driver, to be used by some out-of-tree backends.

Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com>
Co-Authored-By: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>

Closes-Bug: #1657381
Change-Id: I44dd7e049eab054363063021f07ade81ef2d1a90
2017-05-23 10:59:56 +01:00
Reedip a7e6d3b175 Add check for Bandwidth Limit Rules
Currently it is possible to create 2 rules in the same policy
where the Max Bandwidth ( from the Bandwidth Limit Rule ) can
be less than Minimum Bandwidth defined in ( Minimum Bandwidth
Rule) , which can be pretty confusing.
This patch raises an exception if such an issue occurs.

Change-Id: Ib748947bcd85253aa22e370a56870afbfbafa19b
Closes-Bug: #1667138
2017-05-17 03:51:35 +00:00
Sławek Kapłoński e2226fe373 Improve validation of supported QoS rules
New way of validation of QoS policy can be applied on port/network based on
port_types. It can validate if port can support rule by rule_type and also by
rule parameters or some values of parameters.

For example bandwidth_limit_rule can have parameter "direction" with
possible values "ingress" and "egress". Some of mechanism drivers can support
only one of those directions.

If user will try to apply policy with rule unsupported by port_type then it
will get error message and policy will not be applied.
Such validation is made during:
* port create
* port update
* network update
* QoS rule create
* QoS rule update

Co-Authored-By: Miguel Angel Ajo <majopela@redhat.com>

Implements blueprint qos-rules-validation
Closes-Bug: #1586056

Change-Id: I75bd18b3a1875daa5639dd141fb7bbd6e1c54118
2017-04-02 16:33:11 +00:00
Miguel Lavalle 5cbdd10b21 Routed networks IPv4 inventory in Nova GRP
Using Nova's generic resource pools (GRP) API, publish routed networks
IPv4 inventory. This inventory is then used by the Nova scheduler to
place instances based on the availability of IPv4 addresses in
routed networks segments.

Change-Id: Ib6b00c4889d6a34765844ce46280819dff0108c5
Partially-Implements: blueprint routed-networks
2017-01-20 15:32:35 -06:00
Miguel Lavalle ebe62dcd33 Add a ReST client for placement API
This patchset adds a ReST client for the placement API. This
client is used to update the IPv4 inventories associated with
routed networks segments. This information is used by the
Nova scheduler to decide the placement of instances in hosts,
based on the availability of IPv4 addresses in routed
networks segments

DocImpact: Adds [placement] section to neutron.conf with two
           options: region_name and endpoint_type

Change-Id: I2aa614d4e6229161047b08c8bdcbca0e2e5d1f0b
Partially-Implements: blueprint routed-networks
2017-01-17 16:41:46 -06:00
Henry Gessau b0e56ac646 Retire deprecations for constants, exceptions, attributes
Subprojects have had enough time to switch to neutron-lib for
the deprecated items from these modules.

Change-Id: Ib2f4acf7e0153667389c57a52f2db33a23758b24
2016-11-09 23:43:38 -05:00
Henry Gessau 99cfd671be debtcollector for globals
The deprecation shim created by Doug turns out to be rather useful.
It emits a warning when an global (attribute of a module) is
referenced but that global has been moved to another module.

This update makes the following changes to the shim:

 - Rename it to _MovedGlobals to better describe what it is a
   debtcollector for.

 - Use inspect to get the original reference and to check that
   _MovedGlobals is called from the last line of a module.

 - Save the old reference automatically in the instance to prevent it
   from getting garbage collected.

 - Beef up the _moved_global() method for moving/renaming individual
   globals, allowing it to move and rename or rename in place.

Change-Id: I868aa4a3129dd05467a103364088efbb86bc5d0f
2016-08-30 10:18:19 -04:00
Gary Kotton 9f09f27c5d Fix deprecation warnings
Remove deprecation warnings for various constants
and exceptions that have moved to neutron_lib.

Fix miscellaneous other deprecations.

Uses constants instead of l3_constants when importing
neutron-lib constants.

Co-Authored By: Henry Gessau <gessau@gmail.com>
Co-Authored By: Gary Kotton <gkotton@vmware.com>

Change-Id: Ib0e8ff5c3e23677c1009241a1818cbc8a3430c38
2016-08-26 22:16:06 -04:00
Ihar Hrachyshka f13ed8c506 objects: introduce a util function to handle tenant_id filter
Objects will directly support project_id filters only. The tenant_id
property is provided for mere convenience, and does not serve for
filtering purposes. So every time we'll need to pass filters from API
that still supports tenant_id attribute filtering, we'll need to do the
filter conversion.

This patch introduces the util function that will later be used by
other objects, like subnet, security group, or subnetpool (for the
latter, once we convert its existing tenant_id field to project_id).

Change-Id: If82c180688e1ecdff1c8a6e29cb8668838ac0a5b
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2016-08-03 08:42:38 +00:00
Jenkins 5c7aecd999 Merge "Respond negatively to tenant detachment of enforced QoS policies" 2016-06-15 16:14:23 +00:00
Kevin Benton f7a0c0b044 Convert multiple exception types in the API
The callback framework will collect all exceptions that occur
during the notification loop and raise a single exception
containing all of them. The issue with this is that the code
that notifies has to manually unpack the exceptions and choose
what to reraise for the API layer even if it has no other reason
to catch the exception (i.e. any encountered exceptions should be
fatal). If it doesn't, the server will just return a generic HTTP
500 error to the user even if the internal exception is a normal
error that would convert to a 404, 409, etc.

This patch makes the API exception conversion layer aware of
exceptions containing other exceptions so code no longer has to
catch callback failures if it has no specific error-handling logic.

Multiple exceptions that translate to the same HTTP error code will
be converted into one exception of the same error code with the
details of each exception line-separated in the exception message.

Multiple exceptions that translate to different HTTP error codes will
be concatenated together line-separated with their HTTP error prefixes
into an HTTP Conflict exception.

If there is only a single exception in the multi exception type, the
inner exception is used directly.

Partially-Implements: bp/multi-l3-backends
Change-Id: I528de088079b68cf284ef361fee9bd195125e0d8
2016-06-08 16:54:24 -07:00
SongmingYan 99ddc7af60 Fix two spelling mistakes
This fix the spelling mistakes of "prirorities" and "exceptionss".

Change-Id: Ie572028d94a9e4daf284daab2809e9e7a8edd572
2016-05-30 01:58:04 +00:00
Tong Li 4ec6932c93 Respond negatively to tenant detachment of enforced QoS policies
Currently when the tenant attempts to detach an enforced QoS policy
for a port or network set by admin, the attempt fails but the API
feedback indicates that it was successful.  This change will
fix the API response so the failure is accurately signalled
to the tenant.

Co-Authored-By: litong01 <litong01@us.ibm.com>
Co-Authored-By: gong yong sheng <gong.yongsheng@99cloud.net>
Co-Authored-By: Nate Johnston <Nate_Johnston@cable.comcast.com>
Co-Authored-By: Margaret Frances <margaret_frances@cable.comcast.com>

Change-Id: I977feecc6cce378abc1e6092afbaf9f2681b2ec6
Closes-bug: #1486607
2016-05-16 21:54:15 +00:00
Carl Baldwin 31861843d9 Remove old fwaas remnants from neutron
This was planned to be removed a long time ago but no one ever got to
it.  This shouldn't come as a surprise.

Closes-Bug: #1500960

Change-Id: I3a50d4c069dc54a7c86e7d79586d893a3ae31f2c
Co-authored-by: Ryan Moats <rmoats@us.ibm.com>
2016-04-27 16:48:29 -05:00
Jenkins b923b7a2c5 Merge "Remove two exceptions already in neutron-lib" 2016-04-20 01:47:49 +00:00
liusheng d76a174d57 Remove two exceptions already in neutron-lib
Since the InvalidIpForNetwork and InvalidContentType exception definitions
have already defined in neutron-lib, we don't need them in Neutron code.

Change-Id: I35afdf75a5e1fcb100f13f9ec3a0282192111e76
Signed-off-by: liusheng <liusheng@huawei.com>
2016-04-19 16:55:44 +08:00
reedip 9153527252 Return a 404 on quota delete if entry not found
If a tenant quota is not found, the delete operation should fail
with a 404 error. It currently returns 204 even if the delete
operation actually does not delete anything which is inconsistent
with other delete operations in the Neutron API.

APIImpact

Change-Id: I1cd91b5e06bd17f9aac97bba71228f2e5c48879b
Closes-Bug: 1307506
Co-Authored-By: Salvatore Orlando <salv.orlando@gmail.com>
2016-04-18 20:32:51 +00:00
Henry Gessau 9a4b7b8acf Remove unused PolicyFileNotFound exception
I could not find any use of this exception in Neutron,
nor in any other project. It has a bad message: the policy
file name is hard coded. The policy file name is a config
option so it could be anything.

It should have been deleted with https://review.openstack.org/123673

Discovered while picking exceptions to move to neutron-lib.

Change-Id: I4732d84186520be3286417579ee3e2528fcf53a3
2016-04-07 11:23:04 +00:00
Doug Wiegley 87a79256c4 Start using neutron-lib for shared constants and exceptions
Debtcollector warnings are enabled by an env var for now, to avoid blasting
everyone's unit tests at once.

Partially-Implements: blueprint neutron-lib
Depends-On: I6991464acc3aef99f6ec5eff56a893deaaefe40b
Change-Id: If183b7a6797834e29c377937fc06261aa3b00249
2016-02-10 16:41:18 -07:00
Ryan Tidwell 6894e7db22 Add explicit address family to AddressScope
Adds an ip_version field for enforcing an address family on
an AddressScope.  All SubnetPools in an AddressScope must be
from the same address family. A SubnetPool cannot be created
in an AddressScope with a different address family.

Change-Id: Ibc6de08e0ef58a5da954d13f274f6003012a76cd
Partially-Implements: blueprint address-scopes
2015-12-14 11:02:27 -08:00
Akihiro Motoki 2d8632e412 Use _ from neutron._i18n
Partial-Bug: #1520094
Change-Id: I874a4aa1d71d1f7034a1ff0b7450b419ef5c6864
2015-12-06 19:39:04 +09:00
Jenkins f3d99f5928 Merge "Avoid race condition for reserved DHCP ports" 2015-11-17 18:30:10 +00:00
Yalei Wang 2cef12aeb2 Add the missing arg of RetryRequest exception in _lock_subnetpool
RetryRequest exception defined in oslo.db need be called with a arg
which describes the inner exception. _lock_subnetpool method missed this
arg, and this patch adds it.

Change-Id: I44869c97ecd7d59d40d8793c71515067a237150b
Closes-Bug: #1506818
2015-11-17 07:47:40 +08:00
Eugene Nikanorov f76ef76f25 Avoid race condition for reserved DHCP ports
This patch introduces mechanism similar to compare-and-swap
for updating reserved DHCP port.

This addresses a case when two DHCP agents that start nearly at
the same time are assigned to one network and there is a reserved
DHCP port in the network. Then each of agents will try to use it
because agents don't check if reserved port is still available.
Reserved DHCP port can be acquired by different agent between calls to
get_active_networks and update_port, so this patch adds a check for
this case.

Change-Id: I0277ab537ff9d3a664c03ea291b9ec2b0e784dbb
Closes-Bug: #1425402
2015-11-16 17:16:51 +04:00
mohankumar_n d0235040dd Formatting exception messages
This patch addresses below nits for existing neutron exceptions.
 - Fix messages as appropriate.
 - Remove additional spaces.
 - Add periods as appropriate.

Change-Id: I8cfb5b3b5e4fdc2bf1e50ab6d898cb4c21e7ced1
2015-10-26 12:46:33 +05:30
Assaf Muller a6d9580f2b Fix DVR downgrade exception / error code
Updating a distributed router back to a legacy router
should return error 400 (BadRequest), not error 500.

Closes-Bug: #1505346
Change-Id: Ia57e80107bd11ff7b38b89d30279603017913724
2015-10-17 18:30:16 +00:00
Jenkins 35a9d72f46 Merge "Enable most unit tests for py34 job" 2015-09-04 20:55:18 +00:00
Ihar Hrachyshka ef409d9da2 Enable most unit tests for py34 job
* Skip TestWSGIServerWithSSL[1] for Python 3 since it seems wsgi + ssl +
  eventlet setup does not behave correctly now,
* Skip test_json_with_utf8[2] until we solve unicode/utf8 encode/decode,
* Fix some more tests to pass for py3,
* Replace print by print() in docs/docstrings.

[1] neutron.tests.unit.test_wsgi (bug 1482633)
[2] neutron.tests.unit.test_wsgi.JSONDictSerializerTest (bug 1491824)

Related-Bug: #1482633
Related-Bug: #1491824
Blueprint: neutron-python3
Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
Co-Authored-By: sonu.kumar <sonu.kumar@nectechnologies.in>
Change-Id: I26e513d4dcf473f4cd79728382fc94af3d901b5d
2015-09-04 08:30:22 +00:00
Brian Haley a2f1c69d4c Defer freeing of conntrack zone ids until allocation fails
Instead of freeing the conntrack zone ids from removed ports
right before allocating a new one, wait until there is an
allocation error.  This removes the overhead from the initial
zone id creation.  Since there are 64K zone ids we might not
ever need to clean stale ones anyway.

Change-Id: Ie2d33f8d4650b7798d4ffdeb3ea79cc1092d6c2c
2015-08-24 13:11:08 -04:00
Ihar Hrachyshka 70727ba781 Merge remote-tracking branch 'origin/feature/qos' into merge-branch
Note to reviewers: gerrit diff for merge patches is very limited, and
leaving comments in global section won't scale, so please comment here:

https://etherpad.openstack.org/p/qos-merge-back-review

This merge commit introduces QoS feature into Liberty release of
Neutron.

The feature is documented in: doc/source/devref/quality_of_service.rst
included with the merge patch.

It includes:

- QoS API service plugin with QoS policy and QoS bandwidth limit
  (egress) rule support;
- core plugin mechanism to determine supported rule types, with its ML2
  implementation;
- new agent extension manager;
- QoS agent extension with pluggable backend QoS drivers (Open vSwitch
  and SR-IOV support is included).

To extend network and port core resources with qos_policy_id attribute,
a new ML2 extension driver (qos) was introduced that relies on the QoS
core resource extension (the idea is that eventually we'll get a core
resource extension manager that can be directly reused by core plugins).

Agent-server interaction is based on:

- get_device_details() method that is extended with qos_policy_id;
- a new push/pull mechanism that allows agents and servers to
  communicate using oslo.versionedobjects based objects sent on the
  wire.

The merge includes the following types of test coverage:

- unit tests;
- functional tests for OVS agent, QoS agent extension, and low level
  ovs_lib changes;
- API tests to cover port/network qos_policy_id attribute and new QoS
  resources.

The client changes can be found at:

* https://review.openstack.org/189655
* https://review.openstack.org/198277

The team also prepared fullstack test but it needs to wait for client
merge before it can pass in the gate:

* https://review.openstack.org/202492

Gerrit does not show diff for merge changes that did not result in any
conflict, so to facilitate review, rely on the following steps:

- fetch the patch locally
- git fetch origin
- git diff origin/master...

This merge also disables qos extension API tests until the service is
enabled in master gate.

Local changes apart from conflicts:
- updated down_revision for qos migration to reflect master expand head;
- disabled qos API tests with gate_hook.sh until we have it enabled in
  master gate;
- bumped oslo.versionedobjects requirement to reflect what is in
  openstack/requirements' global-requirements.txt

DocImpact
APIImpact
Partially-Implements: blueprint quantum-qos-api
Partially-Implements: blueprint ml2-qos
Partially-Implements: blueprint ml2-qos-ovs-bwlimiting
Partially-Implements: blueprint ml2-sriov-qos-with-bwlimiting
Change-Id: I92916d0e391791187e9a25ff172fb4b3504857b1
2015-08-17 15:16:55 +02:00