#NEWLINE# def stp( br = None , state = 'disable' , iface = None ) : #NEWLINE# #INDENT# "\n    Sets Spanning Tree Protocol state for a bridge\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' bridge.stp br0 enable\n        salt '*' bridge.stp br0 disable\n\n    For BSD-like operating systems, it is required to add the interface on\n    which to enable the STP.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' bridge.stp bridge0 enable fxp0\n        salt '*' bridge.stp bridge0 disable fxp0\n    " #NEWLINE# kernel = __grains__ [ 'kernel' ] #NEWLINE# if ( kernel == 'Linux' ) : #NEWLINE# #INDENT# states = { #NEWLINE# #INDENT# 'enable' : 'on' , #NEWLINE# 'disable' : 'off' , #NEWLINE# #UNINDENT# } #NEWLINE# return _os_dispatch ( 'stp' , iface , states [ state ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( kernel in SUPPORTED_BSD_LIKE ) : #NEWLINE# #INDENT# states = { #NEWLINE# #INDENT# 'enable' : 'stp' , #NEWLINE# 'disable' : '-stp' , #NEWLINE# #UNINDENT# } #NEWLINE# return _os_dispatch ( 'stp' , br , states [ state ] , iface ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False