Giter VIP home page Giter VIP logo

Comments (6)

mchugh19 avatar mchugh19 commented on August 11, 2024

It appears that expr_form is not currently able to be set via the existing methods. Here are some examples of the json the SaltAPI can use:

The default glob method

[{
    "arg": ["echo testing"],
    "client": "local",
    "expr_form": "glob",
    "fun": "cmd.run",
    "tgt": "dynocache2*"
}]

List

[{
    "arg": ["echo testing"],
    "client": "local",
    "expr_form": "list",
    "fun": "cmd.run",
    "tgt": ["dynocache2v1.cws.dpdcn.unt.edu", "dynocache2v2.cws.dpdcn.unt.edu"]
}]

Nodegroup

[{
    "arg": ["echo testing"],
    "client": "local",
    "expr_form": "nodegroup",
    "fun": "cmd.run",
    "tgt": "webserver"
}]

from salt-netapi-client.

lucidd avatar lucidd commented on August 11, 2024

Thank you for reporting this and for providing the examples. I just tested the expr_form on my local setup and it seems to work find for the /minions and the /run endpoint. We will definitely include a way to make use of this in the future. If there is any other feature that you feel is missing from this library feel free to let us know. 😄

from salt-netapi-client.

lucidd avatar lucidd commented on August 11, 2024

This got addressed by #88

from salt-netapi-client.

mchugh19 avatar mchugh19 commented on August 11, 2024

Hey all.

The expr_form functionality is looking good. But it looks like not all are supported. https://docs.saltstack.com/en/latest/ref/clients/ shows the api and it looks like we're missing:
pcre - Perl style regular expression
grain - Match based on a grain comparison
grain_pcre - Grain comparison with a regex
pillar - Pillar data comparison
pillar_pcre - Pillar data comparison with a regex
range - Use a Range server for matching
compound - Pass a compound match string

from salt-netapi-client.

lucidd avatar lucidd commented on August 11, 2024

Hey thanks for the feedback. I opened a separate issue to keep track the progress of expr_form. If there is any particular expr_form that you need the most just comment on that issue and let us know so we can prioritize that.

from salt-netapi-client.

mcalmer avatar mcalmer commented on August 11, 2024

Seems that expr_form is deprecated and must be replaced very soon:

DeprecationWarning: The target type should be passed using the 'tgt_type' argument instead of 'expr_form'. Support for using 'expr_form' will be removed in Salt Fluorine.

salt is currently at Oxygen release and Fluorine will be the next one.

from salt-netapi-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.