Commit Graph

6 Commits

Author SHA1 Message Date
Brian Haley 7594bb0627 Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Fixed an inconsistency in the OVSBridge.deferred() definition
as it needs to also have an *args argument.

Fixed an issue where an l3-agent test was mocking
functools.partial, causing a python3.8 failure.

Unit tests only, removing from tests/base.py affects
functional tests which need additional work.

Change-Id: I40e8a8410840c3774c72ae1a8054574445d66ece
2020-04-28 18:05:37 -04:00
Cuong Nguyen cdb973e77d Generic validate_request method for logging
This patch adds a generic validate_request method for logging, So
logging can be extended to other resources like firewall group.

Co-Authored-By: Nguyen Phuong An <AnNP@vn.fujitsu.com>
Co-Authored-By: Kim Bao Long <longkb@vn.fujitsu.com>

Partial-Bug: #1720727
Change-Id: I9d580645131a9f1b8233ea5f6e0378cd98f023f1
2018-08-01 17:15:46 -05:00
Miguel Lavalle 03db94ebaa Pluralize binding relationship in Port
As a consequence of implementing multiple bindings for ports, [1] made
the following attributes lists:

- 'port_binding' in the in the SQLAlchemy Port model
- 'binding' in the Port OVO

This patch pluralizes their names to 'port_bindings' and 'bindings'
respectively

[1] Ie31d4e27e3f55edfe334c4029ca9ed685e684c39

Change-Id: I4ebe47cf9d51a700310aad8dcccc82fea3f00a16
2018-07-13 19:37:36 -05: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 139c8341f4 use log api plugin const from neutron-lib
The constant LOG_API was rehomed into neutron-lib with commit
I208c976c3e7e43e27e1907ed196af8efccd73f22
This patch consumes it by removing the constant from neutron and
using lib's version of it instead.

NeutronLibImpact

Change-Id: I97b135730af9efaa3b32c99b415f89c8a254a782
2017-11-30 11:07:06 -07:00
Nguyen Phuong An 6847790414 [log]: Add validator to logging api
This patch added a validator to logging api for checking resource bound
(sg or port is exist or not, ...) and validating whether or not supporting
logging type on each port when we create a log object by specific port_id.

Co-Authored-By: Yushiro FURUKAWA <y.furukawa_2@jp.fujitsu.com>

Change-Id: I10f2441fc2c7bdbda51b05002549b235743a7deb
Partially-implements: blueprint security-group-logging
Related-Bug: #1468366
2017-08-08 13:25:40 +07:00