Closed rshxyz closed 5 years ago
req_cfgspec_all_diff()
only supports global configuration lines without child lines. It's functioning as expected.
By the way, a better way of handling both parent and child lines is to use sync_diff()
. An example, using your script follows:
from ciscoconfparse import CiscoConfParse
config = [
'ip radius source-interface Vlan63',
'logging 172.28.26.15',
'aaa group server radius STUFF',
' server name radius',
' server name radius2',
" ip radius source-interface Vlan33",
' deadtime 10',
]
p = CiscoConfParse(config)
required_lines = [
"logging 172.28.26.15",
"logging 172.16.1.5",
'aaa group server radius STUFF',
" ip radius source-interface Vlan63",
]
print p.sync_diff(required_lines, linespec="", remove_lines=False)
req_cfgspec_all_diff is not working as intended. ignore_ws=False, seems to be ignoring white space. The output is not what it's suppose to be. It should include the " ip radius source-interface Vlan63"