hv_xen: Factorize and test disk configuration
The “_GetConfigFileDiskData” function is moved to module level and cleaned up (module-level constants for letters and file I/O drivers). Until now only 24 disks would be supported (e.g. “sda” to “sdx”), when the Latin alphabet actually has 26 characters. Now all 26 letters would be available for use (“constants.MAX_DISKS” is still 16). Newly added unit tests provide complete coverage for “_GetConfigFileDiskData”. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
Loading
Please register or sign in to comment