Giter VIP home page Giter VIP logo

Comments (7)

admd avatar admd commented on August 11, 2024

I would appreciate if you can provide a bit more information regarding this requirement.

from salt-netapi-client.

lucidd avatar lucidd commented on August 11, 2024

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

admd avatar admd commented on August 11, 2024

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.

admd avatar admd commented on August 11, 2024

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.

lucidd avatar lucidd commented on August 11, 2024

@admd if there is common code that can be put in a super class that would be very welcome. 👍

from salt-netapi-client.

renner avatar renner commented on August 11, 2024

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.

admd avatar admd commented on August 11, 2024

I will take care of this on weekend .

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.