from hier_config.host import Host
from hier_config import HConfig
host = Host(hostname='test', os='nxos')
running = HConfig(host=host)
running.load_from_file('running-config.txt')
compiled = HConfig(host=host)
compiled.load_from_file('template.txt')
rem = running.config_to_get_to(compiled)
for line in rem.all_children():
print(line.cisco_style_text())
ISSUE TYPE
SOFTWARE VERSIONS
python:
Python 3.8.13 (default, Mar 17 2022, 00:00:00)
hier_config:
hier-config==2.0.1 nornir-hier-config==0.1.0
SUMMARY
I would like to generate a remediation file for a Cisco Nexus device. I found that some lines seem to be omited when you choose nxos os.
STEPS TO REPRODUCE
Create two files: running-config.txt:
template.txt:
the script when i set
nxos
from a host.EXPECTED RESULTS
ACTUAL RESULTS
When I set
host = Host(hostname='test', os='nxos')
tohost = Host(hostname='test', os='ios')
EXPECTED RESULTS
ACTUAL RESULTS