def _parse_ethtool_pppoe_opts(opts, iface):
 config = {}
 for opt in _DEB_CONFIG_PPPOE_OPTS:
  if (opt in opts):
   config[opt] = opts[opt]
 if (('provider' in opts) and (not opts['provider'])):
  _raise_error_iface(iface, 'provider', (_CONFIG_TRUE + _CONFIG_FALSE))
 valid = (_CONFIG_TRUE + _CONFIG_FALSE)
 for option in ('noipdefault', 'usepeerdns', 'defaultroute', 'hide-password', 'noauth', 'persist', 'noaccomp'):
  if (option in opts):
   if (opts[option] in _CONFIG_TRUE):
    config.update({option: 'True'})
   elif (opts[option] in _CONFIG_FALSE):
    config.update({option: 'False'})
   else:
    _raise_error_iface(iface, option, valid)
 return config

def _parse_ethtool_pppoe_opts ( opts , iface ) : config = { } for opt in _DEB_CONFIG_PPPOE_OPTS : if ( opt in opts ) : config [ opt ] = opts [ opt ] if ( ( 'provider' in opts ) and ( not opts [ 'provider' ] ) ) : _raise_error_iface ( iface , 'provider' , ( _CONFIG_TRUE + _CONFIG_FALSE ) ) valid = ( _CONFIG_TRUE + _CONFIG_FALSE ) for option in ( 'noipdefault' , 'usepeerdns' , 'defaultroute' , 'hide-password' , 'noauth' , 'persist' , 'noaccomp' ) : if ( option in opts ) : if ( opts [ option ] in _CONFIG_TRUE ) : config . update ( { option : 'True' } ) elif ( opts [ option ] in _CONFIG_FALSE ) : config . update ( { option : 'False' } ) else : _raise_error_iface ( iface , option , valid ) return config
filters given options and outputs valid settings for ethtools_pppoe_opts if an option has a value that is not expected .