cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1168
Views
0
Helpful
0
Replies

RegEx in NetConf Request

douglasfir
Level 1
Level 1

Hi,
I am trying to apply regex in NetConfig get request for IOS XR in order to retrieve some huge BGP related data, so I wanted to apply regex in order to divide one huge request into many smaller ones.

 

I could not find almost anything about regular expressions, except something like in this document:
https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/data-models/guide/b-data-models-config-guide-asr9000/b-data-odels-config-guide-asr9000_chapter_011.html

 

Anyway, just for the sake of simple testing I applied regex based from the document above to filter bundle interfaces, but the router doesn't return anything:

<filter>
  <interface-configurations xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg">
    <interface-configuration>
      <active/>
      <interface-name>Bundle.*</interface-name>
    </interface-configuration>
  </interface-configurations>
</filter>

The response is empty:

<?xml version="1.0"?>
<rpc-reply message-id="urn:uuid:a012f10e-5b66-4560-8ba2-3b4841751ade" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data/>
</rpc-reply>

 

When I remove the regex everything works fine, just all the interfaces are listed out.
Is this a bug or there is simply no support for regexes?
I was using the latest ncclient for NetConf communication and IOS XR 7.1.3.


Thanks in advance!
Dragan

0 Replies 0