CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
296 stars 187 forks source link

IP config error #1415

Closed linbolin closed 1 year ago

linbolin commented 1 year ago

typedef ipv4-address { type string { pattern '^(([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])$'; } description "An IPv4 address in dotted quad notation using the default zone."; }

leaf local-source-address { mandatory true; type ipv4-address; description "The IP address which will be the source of packets from the device to a telemetry collector destination."; }

When configuring local-source-address node value 192.168.1.168, configuration failed; error info: Invalid union value "192.168.1.168" - no matching subtype found.

michalvasko commented 1 year ago

See https://github.com/openconfig/public/issues/44. I would guess you are using some outdated YANG module because it seems Openconfig modules are now using both the standard W3C pattern with another POSIX pattern in an extension so that way it should work in libyang without problems.

linbolin commented 1 year ago

Thanks!