To this aim the ORM session mapper must be used.
This patch simply uses context.session.delete rather than
query.delete, and handles UnmappedInstanceError to safely
complete the operation when the record is deleted by
another transaction.
Change-Id: I55c701fc1e2fda4461501aae532bbe11cce45b75
Closes-Bug: #1497459
For every router interface added to a router
with a default gateway there will be an internal
SNAT port generated and will be required by the
L3 Agent to process the SNAT rules.
This bug was introduced by the change ID below
Icc099c1a97e3e68eeaf4690bc83167ba30d8099a.
When the gateway is removed these ports have to
be removed from the namespace. These ports are
cached in the router_info and should be provided
to the get_snat_port_for_internal_port function
when called from external_gateway_removed or when
called from _dvr_internal_network_removed.
This patch fixes this problem.
Closes-Bug: #1496578
Change-Id: Id5af4774ba246e24f343f5623af5ea9143bd5f6b
_TestModelMigrationTest contain some duplication of code from oslo.db.
As change 94d583acde16860e7ca535bd7a960e8993cd12d2 was merged and
included in oslo.db 2.4.1 this duplication can be avoid.
Change-Id: I5e789fb2fd6a27c1778b6155afc3d0396ccb5cb9
Pecan defines several efficient mechanism for routing requests to
the appropriate controller, but the current code for Neutron's
Pecan WSGI server basically uses Pecan hooks to route requests.
This patch partially fixes that, removing the 'resource_identifier'
pecan hook and replacing it with explicit pecan routes between
controllers added at resource registration time.
All the remaining hooks, like attribute_population and
policy_enforments, which were relying on finding the resource
name in the pecan.request threadlocal variable have been updated.
This patch also:
- ensures the appropriate plugin is always selected for a given
resource
- add a common NeutronPecanController base class for the classes
CollectionsController and ItemaController
- Fixes the way in which plurals and singulars are handled in
neutron.api.v2.resource_heper
Change-Id: I4ec0d2276c3974117b497228d289c3fb0dc5a140
Have you ever wondered why you were making the same mistakes
over and over again and wondered how you can remind yourself not
to repeat them again?
Have you ever felt like you posted review comments on some other
patch, only to see that the same anti-pattern was adopted in
someone else's?
Have you wondered what the heck that test was meant to validate?
Does that sound familiar to you? Yes? Great, we have the answer
for you! 'Effective Neutron' is the solution to all your problems!
From now on, everytime you bang your head against the monitor, do
not despair! You may find the answer to your grief in our collective
guide!
Go check it out!
(Your mileage may vary -- add your disclaimer here)
Change-Id: If1b8c1d04e1204985a4f9febb775c4fdb20305e9
All stop() calls of instances of AsyncProcess class were sending
hardcoded SIGKILL signal to its process. This patch leaves the default
behavior to SIGKILL but offers any number to be sent to kill command.
Note: Internal private methods also got a new parameter which is not
appended. Given that those methods are private and thus not used
outside of the class, we can afford it.
Change-Id: Ib7b0273c134d59c6a50173d4c2eb35761fcd3d62
Related-Bug: #1487548
The if statement for calling create_rtr_2_fip_link and kicking
the FW agent includes a check on floating_ips, that has already
been performed by the previous if block. Pull this block into
the previous block for code clarity.
Change-Id: I8661aa3998bda9341f558d0ecbc8e2663cd95aca
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
Co-Authored-By: Brian Haley <brian.haley@hpe.com>
- This change re-adds the definition of the VIF_TYPE_VHOST_USER
constant to the neuton portbinding extension.
- This change enables reuse of a single common VIF_TYPE_VHOST_USER
constant between all agents and mechanism drivers that wish
to support the qemu vhost-user interface type.
Change-Id: If92afb03f91a9092657e5b50c058f258952bafd8
Partial-Bug: #1477611
As the Pecan server only server REST requests over HTTP, this
patch introduces a new server implementing the RPC over AMQP
endpoints for agent/server communication.
However, the REST server does not yet have the ability to send
notifications to the RPC server or directly to the agents.
This patch simply adapts the ML2 plugin to run the RPC notifiers
only when initialized in the pecan server, so that notification
to agents can still be sent.
This patch therefore is tantamount to a poor man's
implementation of REST/RPC separation which will be iteratively
improved.
Change-Id: Ie471869d9b2793acdc412f13507038433f6a72c6
This needs to be removed before the merge back into
master so people don't start proposing patches to the
feature branch by default.
Change-Id: Ia14afe104b38a9b16fd3dc964686a733061d7e5c
Previously, it was possible for None to be passed to context.session.delete()
if a port was not found (usually a result of a concurrent delete). This
resulted in an UnmappedInstanceError. This is avoided now by calling
query.delete() directly which does not raise any exceptions.
Change-Id: I3b9f513308d90874ac8e8a7f6345697978d4920f
Closes-bug: #1496554
Adding a constraint to a table shouldn't be restricted
to an expand operation. There can be contraction migrations
required before the constraint can be safely added (e.g. inserting
records into the target table of the constraint).
Change-Id: I1963facaa6ab1916d92c044f90b6c00291f00ab9
Network devices, like internal router legs, or dhcp ports
should not be affected by bandwidth limiting rules.
This patch disables application of network attached policies
to network/neutron owned ports.
Closes-bug: #1486039
DocImpact
Change-Id: I75d80227f1e6c4b3f5fa7762b8dc3b0c0f1abd46
This reverts commit 4f1fb05959b211c0edc52021af8774a163aa518c.
Merge of master went in so this can be re-applied and have the
conflict resovled.
Conflicts:
neutron/server/__init__.py
Change-Id: I917e89b2191b3d4646e66a7a313783a56cf0ace5
Now tempest-lib provides token_client modules as library and the
interface is stable. So neutron repogitory doesn't need to contain
these modules.
This patch makes neutron use tempest-lib's token_client and removes
the own modules for the maintenance.
Change-Id: Ieff7eb003f6e8257d83368dbc80e332aa66a156c