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

Changing inputs as a optional parameter in job-invocation #866

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

adarshdubey-star
Copy link
Contributor

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.

@adarshdubey-star
Copy link
Contributor Author

The issue with the CI failure is taken care of in this PR by @sambible
#841

jyejare
jyejare previously approved these changes Jan 6, 2023
nailgun/entities.py Outdated Show resolved Hide resolved
Co-authored-by: Gaurav Talreja <gauravtalreja1@gmail.com>
@codecov-commenter
Copy link

Codecov Report

Base: 93.85% // Head: 93.85% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (6b9c66e) compared to base (bd34895).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #866      +/-   ##
==========================================
- Coverage   93.85%   93.85%   -0.01%     
==========================================
  Files           6        6              
  Lines        2899     2898       -1     
==========================================
- Hits         2721     2720       -1     
  Misses        178      178              
Impacted Files Coverage Δ
nailgun/entities.py 93.31% <100.00%> (-0.01%) ⬇️

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.

@jyejare jyejare merged commit 51273ae into SatelliteQE:master Jan 9, 2023
github-actions bot pushed a commit that referenced this pull request Jan 9, 2023
* 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)
github-actions bot pushed a commit that referenced this pull request Jan 9, 2023
* 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)
github-actions bot pushed a commit that referenced this pull request Jan 9, 2023
* 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)
Gauravtalreja1 pushed a commit that referenced this pull request Jan 9, 2023
* 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)

Co-authored-by: Adarsh dubey <addubey@redhat.com>
Gauravtalreja1 pushed a commit that referenced this pull request Jan 9, 2023
* 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)

Co-authored-by: Adarsh dubey <addubey@redhat.com>
Gauravtalreja1 pushed a commit that referenced this pull request Jan 9, 2023
* 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)

Co-authored-by: Adarsh dubey <addubey@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.11.z 6.12.z 6.13.z CherryPick PR needs CherryPick to previous branches enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants