Skip to content

No way to pass tgt_type to API #213

Description

@jheiselman

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 >>>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions