-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
Jakarta Release
-
None
Steps to reproduce:-
In SMO UI whenever user try to edit the data for the type 'inet:ip-addrress' the error message is displayed for both the valid and invalid entries.
Issue can be reproduce with O-RAN-SC RU Simulator (Version: http://nexus3.o-ran-sc.org:10002/o-ran-sc/nts-ng-o-ran-ru-fh:1.3.3)
Cause:-
The data type pattern, which we are getting from the ietf-inet-types.yang for the data type typedef ipv4-address is correct.
// 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])' + '(%[\p{N}\p{L}]+)?'; } description "The ipv4-address type represents an IPv4 address in dotted-quad notation. The IPv4 address may include a zone index, separated by a % sign. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format for the zone index is the numerical format"; }
But at the time parsing the yang some special character is getting added in the string and later in the Regex. Show the pattern validation is failed for all types of entries.
Solution:
Removed the special characters from string after parsing the data from the yang and then converting that string to Regex.
Reference screenshot