Comments (6)
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.
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.
This got addressed by #88
from salt-netapi-client.
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.
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.
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)
- Doesn't work with API served on sub-path HOT 5
- websocket handshake 500, javax.websocket-api.jar conflict HOT 1
- com.suse.salt.netapi.calls.modules.Cmd --> cmd.script HOT 1
- Get job results from a asynchronous runner HOT 1
- This Result serializer exception HOT 6
- How to change the timezone of master or api? HOT 4
- LocalAsyncResult is not handled properly if no minions match
- Update CmdExecCodeAll refrences to CmdResult as class gets renamed in salt-net-api
- how could I get salt_returns (mysql ) when I use salt-netapi-client run method
- Using the asynchronous run method, the test found that the actual task was less than the original task. HOT 2
- Response code: 500 HOT 3
- 0.16.0 should be 1.0.0 HOT 2
- Can't open WebSocketEventStream HOT 1
- This example(Events.java) cannot be run! HOT 3
- POST /minions which returns job id not implemented? HOT 2
- Question: How can I write or modify a file?
- JsonParser support for custom type adapter factories HOT 1
- Add support for the Salt Caller client
- Xor.Right.right() should return Optional.ofNullable(right) HOT 1
- Enhance error reporting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from salt-netapi-client.