def sdb_delete(uri, opts):
 if (not isinstance(uri, string_types)):
  return False
 if (not uri.startswith('sdb://')):
  return False
 sdlen = len('sdb://')
 indx = uri.find('/', sdlen)
 if ((indx == (-1)) or (len(uri[(indx + 1):]) == 0)):
  return False
 profile = opts.get(uri[sdlen:indx], {})
 if (not profile):
  profile = opts.get('pillar', {}).get(uri[sdlen:indx], {})
 if ('driver' not in profile):
  return False
 fun = '{0}.delete'.format(profile['driver'])
 query = uri[(indx + 1):]
 loaded_db = salt.loader.sdb(opts, fun)
 return loaded_db[fun](query, profile=profile)

def sdb_delete ( uri , opts ) : if ( not isinstance ( uri , string_types ) ) : return False if ( not uri . startswith ( 'sdb://' ) ) : return False sdlen = len ( 'sdb://' ) indx = uri . find ( '/' , sdlen ) if ( ( indx == ( - 1 ) ) or ( len ( uri [ ( indx + 1 ) : ] ) == 0 ) ) : return False profile = opts . get ( uri [ sdlen : indx ] , { } ) if ( not profile ) : profile = opts . get ( 'pillar' , { } ) . get ( uri [ sdlen : indx ] , { } ) if ( 'driver' not in profile ) : return False fun = '{0}.delete' . format ( profile [ 'driver' ] ) query = uri [ ( indx + 1 ) : ] loaded_db = salt . loader . sdb ( opts , fun ) return loaded_db [ fun ] ( query , profile = profile )
delete a value from a db .