Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions networking_generic_switch/devices/netmiko_devices/juniper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,34 @@ class Juniper(netmiko_devices.NetmikoSwitch):
PLUG_PORT_TO_NETWORK = (
# Delete any existing VLAN associations - only one VLAN may be
# associated with an access mode port.
'delete interface {port} unit 0 family ethernet-switching '
'delete interfaces {port} unit 0 family ethernet-switching '
'vlan members',
'set interface {port} unit 0 family ethernet-switching '
'set interfaces {port} unit 0 family ethernet-switching '
'interface-mode access',
'set interfaces {port} unit 0 family ethernet-switching '
'vlan members {segmentation_id}',
)

DELETE_PORT = (
'delete interface {port} unit 0 family ethernet-switching '
'delete interfaces {port} unit 0 family ethernet-switching '
'vlan members',
)

ENABLE_PORT = (
'delete interface {port} disable',
'delete interfaces {port} disable',
)

DISABLE_PORT = (
'set interface {port} disable',
'set interfaces {port} disable',
)

ADD_NETWORK_TO_TRUNK = (
'set interface {port} unit 0 family ethernet-switching '
'set interfaces {port} unit 0 family ethernet-switching '
'vlan members {segmentation_id}',
)

REMOVE_NETWORK_FROM_TRUNK = (
'delete interface {port} unit 0 family ethernet-switching '
'delete interfaces {port} unit 0 family ethernet-switching '
'vlan members {segmentation_id}',
)

Expand Down