Change below line
cmd=("set interfaces 'target_interface' unit 0 family ethernet-switching vlan members 'vlan'")
to
cmd="set interfaces {0} unit 0 family ethernet-switching vlan members {1}".format(target_interface, vlan)
Thanks
Nitin Kr
--
You received this message because you are subscribed to the Google Groups "Junos Python EZ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
junos-python-...@googlegroups.com.
Visit this group at https://groups.google.com/group/junos-python-ez.
To view this discussion on the web visit https://groups.google.com/d/msgid/junos-python-ez/d3b7aa01-fcef-4820-89fd-2b8149c3bf3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Change below line
cmd=("set interfaces 'target_interface' unit 0 family ethernet-switching vlan members 'vlan'")
to
cmd="set interfaces {0} unit 0 family ethernet-switching vlan members {1}".format(target_interface, vlan)
Thanks
Nitin Kr
To unsubscribe from this group and stop receiving emails from it, send an email to junos-python-ez+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/junos-python-ez.
To view this discussion on the web visit
On Feb 25, 2018, at 9:14 PM, Nagaraju Budur <rajub...@gmail.com> wrote:jnpr.junos.exception.ConfigLoadError: ConfigLoadError(severity: error, bad_element: interfacesge-0/0/46unit, message: error: syntax error)
cmd="set interfaces{0}unit 0 family ethernet-switching vlan members{1}".format(target_interface,vlan)