Class object to store Quagga configuration files
Parses the given quagga configuration file and returns a list of configuration pairs like so: [
(‘hostname’, ‘foo’), (‘password’, ‘insertpasswordhere’), (‘enable password’, ‘insertpasswordhere’), (‘comment’, ‘! interfaces
(‘interface’, ‘lo’), (‘interface’, ‘eth0’), (‘interface’, ‘vlan0’), (‘interface’, ‘vlan1’), (‘ip’, ‘route 10.10.10.0/24 Null0 255’), (‘line’, ‘vty’), (‘access-class’, ‘vty’)
]
Validates the commands in the config file found at ‘filepath’. Returns None if no errors are found. Returns an error list with the following format if errors are found:
[[line_number, error_message, line], ...]
>>> f = open('/tmp/zebra.conf', 'w')
>>> f.write('foo start')
>>> f.close()
>>> validate_config('/tmp/zebra.conf')
[[123, "foo is not a valid Quagga command", "foo start"]]