Skip to content
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

[6.13.z] Changing inputs as a optional parameter in job-invocation #871

Conversation

Satellite-QE
Copy link
Contributor

Cherrypick of PR: #866

Apidoc snippet:

job_invocation[inputs]optional , nil allowed | Inputs to useValidations:Hash

Usage:

job = entities.JobInvocation().run(
            data={
                'job_template_id': 89,
                'inputs': {'command': 'ls'},
                'targeting_type': 'static_query',
                'search_query': f'name = {rhel7_contenthost.hostname}',
            }
        )

I came across this when I was trying to invoke an ansible job on a host, which raises an key error for not having an input.

* Changing inputs as a optional parameter in job-invocation

* Update nailgun/entities.py

Co-authored-by: Gaurav Talreja <gauravtalreja1@gmail.com>

Co-authored-by: Gaurav Talreja <gauravtalreja1@gmail.com>
(cherry picked from commit 51273ae)
@Satellite-QE Satellite-QE added 6.13.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR labels Jan 9, 2023
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (6.13.z@7d37479). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             6.13.z     #871   +/-   ##
=========================================
  Coverage          ?   93.85%           
=========================================
  Files             ?        6           
  Lines             ?     2898           
  Branches          ?        0           
=========================================
  Hits              ?     2720           
  Misses            ?      178           
  Partials          ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Gauravtalreja1 Gauravtalreja1 added the No-CherryPick PR doesnt need CherryPick to previous branches label Jan 9, 2023
@Gauravtalreja1 Gauravtalreja1 merged commit 1b9ff52 into 6.13.z Jan 9, 2023
@Gauravtalreja1 Gauravtalreja1 deleted the cherry-pick-6.13.z-51273ae64bf2d7bfcf460d32c0e0495cd5713bee branch January 9, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants