pepper icon indicating copy to clipboard operation
pepper copied to clipboard

No way to pass tgt_type to API

Open jheiselman opened this issue 5 years ago • 1 comments

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 avatar Dec 21 '20 18:12 jheiselman

Seems #186 should fix this when it's merged

timwsuqld avatar Nov 01 '23 14:11 timwsuqld