This dictionary does not belong to the plugins directory as it captures
API business, but practically speaking it does not even deserve to exist
and can be removed altogether.
This is patch one in a series that aims at addressing this monkey business.
A missing entry causes a KeyError that leads the server to blow up during
startup. We can fallback on an empty path (like some services do), in case
the prefix is not specified.
Furthermore, we can be declarative with this property, the same way we are
with properties like aliases, bulk support, etc.
Carl Baldwin [Tue, 30 Jun 2015 20:23:39 +0000 (20:23 +0000)]
Refactor IpRuleCommand to take more arguments
The iproute2 rule command takes more arguments than the ones supported
by this wrapper. Particularly, for address scopes, we're interested
in iif and fwmark. Instead of adding these piecemeal, this change
makes the wrapper flexible to pass any of them using kwargs.
Callers of add / delete are updated to pass keyword arguments for
table and priority since they are no longer required positional
arguments. This looks better anyway.
John Schwarz [Thu, 2 Jul 2015 09:32:05 +0000 (12:32 +0300)]
QoS extension fixes
This patch introduces small fixes to the QoS extensions:
1. Adding a common tenant_id field for QoS API calls.
2. Making sure the function interface is correct.
Co-Authored-By: Irena Berezovsky <irenab.dev@gmail.com>
Change-Id: If9c7a7b9b8a5d2367d8f3225fbf07d8e3ec8865d
devref: document API status for neutron.openstack.common.*
Make sure we document the fact that neutron.openstack.common.* contents
are not meant to be used by external repositories (except, temporarily,
*aas repos).
If I could bootstrap the oslo-incubator subtree from scratch, I would
put it under neutron._openstack, to indicate that it's for internal
usage only. But we can't do it now, so instead I update devref.
Moshe Levi [Wed, 24 Jun 2015 15:10:05 +0000 (18:10 +0300)]
AgentExtensionsManager and AgentCoreResourceExtension
This patch introduces the following classes:
L2Agent - abstract class for common L2Agent implementions.
AgentExtensionsManager - to load AgentCoreResourceExtension.
AgentCoreResourceExtension - interface class to define
the AgentCoreResourceExtension API.
This allows better segregation between L2 Agent Core
and L2 Agent Extensions.
The patch is missing unit test but it was tested manually.
I added a unit tests @TODO comments to come back
to them later.
Miguel Angel Ajo [Thu, 11 Jun 2015 13:21:28 +0000 (15:21 +0200)]
Generic rpc callback mechanism which could be reused
This is a publisher/subscriber messaging mechanism optimized
for agent consumption and server production without the need
of creating new rpc messages when new resources are introduced.
Oslo versionedobjects are the perfect match to ensure
cross version compatibility even if the published/subscribed
resources format change over time.
This is still a basic stub allowing get_info of the resources,
and the next change will introduce the RPC methods to call
get_info: I0ac8a009e781b6edb283d8634b1a2f047db092dc
The plugin is returning stub objects to be consumed from the
agent to test the basic behaviour until we have DB.
TODO: Update documentation, according to code changes,
enforce versioned objects only doing deserial/serialization.
Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com> Co-Authored-By: Eran Gampel <eran@gampel.net>
Change-Id: I524cf5a14e99dc6bee4d4261557d98c75efa0809
Pavel Bondar [Thu, 25 Jun 2015 13:32:22 +0000 (16:32 +0300)]
Collapse create_subnet into single method
Previously create_subnet called different methods for subnet allocation
with subnetpool and without it.
_create_subnet_from_implicit_pool and _create_subnet_from_pool
were collapsed into single method _create_subnet.
This is intermediate step for supporting pluggable ipam.
Kevin Benton [Thu, 2 Jul 2015 08:45:46 +0000 (01:45 -0700)]
Downgrade log level for gone port on status update
If a port is deleted immediately before a status update arrives
from the L2 agent, the port will be missing from the DB. The current
code was logging this at the warning level, but this occurs during
normal operations so it should only be a debug event.
Mike Kolesnik [Tue, 30 Jun 2015 12:21:30 +0000 (15:21 +0300)]
Add extension callbacks support for networks
Add callbacks for extention to the network resource so that interested
extensions can do custom logic when a network is created or updated.
Currently it will be done the same way port notifications are done -
i.e. only in ML2 plugin. We can revisit this in a floow up patch if the
whole notification logic should be moved somewhere else as this merits
further discussion which is out of scope for a mere patch.
Kevin Benton [Wed, 1 Jul 2015 20:06:38 +0000 (13:06 -0700)]
Change the half of the bridge name used for ports
The code to generate the names of the patch ports
was based on a chunk of the bridge name starting from
the beginning. With the long suffix, this ended up
excluding all of the random characters in the name.
(e.g. br-int374623235 would create an interface br-in-patch-tun).
This meant that if two tests using patch interfaces ran together,
they would have a name collision and one would fail.
This patch updates the patch port name generation to use the
randomized back portion of the name.
Patch 4e77442d5 added a retry decorator to the API layer
to catch DB deadlock errors. However, when they occur, the
retried operation ends up being ineffective because the original
body has been altered, which leads the notification and validation
layers to barf exceptions due to unrecognized/unserializable elements.
This ultimately results to an error reported to the user.
To address this, let's make a deep copy of the request body, before
we pass it down to the lower layers. This allows the decorator to
work on a pristine copy of the body on every attempt. The performance
impact for this should be negligible.
Ramanjaneya [Wed, 24 Jun 2015 11:54:11 +0000 (17:24 +0530)]
QoS: db models and migration rules
This patch includes db models and migration rules for initial QoS objects.
Comparing to the spec, it adds two more service tables to maintain links
between networks and ports and their respective policies. We maintain
uniqueness as a unique constraint.
In some parallel world, we could have an additional field for networks
and ports that could be nullable to point to a policy. That said, it
breaks qos isolation a bit, and will also be a bit more painful if and
when we decide to spin out qos service pieces outside the tree.
blueprint quantum-qos-api
Co-Authored-By: Ramanjaneya <ramanjieee@gmail.com> Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com> Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com> Co-Authored-By: Miguel Angel Ajo <mangelajo@redhat.com>
Change-Id: I55a7dac602e2e770c21b6c7957430cb7115e5bdc
Robert Collins [Mon, 29 Jun 2015 21:40:17 +0000 (09:40 +1200)]
Improve fixture usage.
There were two broad issues with fixtures.
Firstly, the 'SafeFixture' workaround for resource leaks in fixtures
<1.3 is not needed if we depend on fixtures>=1.3.1. While testtools
may raise a TypeError when trying to query a fixture that failed to
setup, this is only ever a cascading failure - it will not cause
tests to fail, cause leaks, or cause tests to incorrectly pass. That
will be fixed in testtools soon to stop it happening (but as it cannot
affect whether a test passes or fails or leaks happen there is no
reason to wait for that). Leaks are seen with fixtures 1.3.0 still
because eventlet raises a BaseException subclass rather than an
Exception subclass, and fixtures 1.3.0 didn't handle that - 1.3.1 does.
Secondly, some of the fixtures had race conditions where things were
started and then cleanups scheduled. Where possible I've fixed those,
but some of them require more significant work to fully address.
Assaf Muller [Tue, 30 Jun 2015 17:22:17 +0000 (13:22 -0400)]
Disable pylint job
Disabling pylint until it gets unbroken. Pylint 1.4.1 is using
logilab-common, which had a release on the 30th, breaking pylint.
Pylint developers are planning a logilab-common release tomorrow
which should unbreak pylint once again, at which point I'll
re-enable pylint.
Sean M. Collins [Tue, 30 Jun 2015 16:06:07 +0000 (12:06 -0400)]
Remove bridge cleanup call
Remove the bridge cleanup call to delete bridges, since we are seeing
race conditions where bridges are deleted, then new interfaces are
created and are attempting to plug into the bridge before it is
recreated.
Russell Bryant [Tue, 26 May 2015 21:07:37 +0000 (17:07 -0400)]
Move windows requirements to requirements.txt
Commit 276028cca26af573c14938255e40c58358eabd4a added these
requirements to setup.py from a custom build hook. These requirements
can now be expressed in requirements.txt. We need to move them there
so that the global requirements sync job can continue to keep setup.py
in sync with the global version.
Kevin Benton [Tue, 30 Jun 2015 05:24:22 +0000 (22:24 -0700)]
Increase ping count on ARP spoof test
The other IPv4 tests all have a count of 2 to tolerate
ping failures due to slow ARP response/interface setup/etc.
This patch increases test_arp_spoof_allowed_address_pairs_0cidr
to 2 to match.