This commit merges the master neutron branch into the feature/lbaasv2
branch. This is needed to get the feature/lbaasv2 branch building again.
Change-Id: Iba59aa20adc6b369b4b9d250afee406159287ba1
I noticed that disable_ipv6_ra is called from the wrong place and that
in some cases it was called with a bogus router_id because the code
made an incorrect assumption about the context. In other case, it was
never called because _destroy_router_namespace was being called
directly. This patch moves the disabling of metadata and ipv6_ra in
to _destroy_router_namespace to ensure they get called correctly and
avoid duplication.
Change-Id: Ia76a5ff4200df072b60481f2ee49286b78ece6c4
Closes-Bug: #1383495
This is to avoid fileutils dependency on excutils that are now moved to
oslo.utils.
The following changes are included:
* neutron/openstack/common/__init__.py
6b048e7 Let oslotest manage the six.move setting for mox
* neutron/openstack/common/_i18n.py
9ce1d96 Fix i18n import
5d40e14 Remove code that moved to oslo.i18n
* neutron/openstack/common/fileutils.py
6ff6b4b Switch oslo-incubator to use oslo.utils and remove old modules
2b966f9 Fix deletion of cached file for policy enforcer
9c88dc3 file_open: fixed docstring to refer to open() instead of file()
6c7407b fileutils: port to Python 3
fcf517d Update oslo log messages with translation domains
* neutron/openstack/common/log.py
6c706c5 Delete graduated serialization files
5d40e14 Remove code that moved to oslo.i18n
6ff6b4b Switch oslo-incubator to use oslo.utils and remove old modules
aa74411 log: add missing space in error message
037dee0 Set stevedore log level to WARN by default
37c0091 Add unicode coercion of logged messages to ContextFormatter
6614413 Correct coercion of logged message to unicode
1188d88 Except socket.error if syslog isn't running
ac995be Fix E126 pep8 errors
631f880 Set keystonemiddleware and routes.middleware to log on WARN level
726d00a Adjust oslo logging to provide adapter is enabled for
433fa0b Make logging_context_format_string optional in log.set_defaults
ac92c06 Add default log level for websocket
5fd77eb Ability to customize default_log_levels for each project
4d9328c Python 3: enable tests/unit/test_log.py
cb5a804 Move `mask_password` to strutils
Note: cb5a804 is partially included; that's ok because we don't use the
moved function in Neutron.
Change-Id: I3bfcaff2620b368d807e9468bb7abc01d6471661
This change removes the exemption for E251 by addressing unexpected spaces
around keyword/parameter equals
Change-Id: Iff17477e37bef2a97fc58a538d08bcfc35c67751
Partial-Bug: 1329017
For log messages in neutron/services/vpn and neutron/db/vpn, replace
_() marker functions with log-level-specific marker functions: _LI(),
_LW(), _LE() from oslo.i18n.
Also, remove _() functions for debug log messages as debug level log
messages should not be translated.
Change-Id: I07fcf25bb6344c47e74d6ee23f9bc08e4b560679
Closes-Bug: #1379811
mock.assert_called_once() is a no-op that tests nothing. Instead
mock.assert_called_once_with() should be used (or use
assertEqual(1, mock_obj.call_count) if you don't want to check
parameters).
Borrowed HACKING rule from Davanum Srinivas's nova patch to
prevent it from appearing again.
Change-Id: Idac1d3c89c07e13c9a209663f4e557fcb7547821
Closes-Bug: #1365751
Closes-Bug: #1300265
When we delete Router interfaces/gateway,
we need to check if any VPN services are
associated with that router.
Closes-Bug:1261598
Change-Id: I7df2b8b130b47ec070d0b0a36b1a62df40532760
pylintrc update disables all warnings that currently trigger on neutron
code. The rough plan is to slowly re-enable warning categories as we
clean up code in question.
This change also includes a few ultra-trivial syntax cleanups where it
allowed the check to be immediately enabled for the rest of the
codebase:
- Added missing trailing newlines in several files
(db/migration/__init__.py, nuage/{nuagedb,syncmanager,common/config}.py)
- Renamed self to cls in @classmethods
(cisco/db/l3/device_handling_db.py)
- Removed whitespace around '=' in a kwarg
(cisco/db/l3/device_handling_db.py, cisco/db/n1kv_db_v2.py)
- Updated deprecated pylint 'disable-msg' directive to newer 'disable'
(cisco/extensions/qos.py)
- File-specific disable for too-many-format-args pending further
investigation of alternatives
(ml2/drivers/arista/arista_l3_driver.py)
- Import module rather than object and avoid long line
(services/l3_router/l3_arista.py)
Change-Id: Ifb0a1a38e33f9073a78658ca578fbd2a42747724
Constructing a RouterInfo object just for a string concatenation is
inefficient and adds more dependence on the class which needs
refactoring.
Change-Id: Ibaf369d6ebe9285a0c845802def59bfa26ac0fd5
The method _process_routers no longer handles multiple routers. The
only caller of this method would construct a list of exactly one
router in order to make the call. This made the for loop unnecessary.
The method's logic is too heavy for its current purpose. This commit
removes much of the weight.
The use of the sets in this method is also no longer necessary. It
became clear that all of it boiled down to "if the router is not
compatible with with this agent but it is known in router_info from
before then we need to remove it." This is an exceptional condition
that shouldn't be handled in this method so I raise an exception and
handle it in process_router_update where other router removal is
handled. Logging was added for this exceptional condition.
The eventlet pool was also obsolete. It was used to spawn two methods
and there was a waitall at the end. The other refactoring made it
clear that the two spawns were mutually exclusive. There was only one
thread spawned for any given invocation of the method and the eventlet
pool is overkill.
Change-Id: Ibeac591b08565d10b2a9730e25a54f2cd11fc2bc
Closes-Bug: #1378398
There is no code left that passes True to this argument. It is dead
code and it should be removed.
Change-Id: I55f71a5c0b96e530e45f2a6463978e8611cbc537
One of the VPNaaS unit test setup routines creates
and extension manager but passes it a class but it
should be passing an instance of that class.
Change-Id: I589cdda0674fdf8fa20d92c2609e1ba6966125d8
This changeset removes the linuxbridge plugin, but retains the agent for ML2.
The database models were not removed since operators will need to migrate the
data.
Additionally, the ml2 migration script was altered to support Juno. For
testing, a user must either run the migration against the icehouse
scheme or run the update, manually change alembic_version to juno and
then run the migration script. Once the juno migration is added, this
manually step will not be required.
Change-Id: I70689b4247947e6dc08e80fd9b31da9dc691d259
Partial-Bug: 1323729
Add tests to verify that database migrations produce
the same schema as the database models.
Also for MySQL, check that all tables are configured to use InnoDB
as the storage engine.
These tests make use of the ModelsMigrationsSync test class from
oslo.db and the load_tests protocol from Python unittest.
Closes-bug: #1346444
Change-Id: Ic0e7eb37c30cc5e94cbdbddf07a6dc1ebf377c17
This fixes the test_report_multiple_services unit test that breaks with a
randomized PYTHONHASHSEED (see the bug report).
The test assumed that the report list from self.driver.report_status() had
elements in a particular order. Found with PYTHONHASHSEED=2455351445.
The fix refactors the test case to handle an unsorted report list by
sorting it before checking equality.
Partial-bug: #1348818
Note: There are several other unrelated unit tests that also break with a
randomized PYTHONHASHSEED, but they are not addressed here. They will be
addressed in separate patches.
Change-Id: I542c3818821fa2f6e460fd254a3842530ecea8d9