As we scale the devices, there are times when we need to perform audits on multiple devices for any specific task. It becomes very challenging to manually validate certain tasks on a specific device when we have hundreds or thousands of devices.
Let's see an example where we need to audit interface configurations and suggest corrections based upon a running config as compared to base configuration. In this case, we make use of the XML template (LinkDescriptionProfiles.xml) that contains the base configuration (or mandatory config for each of the interfaces).
The code to parse the XML template and audit interface configurations, is as follows:
<DescriptionProfiles><description id="Loopback45"><configuration>description ...