Fix/add config data printing#22
Open
matejmatuska wants to merge 3 commits into
Open
Conversation
There were two conflicting format_config(), one is meant for formatting a single config schema (Config) the other one was probably meant for formatting the actual values passed in config files. The values are not associated with actor in any way - they are not present in metadata.metadata as config_schemas and other info about actors is. Therefore I removed the attempt to print them.
matejmatuska
commented
May 25, 2026
The config data printing is currently not printed and never has been, because it was incorrectly implemented, see commit 67f1af3. Since the data is not associated with actors, but context, this patch adds a new CLI subcommand for working with it. Currently the subcommand doesn't have any option and just print the config dataa as a formatted JSON. It can be expanded in the future. Example output: $ ./leapp-inspector --db leapp.db config-data ###################################################################### Actor Configs Data ###################################################################### { "livemode": { "additional_packages": [], "autostart_upgrade_after_reboot": true, "capture_strace_info_into": "", "dracut_network": "", "setup_network_manager": false, "setup_opensshd_using_auth_keys": "", "setup_passwordless_root": false, "squashfs_image_path": "/var/lib/leapp/live-upgrade.img", "url_to_load_squashfs_image_from": "" }, "rhui": { "cloud_provider": "", "image_variant": "ordinary", "obsolete_gpg_keys": [ "gpg-pubkey-2fa658e0-45700c69" ], "rhui_target_repositories_to_use": [], "source_clients": [], "target_clients": [], "upgrade_files": {}, "use_config": true } }
c59cf7e to
7da4dc4
Compare
Member
Author
|
Added the subcommand to completion scripts and also added a new option to specify output format and allow output in yaml. yes the empty line at the end si contained in the dumped yaml |
Member
|
btw, this is how to simply generate config files actually :-D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the commit messages.
Example usage:
I think it would be cool to add option to print it in YAML so it can be directly used to re-create a config. But that might be a separate PR.