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

Sample app for encoding XR MPLS LSD

deom
Cisco Employee
Cisco Employee

Related image

Hi everybody,

 

I came back with another sample application which encodes Multiprotocol Label Switching (MPLS) Label Switching Database (LSD) configuration for XR data model using the Codec service.

 

cd-encode-xr-mpls-lsd-cfg-10-ydk.py - Encode boilerplate
cd-encode-xr-mpls-lsd-cfg-20-ydk.py - Disable for all packets

 

The following link will lead you to the parent directory of the sample applications provided above: 

https://github.com/CiscoDevNet/ydk-py-samples/tree/master/samples/basic/codec/models/cisco-ios-xr/Cisco-IOS-XR-mpls-lsd-cfg

 

This set of sample applications has only one custom application, it might be a very good time for you to start your training for YDK-py if you have never tried running any other YDK-py sample applications.

 

If you change the following line in the application from:

 

provider = CodecServiceProvider(type="xml")

 to:

 

 

provider = CodecServiceProvider(type="json")

You can get the output in json format instead of xml.

 

 

Give it a try!

0 Replies 0