-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
awx.awx.tower_export missing Galaxy Credential in organizations #9342
Comments
I just tested this using awxkit 17.0.1 , awx, 17.0.1 and tower 3.8.1. and the galaxy credential does not show up.
|
I think this is expected behavior. You are probably looking to export the default Galaxy credential which gets created when you install awx/tower. Tower_export module will not export the "default" galaxy credential. awx/awxkit/awxkit/api/pages/api.py Line 85 in 6aab882
The default galaxy credential is "managed_by_tower" and hence it wont be exported. But if you create another galaxy credential and try to do the export you should see it. I tested it and I do see it getting exported.
|
@jainnikhil30 we know it comes out under credentials as a credential, we were referring to Organizations,
and in credentials it would be:
Notice that org Foo_cred doesn't have foo galaxy under it.
is more of this on the output of tower export
This last example compared to the first one I showed has galaxy_credentials as a related field, which is what is being advocated for. |
My bad, thanks for the clarification. I didn't notice it was organization. Yeah this seems like a bug ! |
I think I have a potential fix. With the fix:
|
Good start, but think it should be its own related. Because on post back in api, tower import, for organizations, galaxy credentials is its own field, like in tower_organization module Credentials as you listed wouldn't be associated as "the" galaxy credential in the org, just related Credentials in general If you can point me to your code change for above, I'd be glad to digg into it and see about doing as I said, personally just don't know where to start |
@sean-m-sullivan @jainnikhil30 Any updates on this one? |
I unfortunately have not been able to decode awxkit to figure out how to make changes, though if I could see the diff on @jainnikhil30 fix above, I might possibly be able to do so. I will be away for most all of next week and may revisit it once I return. |
@john-westcott-iv Do you have any movement on this, or point me to where we define these things in the files so I could take a crack at it. |
@sean-m-sullivan I just took a quick peak at the code but check out the EXPORTABLE_RELATIONS. awx/awxkit/awxkit/api/pages/api.py Line 30 in 6aab882
It looks like it should be exporting credential types but maybe the galaxy credential is a slightly different class? awx/awxkit/awxkit/api/pages/api.py Line 133 in 6aab882
|
So have been digging around, going to post my notes here, I am not quite to the bottom of why this is, but while evaluating line 133, the _create is not finding the related field like it normally would, because galaxy_credentials doesn't exist on the main page, as its under credentials.
The difference is that awxkit.api.pages, while its defined for all the other exportable relations, like it is for instance groups, its not for galaxy credential. |
@john-westcott-iv @sean-m-sullivan so the downside of the current scheme is that it relies upon the registry being fully up to date and making use of the right |
Enable Export of Galaxy Credentials Associated to Organizations SUMMARY Addresses #9342 ISSUE TYPE Bugfix Pull Request COMPONENT NAME API AWX VERSION awx: 19.1.0 Reviewed-by: Shane McDonald <me@shanemcd.com> Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
ISSUE TYPE
SUMMARY
awx.awx.tower_export
is not exporting Galaxy Credential with the OrganizationENVIRONMENT
STEPS TO REPRODUCE
My organization have a Galaxy Credential but the export don't export it. So I finally figure out by redoing it manually and comparing.
An example of the Organization Export.
EXPECTED RESULTS
I expect that the export will also export the organization with the galaxy credential to be able to download and install collection automatically in a project sync.
ACTUAL RESULTS
Missing Galaxy Credential in my Organization.
The text was updated successfully, but these errors were encountered: