Readers and writers live under
Y2Network::ConfigReader. For instance, the
Sysconfig reader is
Y2Network::ConfigReader::Sysconfig. The problem is that those classes can become quite complex easily: the reader needs to get configuration for interfaces, routing, DNS… so we usually need to split them into smaller, isolated and easy to test classes.
So we end up with classes like
We could change the approach and put all the code related to the same backend in the same place. Something like having
Y2Network::Adapters::Sysconfig which contains
Add another level like
Y2Network::ConfigReader::Sysconfig and put the DNS reader into
Y2Network::ConfigReader::SysconfigReader::DNS or something similar.