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:
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")
provider = CodecServiceProvider(type="json")
Give it a try :D
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: