Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RHELC-1507] Port environment variables to config file (#1272)
* Modify convert2rhel.ini with new fields and values * Split toolopts from cli both in module as code In the past, we used to have this portion of code all together inside the toolopts module, making it very difficult to understand and improve as the separation was not intuitive enough. With this patch, we are splitting the cli related functions and classes to its own module, making it an entrypoint for everything related to CLI usage. Toolopts also got its own module to further separate the logic between cli stuff and options stuff. Historically we call all options from our source code as "toolopts", so to preserve the naming convention and minimize as much as possible the changes throughout the codebase, the same name was preserved. A new addition was also made which is the config module. This module is responsible to gather all the configuration options we could ever define for the tool. Currently, it only has CLIConfig and FileConfig, which are the two supported options. Toolopts, at this point, is our final class who will hold all the options that are composed from the cli and config file (being able to be extended in the future to other options). * Move code to their related utils modules A couple of functions and constants were moved to their related utils modules to get them out of the way from circle dependency and make the codebase a bit more clear * Update code reference about toolopts and cli on codebase This patch introduces the updated references to both toolopts and cli throughout the codebase as some of the things we had before could be changed to the new format, especially because no code get executed before the CLI class parse all the options necessary. We are not safe to call tool_opts even if nothing is populated inside the class. Beware that it will still fail if we try to access any attributes before they get created, but that should be a implementation problem, not really a workflow one, since we expect that the CLI get executed very early in the process. * Update man script and vulture script Add a couple of missing variables to the vulture whitelist script so the hook can stop warning about unused variable. * Update the unit_tests to reflect the changes in the refactor * Integration tests fixup * Fix convert2rhel.ini with defaults values and parsing Parsing the values for inhibitor_overrides now convert it to a boolean value by default.
- Loading branch information