-
Notifications
You must be signed in to change notification settings - Fork 39
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
How to pass multiple credentials to JobTemplate.launch? #64
Comments
Looked a bit further. I added The launch() function creates what looks like a valid payload, but gets back the job template definition, not the job status JSON that I see if I run the same job from the awx cli. |
Adding the credentials parameter, plus adding the first credential to credentials= seems to fix it.
|
It would be cool if the docs described how to get a dev environment that works. e.g. so far:
As it is I can't get the existing tests to run before making a 2 line change, so I'll maintain my own fork for now. (the build script does work! :-) ) |
Hi @howardjones , thanks for the feedback. This library was build because awx is used internally and it covers the features we use but not everything as it is not an official redhat library. So apologies for not having everything working, but please feel free to submit an MR with anything that you think can improve the situation, whether that is code or documentation. I will gladly help if you need some clarifications but checking out features we do not use is not really doable with the load we are currently facing, so apologies for that. |
You indeed need python3.7 and i dropped the serializers by accident :( The tests were very quickly put in place and were not given the love they deserve that is why they are not documented. If you care to help there it would be greatly appreciated :) |
Are the tests normally run on something other than x64? The database that's baked into the fixtures doesn't load (the postgres container sits in a loop saying it can see data, but can't load it) which I think is part of the problem with that. As I mentioned, it's actually a 3 line change to add in the functionality that I need for our internal use, but I'd like to see that I haven't actively broken anything else. Followup: is there actually any data in that postgres database or do the tests and/or awx recreate it anyway? For now, I built my own wheel and put it in the relevant repo. |
There should be some default data in for some basic checks. Most tests
create and delete to validate the lifecycle of the methods.
…On Fri, Nov 6, 2020 at 9:46 AM Howard Jones ***@***.***> wrote:
Are the tests normally run on something other than x64? The database
that's baked into the fixtures doesn't load (the postgres container sits in
a loop saying it can see data, but can't load it) which I think is part of
the problem with that. As I mentioned, it's actually a 3 line change to add
in the functionality that I need for our internal use, but I'd like to see
that I haven't actively broken anything else. Followup: is there actually
any data in that postgres database or do the tests and/or awx recreate it
anyway?
For now, I built my own wheel and put it in the relevant repo.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDMK22HB5HRXILANBN376DSOOZUTANCNFSM4TI6VZ3Q>
.
|
I uploaded a patch version with the missing dependencies for now. Thanks for reporting! |
Just quickly checked the testing, it was supposed to be just a |
Hehe. The python side of things I understand, but not so much postgres. I'll poke at it some more in the next few days. |
The postgres part is not really postgres specific, it is just postgres in docker as a backend for awx with a mount of the data on the local file system. It worked like this a year back, i swear :) |
Hi @howardjones I am trying to get some colleagues involved with maintaining this and fixing the testing would be the first thing on the agenda. |
That would be cool! I have another small patch waiting, actually (skip_tags on launch()). It'd be nice to be able to run tests - I might make larger additions with that confirmation. |
awx 15.0.0
towerlib 3.4.1
python 3.8
I have a job template that needs multiple credentials. I can fetch the credentials with tower.get_credentials_by_name() and find the job template with tower.get_job_template_by_name().
JobTemplate.launch() takes a credential parameter. I have tried passing a list of the found credentials, and also their IDs (the docs don't say which is required), but neither succeeds.
The error appears to be related to something internal to towerlib checking a type variable that I don't set.
The text was updated successfully, but these errors were encountered: