The networking_generic_switch.devices.netmiko_devices.juniper Module

class networking_generic_switch.devices.netmiko_devices.juniper.Juniper(device_cfg)

Bases: networking_generic_switch.devices.netmiko_devices.NetmikoSwitch

ADD_NETWORK = ('set vlans {network_id} vlan-id {segmentation_id}',)
ADD_NETWORK_TO_TRUNK = ('set interface {port} unit 0 family ethernet-switching vlan members {segmentation_id}',)
DELETE_NETWORK = ('delete vlans {network_id}',)
DELETE_PORT = ('delete interface {port} unit 0 family ethernet-switching vlan members',)
DISABLE_PORT = ('set interface {port} disable',)
ENABLE_PORT = ('delete interface {port} disable',)
PLUG_PORT_TO_NETWORK = ('delete interface {port} unit 0 family ethernet-switching vlan members', 'set interface {port} unit 0 family ethernet-switching vlan members {segmentation_id}')
REMOVE_NETWORK_FROM_TRUNK = ('delete interface {port} unit 0 family ethernet-switching vlan members {segmentation_id}',)
save_configuration(net_connect)

Save the device’s configuration.

Parameters:net_connect – a netmiko connection object.
:raises GenericSwitchNetmikoConfigError if saving the configuration
fails.
send_config_set(net_connect, cmd_set)

Send a set of configuration lines to the device.

Parameters:
  • net_connect – a netmiko connection object.
  • cmd_set – a list of configuration lines to send.
Returns:

The output of the configuration commands.