Commit Graph

61 Commits

Author SHA1 Message Date
Brian Haley b1714a2b9d Fix some pylint indentation warnings
Running with a stricter .pylintrc generates a lot of
C0330 warnings (hanging/continued indentation). Fix
the ones in neutron/plugins.

Trivialfix

Change-Id: Id9138652f5f07ef12fa682e182fe210019e8f975
2022-11-03 22:27:55 -04:00
Rodolfo Alonso Hernandez eeb918e1b9 Add the corresponding DB context to all SQL transactions
The goal of this patch is to make the Neutron code compliant
with SQLAlchemy 2.0.

All SQL transactions must be executed inside an explicit
writer/reader context. SQLAlchemy no longer will create an
implicit transaction if the session has no active transaction.

A warning message, only available in debug mode, is added. When
an ORM session calls "do_orm_execute", if there is no active
transaction, a warning message with a traceback will be logged
to help to debug the regression introduced.

Related-Bug: #1964575

Change-Id: I3da37fee205b8d67d10673075b9130147d9eab5f
2022-04-08 09:09:54 +00:00
Rodolfo Alonso Hernandez ddd5832323 Remove "six" library
Last step to remove "six" library usage in Neutron.

Change-Id: Idd42e0c51c8c3bd598c9cf91602596be238bccae
2020-07-28 16:55:52 +00:00
Rodolfo Alonso Hernandez 6fa6e4135c Relocate _delete_expired_default_network_segment_ranges
Relocate "_delete_expired_default_network_segment_ranges" to avoid
code redundancy.

Now instead of searching all objects and deleting one by one,
"delete_objects" is used.

Trivial-Fix

Change-Id: I1753263cb15ce2988ac4ccae03b7395069f2c4e9
2020-07-02 17:26:10 +00:00
Rodolfo Alonso Hernandez ee47dd9770 All Neutron ML2 drivers use Allocation/Endpoints OVO
Now all Neutron ML2 drivers use OVO as input parameters to define the
allocation and the endpoints.

Reference of objects, inheritance, modifications made and presence in
other projects:
ML2TypeDriver (neutron-lib)
-> BaseTypeDriver
   -> FlatTypeDriver
   -> SegmentTypeDriver [1]
      -> VlanTypeDriver
      -> _TunnelTypeDriverBase
         -> TunnelTypeDriver [2]
         -> ML2TunnelTypeDriver
            -> EndpointTunnelTypeDriver [3]
               -> GeneveTypeDriver
               -> GreTypeDriver
               -> VxlanTypeDriver

[1] networking-avaya project inherits from SegmentTypeDriver, passing
    the DB object instead of the OVO. This project was retired.
[2] TunnelTypeDriver class is not used anymore. networking-cisco
    project imports this class if the version <= Ocata.
[3] networking-fujitsu project inherits from EndpointTunnelTypeDriver,
    passing the DB object instead of the OVO. This project was retired.

Change-Id: If23d52e7839edf065619c327dc0cf47b5b560bfb
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2020-05-23 12:12:44 +00:00
Brian Haley 08a60f7483 Remove usage of six.add_metaclass
With python 3.x, classes can use the metaclass= logic
to not require usage of the six library.

One step in removing all of six usage from neutron.

Change-Id: I2f815e412d9a96eb5faf2b3bb3a1e393a9db9309
2020-05-21 14:41:18 -04:00
Brian Haley 3e2b15f0d6 Add tunnel_ip_version to tunnel_sync() error message
Just to make it clear in the message, add the
tunnel_ip_version config option in the error
message, else the user has to consult the startup
message to know what the value is set to.

Trivialfix

Change-Id: Ic8d8b0d454e8202d1bfae52b77137eb9071508da
2020-04-01 20:51:32 -04:00
Alexandros Soumplis e4de8d0dd3 Improve log message on exception for invalid tunnel type
When a tunnel with an invalid or unsupported type is to be created an
exception is raised but does not contain info for the offending host.
Add the host info and tunnel ip address to the exception error message
for better debugging

Change-Id: Id989f20043c252ff61ab9a6ee227e8c9c7c5029b
Closes-Bug: #1863888
2020-02-26 10:33:46 -05:00
Brian Haley eaf990b2bc Fix pep8 E128 warnings in non-test code
Reduces E128 warnings by ~260 to just ~900,
no way we're getting rid of all of them at once (or ever).
Files under neutron/tests still have a ton of E128 warnings.

Change-Id: I9137150ccf129bf443e33428267cd4bc9c323b54
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2019-03-12 21:22:33 +00:00
Kailun Qin a01b7125cd Use network segment ranges for segment allocation
This patch makes necessary changes to ML2 type drivers and plugin
manager for network segment range extension support when it is loaded.

When the network segment range extension is not loaded, no impact to the
current flow.

When the extension is loaded,
- populating a range that is managed from the configuration file [1]_,
  such as "VLAN IDs", "VXLAN VNI IDs", "GRE tunnel IDs",
  "Geneve VNI IDs" to the network segment range DB table as a "default"
  and "shared" entry to maintain backward compatibility;
- reloading the "default" segment ranges when Neutron server
  starts/restarts;
- creating a set of "default" network segment ranges out of the
  ML2-config-file-defined ranges [1]_ and the segment allocation
  operations are always retrieving the information from the DB to have
  the network segment ranges fully administered via API;
- when a tenant allocates a segment, it will first allocate from an
  available segment range assigned to the tenant, and then a shared
  range if no tenant specific allocation is possible.

[1] /etc/neutron/plugins/ml2/ml2_conf.ini

Co-authored-by: Allain Legacy <Allain.legacy@windriver.com>

Partially-implements: blueprint network-segment-range-management
Change-Id: I522940fc4d054f5eec1110eb2c424e32e8ae6bad
2019-03-09 22:04:20 +00:00
Boden R e4aa5902f7 use context manager from neutron-lib
The neutron.db.api.context_manager already references neutron-lib's
context manager; so consumers of it are already using neutron-lib. This
patch switches neutron's references to the context_manager over to
use neutron-lib's directly rather than that in neutron.db.api.

NeutronLibImpact

Change-Id: I97120faeec73690592ed21a5ec3c6202f61e1429
2018-10-24 07:18:46 -06:00
Boden R e4348eb1e1 use retry_db_errors from neutron-lib
The externally consumed APIs from neutron.db.api were rehomed into
neutron-lib with https://review.openstack.org/#/c/557040/

This patch consumes the retry_db_errors function from lib by:
- Removing retry_db_errors from neutron.db.api
- Updating the imports for retry_db_errors to use it from lib
- Using the DB API retry fixture from lib in the UTs where applicable
- Removing the UTs for neutron.db.api as they are now covered in lib

NeutronLibImpact

Change-Id: I1feb842d3e0e92c945efb01ece29856335a398fe
2018-07-16 08:10:54 -06:00
Boden R 6fe35c8039 use get reader/writer session from neutron-lib
The get_reader_session and get_writer_session functions are available
in neutron-lib. This patch consumes them by removing the functions
from neutron and using lib's instead.

NeutronLibImpact

Change-Id: I4055172799a0d9a0ceb387b6d47e421e1c270ada
2018-07-06 14:43:31 -06:00
Zuul 7786f398fe Merge "Fix W503 pep8 warnings" 2018-04-18 05:58:39 +00:00
Boden R 410a83c89d use plugin common utils from neutron-lib
A bulk of the public APIs that are part of neutron.plugins.common.utils
were rehomed into neutron-lib with [1] and the remaining with [2].

This patch consumes [1] by:
- Removing the rehomed code from neutron.
- Removing the UTs that are no longer applicable.
- Leaving the functions in [2][3] in neutron.plugins.common.utils until
we release [2][3] and can consume it at which point we should be able to
remove the utils module.

NeutronLibImpact

[1] Iabb155b5d2d0ec6104ebee5dd42cf292bdf3ec61
[2] I2c0e4ef03425ba0bb2651ae3e68d6c8cde7b8f90
[3] I73f5e8ad7a1a83392094db846d18964d811b8bb2

Change-Id: I1d63cbea463e92e1d2e053f8e1a564ed52cb84f8
2018-04-17 12:06:28 -06:00
Brian Haley 90cd939047 Fix W503 pep8 warnings
Fix W503 (line break before binary operator) pep8 warnings
and no longer ignore new failures.

Trivialfix

Change-Id: I7539f3b7187f2ad40681781f74b6e05a01bac474
2018-04-17 14:22:58 +00:00
Boden R ef93f7e7f0 use common agent topics from neutron-lib
The neutron.common.topics module was rehomed into neutron-lib with
commit Ie88b84949cbd55a4e7ad06341aab77b286cdc485
This patch consumes it by removing the rehomed module from neutron
and using the module from neutron-lib instead.

NeutronLibImpact

Change-Id: Ia4a4604c259ce862597de80c6deeb3d408bf0e95
2018-03-13 11:35:50 -06:00
Boden R 95f1e03446 use plugin constants from neutron-lib
neutron-lib contains a number of the plugin related constants from
neutron.plugins.common.constants. This patch consumes those constants
from neutron-lib and removes them from neutron. In addition the notion
of the dummy plugin service type is moved strictly into the test
package of neutron since it's not a real service plugin.

NeutronLibImpact

Change-Id: I767c626f3fe6159ab3abd6a7ae3cb9893b79bf66
2017-10-16 09:32:20 -06:00
Inessa Vasilevskaya 7322bd6efb Make code follow log translation guideline
Since Pike log messages should not be translated.
This patch removes calls to i18n _LC, _LI, _LE, _LW from
logging logic throughout the code. Translators definition
from neutron._i18n is removed as well.
This patch also removes log translation verification from
ignore directive in tox.ini.

Change-Id: If9aa76fcf121c0e61a7c08088006c5873faee56e
2017-08-14 02:01:48 +00:00
Anindita Das 995e646b11 Integration of Allocation/Endpoints OVO
This patch integrates the Oslo-Versioned Objects created for
VlanAllocation, VxlanAllocation, VxlanEndpoints, GreAllocation,
GreEndpoints, GeneveAllocation and GeneveEndpoints into the
code base.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I0d592bae452876b24c28ca4cc4bf6392b5ab6493
Co-Authored-By: Victor Morales <victor.morales@intel.com>
2017-06-14 20:24:58 +00:00
Boden R fde6710515 use MechanismDriver from neutron-lib + shim
The ml2 MechanismDriver is now in neutron-lib along with its associated
constants. This patch switches over to the lib versions of those, but
leaves a shim of the MechanismDriver that just ref's the driver from
lib. This shim allows our broad consumer base of the driver to switch
over at their leisure.

NeutronLibImpact

Change-Id: I99e3de6d933a1bb341394f85415fb07306a82a01
2017-06-05 14:09:07 -06:00
Ann Kamyshnikova 8756cb7d99 New enginefacade for ports and sg groups
Use reader and writer for db operations.

Partially-Implements blueprint: enginefacade-switch

Depends-On: Iba3520ac6cfb6b82b2013df9b8e1aee64b10a11c

Change-Id: I50be115ea69f805b48b02aebe4259ec2c839830e
2017-04-10 07:40:43 +00:00
Duan Jiong c5f5bd0c4f Fix some reST field lists in docstrings
Probably the most common format for documenting arguments is reST field
lists [1]. This change updates some docstrings to comply with the field
lists syntax.

[1] http://sphinx-doc.org/domains.html#info-field-lists

Change-Id: I8fb91bcb8ae4bfbfa68ddf7c38a4f1f5cf548b36
2017-03-23 08:50:01 +08:00
Kevin Benton 99e5f4fb46 Get rid of custom wrap_db_retry call in sync_allocations
Just for consistency, get rid of the last direct call to
wrap_db_retry and instead use neutron.db.api.retry_db_errors
in the sync_allocations code so we don't potentially get
bitten by slight inconsistencies between the two.

TrivialFix
Related-Bug: #1673243

Change-Id: I975c7d0ec84698d277acbbec6d9cfec5c03439aa
2017-03-15 12:56:21 -07:00
Jenkins 8c8b71c1ef Merge "Lockless segmentation synchronization in ML2 type drivers" 2017-03-08 08:53:02 +00:00
Kevin Benton e53ebfc4f1 Lockless segmentation synchronization in ML2 type drivers
This eliminates with_lockmode update in the VLAN and tunnel
type drivers in ML2. This allows us to avoid carrying with_lockmode
logic into OVO.

Removing with_lockmode exposed us to two potential races. One is
two servers inserting duplicate records at the same time at startup.
The other is deleting an allocation right as it was allocated by
another server.

The first race is simply solved by the retry decorators already
present on the functions because they will catch the duplicate
entry exception and start over.

The second is solved in this patch for VLANs by issuing an UPDATE
WHERE query inside the transaction to update 'allocated' values
to False where allocated is already False. This effectively blocks
any unallocated records we are attempting to delete from being
concurrently allocated while the transaction is open [1] before
the DELETE is committed.

The solution for the tunnel driver is more explicit since it just
emits a bulk delete statement which we can just attach a WHERE
statement to in order to ensure we don't remove allocated records.

1. Once the SQL server has given us a row count for an update
   statement, it will not allow that count to be made invalid
   by another query. An attempt to change their values will
   result in directly blocking the changing query in a non-Galera
   deployment or a deadlock error on commit in Galera which
   we will retry.

Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
Change-Id: I4fa553ef07c3cb1d05554629e121e86527982349
2017-03-07 12:20:03 -08:00
Armando Migliaccio ca751a1486 Spin off context module
NeutronLibImpact

Partially-implements: blueprint neutron-lib

Change-Id: I48cf45dc1b07035d952152eac2548a3bd9fc2832
2017-03-06 16:25:29 +00:00
Ann Kamyshnikova 4f17f70089 Stop using legacy facade
Introduce get_reader_session() and get_writer_session()
and replace get_session() with them.
Mark get_session as depricated.

Stop using get_engine from legacy facade. Use writer engine for
places where it is required.

Partially-Implements blueprint: enginefacade-switch

Change-Id: I28b741bfa27bf04cbe273586e6e3e00e14fbe683
2017-01-19 13:02:33 +04:00
Ann Kamyshnikova df7e36c8c8 Change passing session to context for TypeDriver
We have a number of functions that expect to get session as one
of the arguments. Passing session is not correct and this prevents
of using new enginefacade which expects context to be passed and
session will be injected in current context.

NeutronLibImpact

Partially-Implements blueprint: enginefacade-switch

Change-Id: I68ac442f11a6698bc43210fae877ba3809b1c02d
2016-12-21 14:22:16 +04:00
Brian Haley 51a697817d Change tunnel MTU calculation to support IPv6
The IPv6 header is twice the size of the IPv4 header, 40 vs 20
bytes, but the tunnel overhead constants are static, only
accounting for an IPv4 header in all cases.  In order to be
correct it needs to treat the tunnel overhead different from
the IP overhead at L3.

This required removing the 20 byte IP overhead from the tunnel
type overhead constants and creating a new option,
ml2.overlay_ip_version, in order for the server to know which
version will be used, since it calculates the MTU for the network.
A version mis-match will now cause a tunnel sync to fail on
the server.

Moved all MTU tests to a common location to remove duplication.

DocImpact

Change-Id: Ia2546c4c71ff48b9fe2817fbad22b1fbf85f325b
Closes-bug: #1584940
2016-07-05 18:07:29 -04:00
Kevin Benton 948461c8b2 Check for StaleData errors in retry decorator
If an object is updated in a compare and swap fashion, it
can fail when the change is flushed and raise a
StaleDataError if another process has updated the SQL record
at the same time. We need to catch these with the retry
decorator to restart the update process in a new transaction
with a fresh read of the latest state.

Partially-Implements: bp/push-notifications
Change-Id: I151ffcf47926f5ac66e452974f87e8bc2a906151
2016-06-09 05:25:47 -07:00
John Perkins 972cdef50c Classes lack metaclass decoration
Add decorations where required.

There are roughly a dozen classes in Neutron that define abstract
methods or properties but are not decorated with
@six.add_metaclass(abc.ABCMeta). Without this decoration, children
can be created without defining the required methods or properties.

Decorating RBACColumns in db/rbac_db_models.py causes failures and will
be reported separately.

Decorating unit tests is of dubious benifit and should be addressed
separately (if at all).

There are also several more places where metaclassing isn't correct, to
be taken care of in follow-on patches.

For example, BaseScheduler is using the fact the None doesn't have a
filter_agents() method, which gives developers confusing error messages
when they incorrectly implement the interface, and they won't see any
error until schedule() is called. As an aside, the docstring for this
base class is also incorrect.

Change-Id: I2b2cce37d9b0d40559a715a7d510a969b8ba9963
Closes-Bug: #1577648
2016-05-05 13:31:15 -06:00
Henry Gessau ae5bad49cc Use exceptions from neutron-lib
Related-Blueprint: neutron-lib

Change-Id: Ia014468bd621c4ee6aea95bf19328c61070174c4
2016-04-21 21:29:44 -04:00
Akihiro Motoki 2d8632e412 Use _ from neutron._i18n
Partial-Bug: #1520094
Change-Id: I874a4aa1d71d1f7034a1ff0b7450b419ef5c6864
2015-12-06 19:39:04 +09:00
Doug Wiegley dd726ed494 Move i18n to _i18n, as per oslo_i18n guidelines
- This does NOT break other projects that rely on neutron.i18n,
  as this change includes a debtcollector shim to maintain those
  older entry points, until they can migrate.
- Also updates _i18n.py to the latest pattern defined by oslo_i18n
- Guidance and template are from the reference:
  http://docs.openstack.org/developer/oslo.i18n/usage.html

Partially-Closes-Bug: #1519493
Change-Id: I1aa3a5fd837d9156da4643a367013c869ed8bf9d
2015-12-01 19:29:10 -07:00
Miguel Angel Ajo 61d26b8b74 Fix hostname roaming for ml2 tunnel endpoints.
Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced
a bug where host name changes broke tunneling endpoint updates.
Tunneling endpoint updates roaming a hostname from IP to IP
are a common method for active/passive HA with pacemaker and
should happen automatically without the need for API/CLI calls [1].

delete_endpoint_by_host_or_ip is introduced to allow cleanup of
endpoints that potentially belonged to the newly registered agent,
while preventing the race condition found when deleting ip1 & ip2
in the next situation at step 4:

1) we have hostA: ip1
2) hostA goes offline
3) hostB goes online, with ip1, and registers
4) hostA goes online, with ip2, and registers

[1] https://bugs.launchpad.net/python-neutronclient/+bug/1381664

Change-Id: I04d08d5b82ce9911f3af555b5776fc9823e0e5b6
Closes-Bug: #1464178
2015-09-21 12:50:00 +02:00
Kevin Benton a93886278f Stop logging deadlock tracebacks
The oslo db retry decorator logs a traceback everytime a deadlock
is encountered even though it is being retried. With multiple workers
and a Galera cluster, deadlocks are common occurences due to our use
of with_lockmode update so we should not be polluting the logs.

This patch adjusts our usage of the retry decorator to catch deadlocks
with the exception checker which does not log them until the retries
are exhausted.

Change-Id: I433fbbad61070e20ebe934b9247e36fc190fa3e0
2015-09-04 05:42:10 -07:00
Cedric Brandily d0820e716f Galera multi-writers compliant sync_allocations
Currently sync_allocations[1] uses with_lockmode('update) which implies
possible deadlocks with Galera multi-writers. This change decorates the
method in order to catch and retry sync_allocations.

[1] neutron.plugins.ml2.drivers.type_tunnel

Change-Id: Ic01614cb5daf174848cf14a6aa4b38c4ed40fe1e
2015-07-15 08:24:15 +00:00
Cedric Brandily 7c273fe218 Abstract sync_allocations
Currently gre/vxlan type drivers have specific sync_allocations
implementations to perform the same feature. This change abstracts
(vxlan) implementation and moves it to TunnelTypeDriver[1] in order to
share implementation between gre/vxlan; this change also adds some
unittests.

Current gre/vxlan and new implementations of sync_allocations are not
Galera-compliant with multi-writers, a follow-up will update it to
fully support Galera.

[1] neutron.plugins.ml2.drivers.type_tunnel

Change-Id: I188a7cf718d811084475f6783d844588de5d60ea
2015-06-25 09:12:54 +00:00
Jenkins 65a3fb39a4 Merge "Remove useless pass from methods in type_tunnel.py" 2015-06-11 04:27:27 +00:00
Romil Gupta ca63dfd0f3 Remove useless pass from methods in type_tunnel.py
The pass is useless because there is a docstring in the methods.
Generally considered as uncovered by coverage tool.

Change-Id: Id1275c51e9adb865a3da9f0db007f3092b55b140
2015-06-10 17:20:24 +00:00
Cyril Roelandt 303f37f4e0 Python 3: use next() instead of iterator.next()
The latter only works in Python 2.

Also define a __next__ method in the classes that define a next method.

Change-Id: Iaa1a1e500facab50d8bcdffda39ccad3f2e4e9bb
Blueprint: neutron-python3
2015-06-09 20:26:09 +02:00
Cedric Brandily 46223363bd Refactor type_tunnel/gre/vxlan to reduce duplicate code
gre and vxlan type drivers have similar implementations for multiple
methods:
* get_endpoint_by_host
* get_endpoint_by_ip
* delete_endpoint
* get_endpoints
* add_endpoint

This change abstracts these methods and moves the abstractions to the
new class EndpointTunnelTypeDriver.

Change-Id: Iab97f8283b6bf5586334958de950664f6e74202a
2015-06-02 08:03:48 +00:00
Robert Pothier f540a48ae7 Add MTU selection to ML2
ML2 will check the config parameters for the MTU settings.
It will check the segment, path and physnet mtu settings.

Change-Id: I58b57e01ec9bcafd7cdcfbf03149e98c3a1291ed
Partially-Implements: blueprint mtu-selection-and-advertisement
2015-03-17 14:02:39 -04:00
Ihar Hrachyshka 22328baf1f Migrate to oslo.log
It's mostly a matter of changing imports to a new location.

Non-obvious changes needed:
* pass overwrite= argument to oslo_context since oslo.log reads context
  from its thread local store and not local.store from incubator
* don't store context at local.store now that there is no code that
  would consume it
* LOG.deprecated() -> versionutils.report_deprecated_feature()
* dropped LOG.audit check from hacking rule since now the method does
  not exist
* WritableLogger is now located in oslo_log.loggers

Dropped log module from the tree. Also dropped local module that is now
of no use (and obsolete, as per oslo team).

Added versionutils back to openstack-common.conf since now we use the
module directly from neutron code and not just as a dependency of some
other oslo-incubator module.

Note: tempest tests are expected to be broken now, so instead of fixing
all the oslo.log related issues for the subtree in this patch, I only
added TODOs with directions for later fix.

Closes-Bug: #1425013
Change-Id: I310e059a815377579de6bb2aa204de168e72571e
2015-03-12 11:22:56 +01:00
Romil Gupta 67c4c6d809 Stale VXLAN and GRE tunnel port/flow deletion
Description:
Stale GRE and VXLAN tunnel endpoints persists in neutron db this should be
deleted from the database. Also, if local_ip of L2 agent changes the
stale tunnel ports and flows persists on br-tun on other Compute Nodes and
Network Nodes for that remote ip this should also be removed.

Implementation

Plugin changes:
The plugin side changes are covered in following patch-set
https://review.openstack.org/#/c/121000/.

Agent changes:
Added tunnel_delete rpc for removing stale ports and flows from br-tun.
tunnel_sync rpc signature upgrade to obtain 'host'.
Added testcases for TunnelRpcCallbackMixin().

This patch-set agent deals with agent side changes.

Closes-Bug: #1179223
Closes-Bug: #1381071
Closes-Bug: #1276629

Co-Authored-By: Aman Kumar <amank@hp.com>
Co-Authored-By: phanipawan <ppawan@hp.com>

Change-Id: I291992ffde5c3ab7152f0d7462deca2e4ac1ba3f
2015-02-11 00:24:37 -08:00
Romil Gupta 3db0e619c8 Stale VXLAN & GRE tunnel endpoint deletion from DB
Description:
Stale GRE and VXLAN tunnel endpoints persists in neutron db this should be
deleted from the database. Also, if local_ip of L2 agent changes the
stale tunnel ports and flows persists on br-tun on other Compute Nodes and
Network Nodes for that remote ip this should also be removed.

Implementation

Plugin changes:
Added host column in 'ml2_vxlan_endpoints' and 'ml2_gre_endpoints' table.
Added delete_endpoint method for deleting the stale endpoints from db.
Modified tunnel_sync() method to accommodate these changes.
Modified testcases in test_type_vxlan.py
Modified testcases in test_type_gre.py

Agent changes:
Added tunnel_delete rpc for removing stale ports and flows from br-tun.
tunnel_sync rpc signature upgrade to obtain 'host'.
Added testcases for TunnelRpcCallbackMixin().

This patch-set only deals with plugin side changes.

Partial-Bug: #1179223

Change-Id: I75c6581fcc9f47a68bde29cbefcaa1a2a082344e
2014-12-30 13:01:55 +00:00
Russell Bryant 1bc911ca8a Drop RpcProxy usage from ml2 AgentNotifierApi
Remove usage of the RpcProxy compatibility class from the ml2
AgentNotifierApi.  The equivalent oslo.messaging APIs are now used
instead.  A couple of other mixin APIs had to be converted at the same
time.

Note that there is one very minor functional change here.  The base
rpc version is set to '1.0' now instead of '1.1'.  The right pattern
to use is to always set the base to be N.0.  Any method that needs a
newer version should specify it.

Part of blueprint drop-rpc-compat.

Change-Id: I640568e2d73c9eb7a9505db640dc1427a1ae2abe
2014-12-01 18:42:30 +00:00
Ihar Hrachyshka 3f44c9e278 Migrate to oslo.i18n
Mostly trivial import changes.

- oslo.i18n no longer provide install() method to inject _() into
  globals(), so removed all calls to it;
- removed Babel from dependencies (it will now be grabbed by oslo.i18n);
- updated tox.ini to ignore import violations for oslo.i18n.

Change-Id: I6623d551f512fb7fe9bf35ee734ed6d4c6cbc287
2014-11-26 22:19:24 +01:00
Romil Gupta 6d67c14e1a Update i18n translation for ML2 plugin log msg's
All the existing LOG.info, LOG.warning, LOG.error and LOG.critical
messages should have _LI, _LW, _LE and _LC respectively.
 Also, debug level log shouldn't be translated.

This patch set will cover the ml2 directory under neutron/plugins.

Partial-Bug: #1320867
Change-Id: I9d78d23bbc14e7c536c6ddf2dc4f52c67faeb667
2014-11-24 04:33:03 +00:00