cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
731
Views
10
Helpful
1
Replies

Use of openconfig-inet-types

sfloresk
Cisco Employee
Cisco Employee

Hi team - we have been building a service that imports openconfig models. One of those models use the ipv4-address defined in openconfig-iniet-types.yang:

 

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.";
}

 

However, for some reason, NSO is not allowing an ipv4 address to be set. I believe this might be related that is in posix format.

 

I compared it with the one that is in ietf-inet-types (which works fine) and the regex is indeed different.

Do you see any specific problem with the regex above?

 

Thanks in advance

1 Accepted Solution

Accepted Solutions

vleijon
Cisco Employee
Cisco Employee

Unfortunately openconfig has chosen to use non-standards compliant regular expressions, see the discussion here https://github.com/openconfig/public/issues/44. You will have to modify them to use them in NSO.

View solution in original post

1 Reply 1

vleijon
Cisco Employee
Cisco Employee

Unfortunately openconfig has chosen to use non-standards compliant regular expressions, see the discussion here https://github.com/openconfig/public/issues/44. You will have to modify them to use them in NSO.