cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1400
Views
5
Helpful
3
Replies

XML template Change Command Sequence

bjronmork
Level 1
Level 1

Our New Service implementation is working fine and push configurations rightly; but We are facing command sequence issue while making changes; for example as per below config Cisco NSO generates configurations command (which are all fine) but sequence is not correct and we face issues in implementation. 

 

root@ncs(config-link-ORA01/01)# commit dry-run outformat native 
native {
    device {
        name ORA01
        data interface GigabitEthernet0/0/5
              no description
              no ip address
              service instance 25 ethernet
               description Changing to Tagged
               encapsulation dot1q 25
               rewrite ingress tag pop 1 symmetric
               bridge-domain 25
              exit
              no ip vrf forwarding NDS_NEW_SER
              no ip address
             exit
             interface BDI25
              description   Changing to Tagged
              ip vrf forwarding NDS_NEW_SER
              ip address 12.34.45.1 255.255.255.252
              load-interval 30
              no shutdown
             exit
             router ospf 3535 vrf NDS_NEW_SER
              passive-interface GigabitEthernet0/0/5
              no passive-interface BDI25
             exit
    }
}

we have below error

 

root@ncs(config-link-ORA01/01)# commit
Aborted: External error in the NED implementation for device ORA01: command: passive-interface GigabitEthernet0/0/5: %Interface specified does not belong to this process

but the correct sequence tested on device is ;

(1)
             router ospf 3535 vrf NDS_NEW_SER
              passive-interface GigabitEthernet0/0/5
(2)
interface GigabitEthernet0/0/5
  no description
  no ip address
  service instance 25 ethernet
   description Changing to Tagged
   encapsulation dot1q 25
   rewrite ingress tag pop 1 symmetric
   bridge-domain 25
  exit
  no ip vrf forwarding NDS_NEW_SER
  no ip address
exit
interface BDI25
  description   Changing to Tagged
  ip vrf forwarding NDS_NEW_SER
  ip address 12.34.45.1 255.255.255.252
  load-interval 30
  no shutdown
exit
(3)
             router ospf 3535 vrf NDS_NEW_SER
              no passive-interface BDI25
             exit

 

NSO version 4.7.3.1

NED version 6.15.1

 

Please suggest how to change sequence...

 

Regards,

BMork

 

3 Replies 3

vleijon
Cisco Employee
Cisco Employee
You should raise a ticket for this, to get a NED change.

But, for information: The sequence is controlled through annotations in the YANG module, you can open it and look around if you are interested. The annotations are documented in the manpage tailf_yang_cli_extensions.

tailf_yang_cli_extensions is a big list. What exactly i should used to make command sequence; please highlight some extension or if any example is available pls share. Thanks 

 

Regards,

BjronMork

You really should write a ticket.

But, in this case it looks like you want a dependency between router ospf X vrf Y and ip vrf forwarding Y under an interface. So we are looking at either tailf:cli-diff-dependency or a tailf:non-strict-leafref (from tailf_yang_extensions), I think. I know there are examples of this in the NED already. If you are just hacking, put a tailf:cli-diff-dependency from interface to router or something like that – no need to be fine grained if you are just proving a point.
Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?