cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
172
Views
0
Helpful
0
Replies
Highlighted
Cisco Employee

Sample apps for encoding LLDP using OpenConfig

Image result for ydk

Hello again,

 

I have brought another set of sample apps for ydk-py. 

This set of sample apps allow you to encode the LLDP configuration to XML. 

 

cd-encode-oc-lldp-10-ydk.py - encode boilerplate
cd-encode-oc-lldp-20-ydk.py - enable LLDP
cd-encode-oc-lldp-22-ydk.py - enable LLDP with timer
cd-encode-oc-lldp-24-ydk.py - enable LLDP with TLV adv

 

 

You can also find the samples in the following folder of the github repository:

https://github.com/CiscoDevNet/ydk-py-samples/tree/master/samples/basic/codec/models/openconfig/openconfig-lldp

 

With this set of samples, you don't need to access to server to encode the configuration.

Also, you can easily modify the code to encode the configuration in JSON by adjusting the parameter of the code like this:

 

provider = CodecServiceProvider(type="xml")

to

provider = CodecServiceProvider(type="json")

 

 

Give it a try :D

 

 

Everyone's tags (4)
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.