Open vholer opened 3 years ago
To fix this it seems we would need to switch from non-specific lenses based on regex allowing arbitrary keys to more specific entries with enumerating allowed keys. So, instead
let name = key /[A-Z_0-9]+/`
we can have
let port = del /[pP][oO][rR][tT]/ "PORT" . label "PORT"
let name = ( port | ... )
This would work case-insensitive for line PORT=2633
IMO double definitions (caps sensitive or not) should be handled by the server-side too. OpenNebula should issue a warning or even raise an error for such issues. This will be more generic because such errors could be done not only with augeas lens.
For example, at the beginning I've usually was uncommenting the DB section to enable MySQL configuration, forgetting to comment the sqlite3 one which was leading to oned still using sqlite3... (it looks like the first match has precedence). Not exactly the case because the augeas lens actually resolved this case, but I think that you understand me.
Description
Augeas lens for reading oned.conf-like configuration files is case sensitive, so it's easy to create redundant entries with different casing, which are not effective (i.e., only first occurance in unique parameters matter).
To Reproduce Steps to reproduce the behavior.
Expected behavior All path elements inside file, no matter the real casing, can be addressed simply (e.g., downcasing everything in memory structure on load, while preserving the original casing on save).
Details
Progress Status