def stp(br=None, state='disable', iface=None):
 kernel = __grains__['kernel']
 if (kernel == 'Linux'):
  states = {'enable': 'on', 'disable': 'off'}
  return _os_dispatch('stp', br, states[state])
 elif (kernel in SUPPORTED_BSD_LIKE):
  states = {'enable': 'stp', 'disable': '-stp'}
  return _os_dispatch('stp', br, states[state], iface)
 else:
  return False

def stp ( br = None , state = 'disable' , iface = None ) : kernel = __grains__ [ 'kernel' ] if ( kernel == 'Linux' ) : states = { 'enable' : 'on' , 'disable' : 'off' } return _os_dispatch ( 'stp' , br , states [ state ] ) elif ( kernel in SUPPORTED_BSD_LIKE ) : states = { 'enable' : 'stp' , 'disable' : '-stp' } return _os_dispatch ( 'stp' , br , states [ state ] , iface ) else : return False
sets spanning tree protocol state for a bridge cli example: .