I'm working on a zero-day configuration tool and I'm trying to deploy a configuration to a EX2200 switch. I'm using the PyEZ framework to connect to the device:
dev = Device(mode='serial', port='/dev/ttyUSB0',user="user",
password="password", gather_facts=True)
dev.open()
The object dev should be an instance of the class Device, but when I check its class with dev._ class _ it says class 'jnpr.junos.console.Console'. I want to pass dev a configuration through a jinja2 template,
cu = Config(dev)
rsp=cu.load(template_path=template_path,
template_vars=config_data,merge=True)
but it gives me the following error when loading the configuration:
Error loading config: 'Console' object has no attribute '_j2ldr'
Any help would be greatly appreciated. Thanks!