def _zone_config(zones):
 if (zones is None):
  zones = DEFAULT_ZONES
 lines = [ZONE_HEADER]
 for entry in zones:
  entry.setdefault('options', '')
  entry.setdefault('in_options', '')
  entry.setdefault('out_options', '')
  lines.append((ZONE_FORMAT % entry))
 file('/etc/shorewall/zones', contents=''.join(lines), use_sudo=True)

def _zone_config ( zones ) : if ( zones is None ) : zones = DEFAULT_ZONES lines = [ ZONE_HEADER ] for entry in zones : entry . setdefault ( 'options' , '' ) entry . setdefault ( 'in_options' , '' ) entry . setdefault ( 'out_options' , '' ) lines . append ( ( ZONE_FORMAT % entry ) ) file ( '/etc/shorewall/zones' , contents = '' . join ( lines ) , use_sudo = True )
zone configuration .