def apply_sdb(opts, sdb_opts=None):
 import salt.utils.sdb
 if (sdb_opts is None):
  sdb_opts = opts
 if (isinstance(sdb_opts, string_types) and sdb_opts.startswith('sdb://')):
  return salt.utils.sdb.sdb_get(sdb_opts, opts)
 elif isinstance(sdb_opts, dict):
  for (key, value) in six.iteritems(sdb_opts):
   if (value is None):
    continue
   sdb_opts[key] = apply_sdb(opts, value)
 elif isinstance(sdb_opts, list):
  for (key, value) in enumerate(sdb_opts):
   if (value is None):
    continue
   sdb_opts[key] = apply_sdb(opts, value)
 return sdb_opts

def apply_sdb ( opts , sdb_opts = None ) : import salt . utils . sdb if ( sdb_opts is None ) : sdb_opts = opts if ( isinstance ( sdb_opts , string_types ) and sdb_opts . startswith ( 'sdb://' ) ) : return salt . utils . sdb . sdb_get ( sdb_opts , opts ) elif isinstance ( sdb_opts , dict ) : for ( key , value ) in six . iteritems ( sdb_opts ) : if ( value is None ) : continue sdb_opts [ key ] = apply_sdb ( opts , value ) elif isinstance ( sdb_opts , list ) : for ( key , value ) in enumerate ( sdb_opts ) : if ( value is None ) : continue sdb_opts [ key ] = apply_sdb ( opts , value ) return sdb_opts
recurse for sdb:// links for opts .