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
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
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
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
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
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