-
Notifications
You must be signed in to change notification settings - Fork 324
Description
Hi Michal,
we are using devel branches of libyang/netconf2/sysrepo/netopeer2
file:
_3gpp-common-yang-types.yang
typedef Nid {
description "This represents the Network Identifier, which
together with a PLMN ID is used to identify a SNPN.";
type string {
pattern '^[A-Fa-f0-9]{11}$';
}
reference "3GPP TS 23.003 and 3GPP TS 23.501 clause 5.3.2.1.";
}
leaf-list nIDList {
type Nid;
max-elements 16;
description "It identifies a list of NIDs containing up to 16 NIDs, see
TS 38.331. NID is used to combine with PLMN ID to identify an SNPN.
NID is a hexadecimal range with size 44 bit.";
}
when we try to use above data with data for Nid
ABCDEFABCDE
we see below failure in netopeer2 from libyang
[2026-03-09 19:03:03.618077] [ERR]: SR: Unsatisfied pattern - "ABCDEFABCDE" does not match "^[A-Fa-f0-9]{11}$". (path "/_3gpp-common-managed-element:ManagedElement/_3gpp-nr-nrm-gnbcuupfunction:GNBCUUPFunction/_ran-nr-nrm-gnbcuupfunction:nPNIdentityList/nIDList")
when we changed the definition of Nid to remove ^ $, the pattern matching worked,
typedef Nid {
description "This represents the Network Identifier, which
together with a PLMN ID is used to identify a SNPN.";
type string {
pattern '[A-Fa-f0-9]{11}';
}
reference "3GPP TS 23.003 and 3GPP TS 23.501 clause 5.3.2.1.";
}
is this expected or should symbols in regex ^$ should work?
Thanks,
srikanth