Git Product home page Git Product logo

Comments (5)

michalvasko avatar michalvasko commented on July 20, 2024

This is very implementation-dependent, works as intended, and is the result of different handling of configuration and state data. Default configuration data are populated "automatically" while any state data need to be provided by one of the methods.

from sysrepo.

Gris87 avatar Gris87 commented on July 20, 2024

Do you want to say that it is always works this way or we can just change method pull to push?

from sysrepo.

michalvasko avatar michalvasko commented on July 20, 2024

I only said that if you want to get default state nodes in the operational datastore, you can use pull or push method of populating the operational datastore.

from sysrepo.

yank0vy3rdna avatar yank0vy3rdna commented on July 20, 2024

If any state data need to be provided by one of the methods, why in example below sysrepo works like this?
There are no providers of data, so i didn't get why can I see default value of test1 leaf this way?

root@cb1:~# cat r.yang
module examples {
  yang-version 1.1;
  namespace "urn:examples";
  prefix e;

  container test {
    leaf test1 {
      type string;
      config false;
      default "test";
    }
  }
}
# sysrepoctl -i r.yang
# sysrepocfg -X -d operational -m examples
<test xmlns="urn:examples">
  <test1>test</test1>
</test>

Seems like it is a bug and leaf shouldn't exist in operational data until someone subscribes to it

from sysrepo.

michalvasko avatar michalvasko commented on July 20, 2024

You are right about that, not sure how the code got wrong, should be fixed, though.

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.