Skip to content

Conversation

@fmount
Copy link
Contributor

@fmount fmount commented Sep 24, 2025

This patch introduces a new INI manipulation utility with the ability to process/extend service configurations (customServiceConfig) by adding key/value pairs to specific sections. It includes comprehensive test coverage for various scenarios, including section detection, key validation, and edge cases. This utility does not replace existing keys if they are already specified via user input, but it can optionally add a duplicated key in the same section based on the IniOption flag. This design preserves the original purpose of customServiceConfig as user input.

Note: Since we already process customServiceConfig in storage operators, lib-common seems to be a good fit for the use case.

Related: https://issues.redhat.com/browse/OSPRH-14309

Copy link
Contributor

@konan-abhi konan-abhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!!

@fmount fmount force-pushed the common_ini branch 2 times, most recently from a062f07 to aade7b9 Compare September 24, 2025 13:26
This patch introduces a new INI manipulation utility with the ability to
extend service configurations (customServiceConfig) by adding key-value
pairs to specific sections. It includes comprehensive test coverage for
various scenarios, including section detection, key validation, and edge
cases. This utility does not replace existing keys if they are already
specified via user input, and it optionally adds - based on the Unique
parameter - keys of the same kind for a given section.
This design preserves the original purpose of customServiceConfig as
user input.

Related: https://issues.redhat.com/browse/OSPRH-14309

Signed-off-by: Francesco Pantano <[email protected]>
@fmount
Copy link
Contributor Author

fmount commented Oct 1, 2025

@stuggi do you think this patch is good to go now? I think I enhanced the existing code to make sure we can decide to allow duplicated keys (and I added a couple of tests based on the Nova documentation). Let me know if you think we need more changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants