summaryrefslogtreecommitdiff
path: root/ironic/tests/unit/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Enables boot modes switching with Anaconda deploy for ilo driver"Zuul2023-03-271-0/+78
|\
| * Enables boot modes switching with Anaconda deploy for ilo driverNisha Agarwal2023-03-171-0/+78
| | | | | | | | | | | | | | | | | | Enables boot modes switching with Anaconda deploy for ilo driver Story: 2010357 Task: 46530 Change-Id: I383cdd5c9d45b074d351ec98b1145fd68e2f3ac3
* | Merge "Refactoring: clean up inspection data handlers"Zuul2023-03-232-83/+62
|\ \
| * | Refactoring: clean up inspection data handlersDmitry Tantsur2023-03-142-83/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid using the term "introspection". We need to settle on either "inspection" or "introspection", and the Ironic API already uses the former. * Accept (and return) inventory and plugin data separately to reflect the Ironic API (single JSON blobs are an Inspector legacy). * Make sure to mention the container name in error logging. * Use more readable formatting syntax for building Swift names. * Do not mock objects with dicts (in unit tests). * Simplify inventory API tests. Change-Id: Id8c4bc6d35b9634f5a5ac2b345a8fd7f1dba13c0
* | | Merge "Fixes Secureboot with Anaconda deploy"Zuul2023-03-201-2/+8
|\ \ \ | | |/ | |/|
| * | Fixes Secureboot with Anaconda deployNisha Agarwal2023-03-161-2/+8
| |/ | | | | | | | | | | | | | | | | Fixes Secureboot with Anaconda deploy with PXE and iPXE Story:2010356 Task: 46529 Change-Id: Id6262654bb5e41e02c7d90b9a9aaf395e7b6a088
* | Merge "Fix auth_protocol and priv_protocol for SNMP v3"Zuul2023-03-171-0/+35
|\ \ | |/ |/|
| * Fix auth_protocol and priv_protocol for SNMP v3Duc Truong2023-03-011-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SNMP driver was using the wrong dictionary key to retrieve auth_protocol and priv_protocol from driver info. As a result, the SNMP client was created with empty strings for both those fields. Any nodes configured to use SNMP v3 with those fields failed because the SNMP driver was unable to perform power related operations due to authentication error. - Use correct keys for snmp auth_protocol and priv_protocol when creating SNMP client - Sanitize snmp auth_key and priv_key in API results Story: 2010613 Task: 47535 Change-Id: I5efd3c9f79a021f1a8e613c3d13b6596a7972672
* | Merge "Do not recalculate checksum if disk_format is not changed"Zuul2023-03-131-7/+66
|\ \
| * | Do not recalculate checksum if disk_format is not changedDmitry Tantsur2023-03-071-7/+66
| | | | | | | | | | | | | | | | | | | | | Even if a glance image is raw, we still recalculate the checksum after "converting" it to raw. This process may take exceptionally long. Change-Id: Id93d518b8d2b8064ff901f1a0452abd825e366c0
* | | Restructure the inspector module in preparation for its expansionDmitry Tantsur2023-03-014-54/+72
|/ / | | | | | | | | | | | | | | Converts ironic.drivers.modules.inspector into a package with two subpackages: client and interface, the latter containing most of the current content. Change-Id: Idbfd275c60a873e3de2e0a34db793619f8c99d85
* | Merge "Add configurable delays to the fake drivers"Zuul2023-02-271-0/+29
|\ \
| * | Add configurable delays to the fake driversSteve Baker2022-10-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simulating workloads with the fake driver currently misses the reality that some operations take time to complete, rather than occuring instantly. This makes it difficult to mock real workloads for performance and functional testing of ironic itself. This change adds configurable random wait times for fake drivers in a new ironic.conf [fake] section. Each supported driver having one configuration option controlling the delay. These delays are applied to operations which typically block in other drivers. The default value of zero continues the existing behaviour of no delay. A single integer value will result in a constant delay in seconds. Two values separated by a comma will result in a triangular distribution weighted by the first value, specifically in python[1]: random.triangular(a, b, a) Change-Id: I7cb1b50d035939e6c4538b3373002a309bfedea4 [1] https://docs.python.org/3/library/random.html#random.triangular
* | | Merge "Fixes console port conflict occurs in certain path"Zuul2023-02-201-0/+10
|\ \ \ | |_|/ |/| |
| * | Fixes console port conflict occurs in certain pathKaifeng Wang2023-02-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamically allocated console port for a node is saved into database and reused on subsequent console operations. In certain code path the port record cann't be trusted and we should do a re-allocation. This patch fixes the issue by ignores previous allocation record. The extra cleanup in the takeover is not required anymore and removed as well. Change-Id: I1a07ea9b30a2c760af7a6a4e39f3ff227df28fff Story: 2010489 Task: 47061
* | | Merge "Erase swift inventory entry on node deletion"Zuul2023-02-141-1/+109
|\ \ \
| * | | Erase swift inventory entry on node deletionJakub Jelinek2023-02-141-1/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to Ie174904420691be64ce6ca10bca3231f45a5bc58 which enables storage of inventory in Swift, but does not delete the Swift entry when the node whose inventory is stored is deleted Story: 2010275 Task: 46204 Change-Id: I74b19f7a42c1326d7ec04e6320176e81639ebfb4
* | | | Merge "Fix snmp driver sleep call count"Zuul2023-02-011-2/+2
|\ \ \ \
| * | | | Fix snmp driver sleep call countJulia Kreger2022-10-141-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mocking time.sleep is known to be problematic in general, espescially when eventlet is involved. Since this can generate false failures, change the unit test to just check that it was called, as opposed to trying to count the number of times so we don't accidently count other test's calling time.sleep. Change-Id: I4323e74d7af008a651719fb972df667eb823e314
* | | | Merge "Reorganise Inventory Storage"Zuul2023-01-242-40/+129
|\ \ \ \ | | |/ / | |/| |
| * | | Reorganise Inventory StorageJakub Jelinek2023-01-212-40/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move functions storing and obtaining introspection data from drivers/modules/inspector.py and api/controllers/v1/node.py to driver/modules/inspect_utils.py Follow-up to change If50f665da5fbb16f7646f3d6195a6e14e7325b0a Story: 2010275 Task: 46204 Change-Id: I2b206670aff6ad3a9f9cc76236453abf42663cad
* | | | Merge "Create [inventory]"Zuul2023-01-201-8/+8
|\ \ \ \ | |/ / /
| * | | Create [inventory]Jakub Jelinek2023-01-171-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create [inventory] to hold CONF parameters for storage of introspection data Story: 2010275 Task: 46204 Change-Id: I06fa4f69160206dd350856e264cbb0842e34fd2a
* | | | CI: Fix race prone unit test in networkingJulia Kreger2023-01-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the networking code stack, one of the methods looks to identify if a change has occured, except some of the other tests utilize the same value that was previously asserted for the same base object. Becaues of this, just use a unique value so we don't risk the possibility of the test failing erroneously. Change-Id: Ide2b205ade67a4090a0b9bfe1282d01f7605ceb9
* | | | Merge "[iRMC] Handle IPMI incompatibility in iRMC S6 2.x"Zuul2023-01-183-21/+421
|\ \ \ \
| * | | | [iRMC] Handle IPMI incompatibility in iRMC S6 2.xVanou Ishii2023-01-173-21/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since iRMC S6 2.00, iRMC firmware disables IPMI over LAN with default iRMC firmware configuration. To deal with this firmware incompatibility, this commit modifies driver's methods which use IPMI to first try IPMI and, if IPMI fails, try to use Redfish API. Story: 2010396 Task: 46746 Change-Id: I1730279d2225f1248ecf7fe403a5e503b6c3ff87
* | | | | Merge "[iRMC] identify BMC firmware version"Zuul2023-01-183-0/+221
|\ \ \ \ \ | |/ / / /
| * | | | [iRMC] identify BMC firmware versionVanou Ishii2023-01-163-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since iRMC S6 2.00, iRMC firmware doesn't support HTTP connection to REST API. To deal with this firmware incompatibility, this commit adds verify step to check connection to REST API and adds node vendor passthru to fetch&cache version of iRMC firmware. Story: 2010396 Task: 46745 Change-Id: Ib04b66b0c7b1ef1c4175841689c16a7fbc0b1e54
* | | | | Fix selinux context of published image hardlinkRiccardo Pittau2023-01-111-12/+35
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | If the published image is a hardlink, the source selinux context is preserved. This could cause access denied when retrieving the image using its URL. Change-Id: I550dac9d055ec30ec11530f18a675cf9e16063b5
* | | | Merge "Enable alternative storage for inventory"Zuul2023-01-061-1/+45
|\ \ \ \
| * | | | Enable alternative storage for inventoryJakub Jelinek2022-12-061-1/+45
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ironic inspector allows users to choose between SQL, Swift and NoStore. Ironic should offer similar functionality. Story: 2010275 Task: 46204 Change-Id: Ie174904420691be64ce6ca10bca3231f45a5bc58
* | | | Merge "Fix "'NoneType' object is not iterable" in RAID"Zuul2023-01-051-0/+4
|\ \ \ \ | |_|_|/ |/| | |
| * | | Fix "'NoneType' object is not iterable" in RAIDAija Jauntēva2022-12-161-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not update `raid_configs` if operation is synchronous. First, it is not needed, second, it will not be cleaned up by async periodics. As the result the data remains on the node and causes errors the next time node is in cleaning state. Story: 2010476 Task: 47037 Change-Id: Ib1850c58d1670c3555ac9b02eb7958a1b440a339
* | | Merge "Fix unit tests for Python 3.11"Zuul2022-12-121-12/+13
|\ \ \
| * | | Fix unit tests for Python 3.11Riccardo Pittau2022-12-071-12/+13
| |/ / | | | | | | | | | | | | | | | | | | | | | Mocks can no longer be provided as the specs for other Mocks. See https://github.com/python/cpython/issues/87644 and https://docs.python.org/3.11/whatsnew/3.11.html for more info. Change-Id: If7c10d9bfd0bb410b3bc5180b737439c92e515da
* | | Merge "Fixes anaconda deploy for PXE boot"Zuul2022-12-121-0/+4
|\ \ \ | |/ / |/| |
| * | Fixes anaconda deploy for PXE bootNisha Agarwal2022-10-071-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | Fixes the anaconda deploy(URL based) and adds anaconda_boot entry to pxe_grub_config.template so that ProLiants can be also deployed in PXE mode. Story: 2010347 Task: 46490 Change-Id: I4b9e3a2060d9d73de5cab31cc08d3a764dc56e90
* | Merge "Get inventory from Inspector"Zuul2022-11-281-0/+29
|\ \
| * | Get inventory from InspectorJakub Jelinek2022-11-221-0/+29
| |/ | | | | | | | | | | | | | | Get inventory data and store it in the local database. Story: 2010275 Task: 46204 Change-Id: Id2e1462362e97d0152f3948e978a05ec16ca8e4d
* | Align iRMC driver with Ironic's default boot_modeVanou Ishii2022-11-061-10/+10
|/ | | | | | | | | | | | This commit modifies iRMC driver to use ironic.conf [deploy] default_boot_mode as default value of boot_mode. Before this commit, iRMC driver assumes Legacy BIOS as default boot_mode and value of default_boot_mode doesn't have any effect on iRMC driver's behavior. Story: 2010381 Task: 46643 Change-Id: Ic5a235785a1a2bb37fef38bd3a86f40125acb3d9
* Fix idrac-redfish RAID controller mode conversionAija Jauntēva2022-09-151-3/+193
| | | | | | | | | | | PERC 9 and PERC 10 might not be in RAID mode with no or limited RAID support. This fixes to convert any eligible controllers to RAID mode during delete_configuration clean step or deploy step. Story: 2010272 Task: 46199 Change-Id: I5e85df95a66aed9772ae0660b2c85ca3a39b96c7
* Merge "Adds create_csr and add_https_certificate clean step"Zuul2022-09-132-0/+150
|\
| * Adds create_csr and add_https_certificate clean stepankit2022-09-092-0/+150
| | | | | | | | | | | | | | | | | | | | This commit adds new clean steps create_csr and add_https_certificate to allow users to create certificate signing request and adds https certificate to the iLO. Story: 2009118 Task: 43016 Change-Id: I1e2da0e0da5e397b6e519e817e0bf60a02bbf007
* | Merge "Enables event subscription methods for ilo and ilo5 hardware types"Zuul2022-09-122-0/+88
|\ \
| * | Enables event subscription methods for ilo and ilo5 hardware typesmallikarjuna.kolagatla2022-09-052-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | Enables event subscription methods by inheriting RedfishVendorPassthru for ilo and ilo5 hardware types Story: 2010207 Task: 45931 Change-Id: I96f7e44069402e3f1d25bcd527408008ca5e77cb
* | | Cleanup submitted SNMP driver code for additional PDUsAlexander Lingo2022-09-091-0/+80
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | * Resolved PEP8 issues * Trimmed comments to remove extraneous information * Changed rfc1902.Integer() calls to the correct snmp.Integer() calls * Fixed power state logic checking for new PDUs that don't have transitional states (e.g., 'pendingOn') * Removed redundant warning messages * Added unit tests for Raritan PD2, ServerTech Sentry 3/4, and Vertiv Geist drivers * Updated documentation to list tested PDUs for the new drivers * Updated release notes Change-Id: I9da7b9042b817c346f75a44cd8287e1f63efcb56
* | Merge "Redfish: Consider password part of the session cache"Zuul2022-09-051-0/+16
|\ \
| * | Redfish: Consider password part of the session cacheJulia Kreger2022-08-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a password change occured in ironic, the session would not be invalidated, and this, in theory, could lead to all sorts of issues with the old password still being re-used for authentication. In a large environment where credentials for BMCs may not be centralized, this can quickly lead to repeated account lockout experiences for the BMC service account. Anyhow, now we consider it in tracking the sessions, so when the saved password is changed, a new session is established, and the old session is eventually expired out of the cache. Change-Id: I49e1907b89a9096aa043424b205e7bd390ed1a2f
* | | redfish: fixes usage of ValueDisplayNameDmitry Tantsur2022-08-261-1/+2
| |/ |/| | | | | | | | | It's spelled this way, not DisplayValueName. Change-Id: I170d78bdb7ed0f6c36a80a9f2ceb9629f44394ed
* | Merge "Do not reboot into nowhere after BIOS settings with fast-track"21.0.0Zuul2022-08-171-4/+28
|\ \