salt.modules.bridge

Module for gathering and managing bridging information

salt.modules.bridge.add(br=None)

Creates a bridge

CLI 范例:

salt '*' bridge.add br0
salt.modules.bridge.addif(br=None, iface=None)

Adds an interface to a bridge

CLI 范例:

salt '*' bridge.addif br0 eth0
salt.modules.bridge.delete(br=None)

Deletes a bridge

CLI 范例:

salt '*' bridge.delete br0
salt.modules.bridge.delif(br=None, iface=None)

Removes an interface from a bridge

CLI 范例:

salt '*' bridge.delif br0 eth0
salt.modules.bridge.find_interfaces(*args)

Returns the bridge to which the interfaces are bond to

CLI 范例:

salt '*' bridge.find_interfaces eth0 [eth1...]
salt.modules.bridge.interfaces(br=None)

Returns interfaces attached to a bridge

CLI 范例:

salt '*' bridge.interfaces br0
salt.modules.bridge.list()

Returns the machine's bridges list

CLI 范例:

salt '*' bridge.list
salt.modules.bridge.show(br=None)

Returns bridges interfaces along with enslaved physical interfaces. If no interface is given, all bridges are shown, else only the specified bridge values are returned.

CLI 范例:

salt '*' bridge.show
salt '*' bridge.show br0
salt.modules.bridge.stp(br=None, state='disable', iface=None)

Sets Spanning Tree Protocol state for a bridge

CLI 范例:

salt '*' bridge.stp br0 enable
salt '*' bridge.stp br0 disable

For BSD-like operating systems, it is required to add the interface on which to enable the STP.

CLI 范例:

salt '*' bridge.stp bridge0 enable fxp0
salt '*' bridge.stp bridge0 disable fxp0