-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Is your feature request related to a problem? Please describe.
Junior developers new to AAP often struggle to define their data structures for creating objects used in the dispatch role. Although we have an internal document with examples of common object types (job templates, creds, controller projects, eda projects, inventories, eda rulebook activation, EEs, DEs, etc) they face challenges with the variety of configurations and nesting, especially with job templates. Often, these challenges involve obtaining the appropriate key or values required, or using the correct type of data (such as integers, strings, lists, bool, etc).
They frequently troubleshoot failed dispatch runs while trying to "codify" objects created manually in the GUI for deployment. Debugging the error messages from these failed deployments is often difficult for them.
Describe the solution you'd like
Have a role created that can be given any type of object that can be created currently by infra.aap_configuration be able to be targeted by object type and name and extract the values. I do know this data is available at the API view, but it is often hard for the developers and cumbersome to browse the API explorer to find the object.
Using the API explorer to obtain a configuration of an AAP object includes capturing all default values. It would be beneficial if this role had the capability to exclude keys and values that match the default for that object type, ensuring that only necessary definitions are provided back as the output of the role.
The output of the role would then just be the what the developer supply back for dispatch to use for creating that object. Then might change a few things about it by hand (Ex: organization) before submitting to source before dispatch uses it.
This tool can help customers who manually deployed objects in the GUI transition to using the dispatch role. It could allow them to export current configurations easily and parse objects in a loop to generate configurations for their deployed items in AAP.
This idea of a role might be better suited for this collection instead:
https://github.com/redhat-cop/aap_configuration_extended/
Describe alternatives you've considered
None come to mind outside of what we are doing by hand via going to the API explorer and grabbing the configuration and manually look at the page to identify which values match the default and can't be dropped out of the configuration that needs to be supplied to dispatch.
Additional context
None to provide.