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

No way to pass tgt_type to API #213

Open
jheiselman opened this issue Dec 21, 2020 · 1 comment · May be fixed by #186
Open

No way to pass tgt_type to API #213

jheiselman opened this issue Dec 21, 2020 · 1 comment · May be fixed by #186

Comments

@jheiselman
Copy link
Contributor

jheiselman commented Dec 21, 2020

Pepper version: 0.7.6
Salt Master version: 3001+ds-2 installed via pkg repo on Ubuntu 16.04
Salt API version is the same

There does not appear to be a way to use the Pepper class to pass along a tgt_type. Passing in the expr_form argument to .local() appears to put it in the expr_form attribute on the JSON dictionary instead of the tgt_type attribute.

This has an empty return as it isn't matching properly

saltapi.local(grain, "service.status", [someservice], expr_form='grain')
{}

This works

payload = {
  'client': 'local',
  'tgt': grain,
  'tgt_type': 'grain',
  'fun': 'service.status',
  arg: [someservice]
}
saltapi.low(payload)
<<< Returns expected data >>>
jheiselman added a commit to jheiselman/pepper that referenced this issue Dec 21, 2020
Changed expr_form to tgt_type in payload passed in via local()
@timwsuqld
Copy link

Seems #186 should fix this when it's merged

@nicholasmhughes nicholasmhughes linked a pull request Nov 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants