Comments (7)
I would appreciate if you can provide a bit more information regarding this requirement.
from salt-netapi-client.
The general idea of this was to have the *Call
classes know about the module name of the function they are calling. There are multiple places where is would be helpful to know the module name. For example the state.high
and state.low
could potentially be used to to bundle multiple LocalCall
s into one input for state.high/low
via module.run
. But to generate this input we need to know the modue name of each LocalCall
we want to include.
from salt-netapi-client.
Thanks @lucidd for the quick reply. While looking into this issue, i see that there are some duplication in *Call classes. Would it make sense to move the common code to an abstract class and extend our *Call classes from that? @renner
from salt-netapi-client.
Ok back to the original issue. Two scenarios.
1st, keep the old constructor(for backward compatibility) where module name is appended to function like {modulename}.{function} and then get the module name from this parameter by some parsing rule.
2nd, add another constructor which accepts module name as a separate parameter to function.
Furthermore, function parameter can also be changed to an array of strings or varargs like {high, low} if want to pass more than one function. Also, instead of functions as Strings we can introduce Enums with all the functions of a module.
Pleas bear with me if am writing some not so intelligent stuff, i haven't get much chance to contribute in community before so ignore it if anything is rude or so. It's going to be my 1st PR in community project so i am way more conscious in my approach.
from salt-netapi-client.
@admd if there is common code that can be put in a super class that would be very welcome. 👍
from salt-netapi-client.
After the merge of #197 this issue is partly fixed: we now have the module information available, but we still would want to have a getter for only the function name. Note that the current getFunction()
returns the whole string as composed from module.function
.
from salt-netapi-client.
I will take care of this on weekend .
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.