Git Product home page Git Product logo

Comments (8)

michalvasko avatar michalvasko commented on July 22, 2024

It all depends on the YANG modules you are using, I am guessing that address has a different key than ip or something like that.

from sysrepo.

songlinglingpml avatar songlinglingpml commented on July 22, 2024

It all depends on the YANG modules you are using, I am guessing that address has a different key than ip or something like that.

The yang content like this, address only have one key: ip

    container ipv4 {
      description
        "Parameters for the IPv4 address family.";

      container addresses {
        description
          "Enclosing container for address list";

        list address {
          key "ip";
          description
           "The list of configured IPv4 addresses on the interface.";

          leaf ip {
            type leafref {
              path "../config/ip";
            }
            description "References the configured IP address";
          }

          container config {
            description "Configuration data for each configured IPv4
            address on the interface";

            uses ipv4-address-config;

          }

          container state {

            config false;
            description "Operational state data for each IPv4 address
            configured on the interface";

            uses ipv4-address-config;
            uses ipv4-address-state;
          }

        }
      }
  grouping ipv4-address-config {

    description
      "Per IPv4 adresss configuration data for the
      interface.";

    leaf ip {
       type oc-inet:ipv4-address;
       description
        "The IPv4 address on the interface.";
    }

    leaf prefix-length {
      type uint8 {
       range "0..32";
      }
      description
       "The length of the subnet prefix.";
    }

    leaf gwaddr {
       type oc-inet:ipv4-address;
       description
        "The IPv4 gwaddress on the interface.";
    }
  }

And pyyang generate tree:
1706866075989

Is there any other possible reason?@michalvasko

from sysrepo.

michalvasko avatar michalvasko commented on July 22, 2024

If you provide the YANG modules (and all their imports) I can tell you exactly because I could not reproduce it (have tried it with some revisions that did not define mtu node).

from sysrepo.

songlinglingpml avatar songlinglingpml commented on July 22, 2024

yang.zip

My yang file is in the compressed file, thank you very much @michalvasko
Or you can delete mtu attribute

from sysrepo.

michalvasko avatar michalvasko commented on July 22, 2024

My version (current) prints the error

[ERR]: SR: Unsatisfied pattern - "8.8.177.28" does not conform to "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$". (Data location "/openconfig-interfaces:interfaces/interface[name='Ethernet4']/subinterfaces/subinterface[index='0']/openconfig-if-ip:ipv4/addresses/address/ip".)

and the reason being discussed in openconfig/public#44.

from sysrepo.

songlinglingpml avatar songlinglingpml commented on July 22, 2024

Thansk for you replay!
I cannot upgrade to the latest version. When I upgrade, I have encountered issues, such as OpenSSL and libyang have already been used by other modules in the linux system.
Are there any other suggestions ? Which patch in sysrepo or libyang I merge to, maybe can solve this problem? @michalvasko

from sysrepo.

michalvasko avatar michalvasko commented on July 22, 2024

When I upgrade, I have encountered issues, such as OpenSSL and libyang have already been used by other modules in the linux system.

I do not understand, why should a newer version cause problems, you have packages that depend on an exact libyang version instead of specifying a minimal supported version?

But, strictly speaking, an update will not solve your problem, the value will still fail to load because the pattern is in an unsupported format (described in the issue I have referenced, please read it).

from sysrepo.

songlinglingpml avatar songlinglingpml commented on July 22, 2024

I upgrade to this version tag: netopeer v2.1.71, sysrepo v2.2.105, libyang v2.1.111, and now prints the pattern error. For this issue you have referenced above, I will try some methods mentioned in that issue.
Thanks for your 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.