Improve the logic and data structure for SCSI ID management in Web UI#893
Improve the logic and data structure for SCSI ID management in Web UI#893
Conversation
|
Several tests are failing. Will fix tomorrow. |
|
Nothing wrong with the tests. They revealed bugs in the code. :) |
nucleogenic
left a comment
There was a problem hiding this comment.
Approved, but please see comment about the test. These changes definitely improve readability, so very happy to see these!
python/web/tests/api/test_devices.py
Outdated
| ("Host Bridge", {"type": "SCBR", "inet": "192.168.0.1/24"}), | ||
| ("Ethernet Adapter", {"type": "SCDP", "inet": "192.168.0.1/24"}), |
There was a problem hiding this comment.
Should this dict include param_interface and param_inet, so the test models the form payload?
There was a problem hiding this comment.
Updated with the param_* prefixes!
The reason param_interface are excluded is that there's no guarantee that eth0 exist in all environments where you may want to run these tests, such as a Zero W, or a system where the dynamic interface name thing has been enabled. Added TODOs to explore dynamically detect available (and viable) interfaces.
|
SonarCloud Quality Gate failed. |
…#893) - Have the get_scsi_ids() utility method return a dict, while adding occupied_ids. Leverage this to improve the logic for detecting which IDs are available to be reserved in the Web UI. (Which fixes a recent regression bug that's causing no IDs to be detected as available to be reserved.) - Improve /scsi/attach endpoint logic to capture dynamic parameter fields now prefixed with "param_" (previous it scanned for any arbitrary field, which wasn't very accurate or secure) - Added Product string to the block_size:512 CD-ROM device, so that it's obvious when it's being used. - Tweaked test data for attach_device tests
…#893) - Have the get_scsi_ids() utility method return a dict, while adding occupied_ids. Leverage this to improve the logic for detecting which IDs are available to be reserved in the Web UI. (Which fixes a recent regression bug that's causing no IDs to be detected as available to be reserved.) - Improve /scsi/attach endpoint logic to capture dynamic parameter fields now prefixed with "param_" (previous it scanned for any arbitrary field, which wasn't very accurate or secure) - Added Product string to the block_size:512 CD-ROM device, so that it's obvious when it's being used. - Tweaked test data for attach_device tests









Uh oh!
There was an error while loading. Please reload this page.