def add_interface(zone, interface, permanent=True):
 if (interface in get_interfaces(zone, permanent)):
  log.info('Interface is already bound to zone.')
 cmd = '--zone={0} --add-interface={1}'.format(zone, interface)
 if permanent:
  cmd += ' --permanent'
 return __firewall_cmd(cmd)

def add_interface ( zone , interface , permanent = True ) : if ( interface in get_interfaces ( zone , permanent ) ) : log . info ( 'Interface is already bound to zone.' ) cmd = '--zone={0} --add-interface={1}' . format ( zone , interface ) if permanent : cmd += ' --permanent' return __firewall_cmd ( cmd )
bind an interface to a zone .