Git Product home page Git Product logo

Comments (16)

michalvasko avatar michalvasko commented on June 23, 2024

validate without using the default or range values

It is not possible to avoid the standard YANG validation, you can only add your own.

is it possible to write my validations check function ?

The direct approach is to write standard sysrepo module change callbacks when you have the option to validate and refuse the configuration changes on the SR_EV_CHANGE event.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

Yes, the configuration is fully refused (not reverted because it is not applied yet), see the docs. There are no specific examples of this because there is nothing to it. Just call sr_module_change_subscribe() with your callback (an example of that can be found here) and return an error code (not SR_ERR_OK) from the callback in case your validation fails. The rest is handled by sysrepo.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

I am not here to explain NETCONF or YANG, please read the specs.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

If you are asking about connecting and authenticating to netopeer2-server they yes, you need to configure the authentication mechanisms in its YANG configuration stored in sysrepo. You can manually edit the configuration using sysrepocfg -E vim -m ietf-netconf-server, for example. You can find example segments of the supported configuration in netopeer2/example_configuration/ssh_listen.xml.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

In the current SSH server YANG module a specific single authentication method must be configured for each user. Meaning you need to select only one method for a user but each user can have a different authentication method.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

You need to send a valid XML. The prefix is needed but it must also be defined. I am sorry but you really must know how XML works, look at a tutorial.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

Yes, that is expected and works as specified. Please learn all these basics before asking anything.

from sysrepo.

samba2127 avatar samba2127 commented on June 23, 2024

from sysrepo.

michalvasko avatar michalvasko commented on June 23, 2024

Me neither, this is exactly the executed sequence of scripts during the installation. And it works fine there so I am not able to help.

from sysrepo.

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.