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

EVPN-NSO converting to Cli NED based package- template.xml issue

ZAhmad04890
Level 1
Level 1

Hi, I am converting the EVPN-NSO Netconf NED based package to CLI NED based package located at https://github.com/scadora/evpn-nso. Some portion of evpn-template.xml are not working as programmed,I have tried to use the command
"commit dry-run | debug template evpn-template", but no template debug output is showing in the terminal. I have attached the full project including Yang , Python and Templates.xml in zip file.I am using NSO5.2 and 4 x XRV9k virtual images(similar to the original example project). The missing portion on the device configuration as well as service input and cli output are shown below, while there are no runtime errors while execution.The PE devices are missing the l2transport portion of subinterface  configuration.I am trying to figure out , which part of template configuration is wrong in evpn-template.xml ,which is causing the l2transport portion of subinterface  configuration missing in the service configuration pushed by NSO to PE1, PE2 and PE3?. Hoping that someone would be able to guide me regarding the solution.Thanks and Regards.

 

*********evpn-template.xml snippet with potential issue********

<config-template xmlns="http://tail-f.com/ns/config/1.0">
 <devices xmlns="http://tail-f.com/ns/ncs">
  <?save-context evpn?>

  <?foreach {ethernet-segments} ?>
   <device>
    <name>{deref(.)/../device/device-id}</name>

    <?set INTERFACE_NAME={interface[1]/interface-type}{interface[1]/interface-id}?>
    <?if {bundle-id > 0}?>
       <?set INTERFACE_NAME=Bundle-Ether{bundle-id}?>
    <?end?>
    <?if {/vlan-id}?>
      <?set INTERFACE_NAME={$INTERFACE_NAME}.{/vlan-id}?>
    <?end?>
    <?set BVI_ID={/device-bvi[device-id = current()/device-id]/bvi-id}?>

    <?switch-context evpn?>

    <config>
     <interface xmlns="http://tail-f.com/ned/cisco-ios-xr">
      <?if {bundle-id > 0}?>
        <?if {/vlan-id}?>
         <Bundle-Ether-subinterface>
           <Bundle-Ether>
             <id>{bundle-id}.{/vlan-id}</id>
             <mode>l2transport</mode>
             <encapsulation>
              <dot1q>
               <vlan-id>{vlan-id}</vlan-id>
              </dot1q>
            </encapsulation>
         </Bundle-Ether>
      </Bundle-Ether-subinterface>
   <?else?>
      <Bundle-Ether>
         <id>{bundle-id}</id>
         <l2transport/>
      </Bundle-Ether>
    <?end?>

  <?else?>
      <?if {/vlan-id}?>
          <GigabitEthernet-subinterface>
            <GigabitEthernet>
             <id>{interface[1]/interface-id}.{/vlan-id}</id>
             <mode>l2transport</mode>
             <encapsulation>
               <dot1q>
                 <vlan-id>{vlan-id}</vlan-id>
               </dot1q>
            </encapsulation>
          </GigabitEthernet>
       </GigabitEthernet-subinterface>
   <?else?>
       <GigabitEthernet>
         <id>{interface[1]/interface-id}</id>
         <l2transport/>
      </GigabitEthernet>
   <?end?>
 <?end?>

--snip--

*********Service configuration input in NSO********

ethernet-segment SJC1
device PE1 interface GigabitEthernet 0/0/0/4
device PE2 interface GigabitEthernet 0/0/0/4

ethernet-segment DEN1 homing-type single-homed
device PE3 interface GigabitEthernet 0/0/0/4

evpn ACME_PWs
vpws PW1 ethernet-segments [ SJC1 DEN1 ] encapsulation dot1q 10


*****Missing configuration output on PE1********
interface Bundle-Ether 1.10 l2transport

 

*****Missing configuration output on PE2********
interface Bundle-Ether 1.10 l2transport

 

*****Missing configuration output on PE3********
interface GigabitEthernet0/0/0/4.10 l2transport

 

*******Actual configuration pushed to PE1 by NSO********

interface Bundle-Ether1
 lacp system mac 0000.0000.0002
 lacp system priority 1

interface GigabitEthernet0/0/0/4
 bundle id 1 mode active

evpn
 interface Bundle-Ether1
  ethernet-segment
   identifier type 0 00.00.00.00.00.00.00.11.11
!
l2vpn
 xconnect group ACME_PWs
  p2p PW1
   interface Bundle-Ether1.10
   neighbor evpn evi 1 target 1 source 1
!

*******Actual configuration pushed to PE2 by NSO********

interface Bundle-Ether1
 lacp system mac 0000.0000.0002
 lacp system priority 1

interface GigabitEthernet0/0/0/4
 bundle id 1 mode active

evpn
 interface Bundle-Ether1
  ethernet-segment
   identifier type 0 00.00.00.00.00.00.00.11.11
!
l2vpn
 xconnect group ACME_PWs
  p2p PW1
   interface Bundle-Ether1.10
   neighbor evpn evi 1 target 1 source 1
!

*******Actual configuration pushed to PE3 by NSO********

l2vpn
 xconnect group ACME_PWs
  p2p PW1
   interface GigabitEthernet0/0/0/4.10
   neighbor evpn evi 1 target 1 source 1

0 Replies 0