9 Commits

Author SHA1 Message Date
Riccardo Pittau
efbbc86f53 Increase version of hacking and pycodestyle
Fix H904 "Delay string interpolations at logging calls" errors

Change-Id: I331808d0132094faf739998a6984440787d3ebf8
2021-07-30 14:34:33 +02:00
Qianbiao.NG
4b0ef13d08 Fix: make Intel CNA hardware manager none generic
Currently, IntelCnaHardwareManager inherits GenericHardwareManager
which makes it a new "GenericHardwareManager" with "MAINLINE" priority.
This causes all other hardware-managers with lower priority than
"MAINLINE" never be used. To fix this, make IntelCnaHardwareManager
inherit basic HardwareManager.

Change-Id: I28b665d8841b0b2e83b132e1f25df95e03e7ba10
Story: 2008142
Task: 40882
2020-09-23 18:24:26 +08:00
Riccardo Pittau
d5d62c8dbf Use unittest mock from standard library
Drop the third party mock library to use unittest mock from
standard library.

Change-Id: Ib64b661572e4869a24865c02a6c84a6603930394
2020-04-06 14:35:50 +02:00
Riccardo Pittau
ca7a46b113 Stop using six library
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.

Change-Id: I4795417aa649be75ba7162a8cf30eacbb88c7b5e
2019-11-29 10:18:14 +01:00
Tao Li
8a70f12435 Replace assertEqual(True/False, expr) with assertTrue/assertFalse in tests
In some cases, If the result of expr is a boolen value, we shoud use
assertTrue/assertFalse to instead. Beacause it is clear and simple.

Change-Id: Ie61369f6335a90b09bb24192282d33da5272c13f
Story: #2003785
Task: #26490
2018-09-18 16:14:20 +08:00
yuan liang
f55b8a34c4 Execute error in _detect_cna_card
A list type parameter pass to utils.execute will raise OSError.

Change-Id: Ic5dd30f7e819e433d05bf9cc888902abe7a82def
2018-01-26 18:34:56 +00:00
John L. Villalovos
265a072b72 Have unit tests all derive from our base unit test class
Have our unit tests derive from the base unit test class in
ironic_python_agent/tests/unit/base: IronicAgentTest

This is so if we add additional global common features to our base
test class, all of our tests will get those common features.

Change-Id: I5188112f06dcfda4f5b0fd41fa9b9dd270cde8d7
2017-10-18 11:06:30 -07:00
John L. Villalovos
1695cb18c2 Add missing 'autospec' argument to mock.patch
Add missing 'autospec' keyword argument to mock.patch and
mock.patch.object calls. Use 'autospec=True' except for a few cases
where it fails because the mocked function is a @classmethod and it
doesn't work. In that case explicity set it to 'autospec=False'

Change-Id: I620dce91abaa4440e1803aeefb3e93c0b65d1419
2017-03-19 10:04:19 -07:00
Szymon Borkowski
ef47d62f43 Add a new Hardware Manager for CNA network card
This patch adds a new hardware manager, which will disable the embedded
LLDP agent on Intel CNA network cards in order to allow the gathering of
LLDP data during the inspection process.

Change-Id: I572756ac6a7bf67a7f446738ba9d145e1c1bdc48
Closes-Bug: #1623659
2016-12-12 17:17:23 +01:00