03-28-2019 11:07 PM
Hi Experts;
I need your help to understand; we have a single NED "CISCO-IOS" which caters both IOS & IOSXE command lines; I am concerned for creating l2vpn service.
For example ASR920 with IOS-XE image; and uses below command line to create a l2vpn
----------------------
ios:interface GigabitEthernet0/0/1
service instance 121 ethernet
encapsulation dot1q 121
rewrite ingress tag pop 1 symmetric
exit
l2vpn xconnect context GROUPNAME
interworking ethernet
member GigabitEthernet0/0/1 service-instance 121
member 10.20.30.40 123456 encapsulation mpls group GROUPNAME
----------------------
For example Cisco72XX with IOS image; and uses below command line to create a l2vpn
interface GigabitEthernet0/0/1
xconnect 10.20.30.40 34567 encapsulation mpls
no mpls control-word
exit
----------------------
In this case, we need to have multiple inputs in for same type of service
Common in both device models..
1. PW-ID
2. DEVICE NAME
3. Interface NUMBER
Additional Requirement in ASR920
4. GROUPNAME
5. dot.q encapsulation & Service Instance ID
-------------------------------------
I need to know; how can it be handled? with in YANG and XML template...
1. Yang should show additional parameters requests only if ASR920 is selected
2. XML should intelligently use device command lines as device model..
Regards,
BjMork
Solved! Go to Solution.
05-20-2019 09:45 AM
Hi,
I want to request please share yang example which uses the platform based selection for the same xml code.
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ios-xe')}">
<output>{/name}-asr1K</output>
</service-policy>
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ViOS')}">
<output>{/name}-10K</output>
</service-policy>
Regards,
BjMork
03-31-2019 10:47 PM
Anyone pls suggest. Thanks
04-01-2019 04:49 AM
You will have to use a conditional to output different configuration for difference device types.
04-01-2019 07:25 AM
Hi,
When NSO does a "sync-from", for CLI devices, it will write into the platform operation tree some information such as devices platform and device type. You could use this info in your template:
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ios-xe')}">
<output>{/name}-asr1K</output>
</service-policy>
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ViOS')}">
<output>{/name}-10K</output>
</service-policy>
Roque
05-20-2019 09:45 AM
Hi,
I want to request please share yang example which uses the platform based selection for the same xml code.
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ios-xe')}">
<output>{/name}-asr1K</output>
</service-policy>
<service-policy tags="merge" when=
"{starts-with(/../../ncs:devices/ncs:device[ncs:name=$PE]/ncs:platform/ncs:name,'ViOS')}">
<output>{/name}-10K</output>
</service-policy>
Regards,
BjMork
05-21-2019 03:06 AM
hi,
The code should work with any YANG service model but with these two caveats:
- I am using the name leaf, you can use whatever you need: {/name}
- The service I am applying the template has two "go back" to reach the devices tree (/../../ncs:devices), if your service is on the root tree, you may only need one "go back" (/../ncs:devices).
Regards,
Roque
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide