Ensure that the named index is absent.

    name
        Name of the index to remove
519981
def absent(name):
    '''
    
    '''

    ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}

    try:
        index = __salt__['elasticsearch.index_get'](index=name)
        if index and name in index:
            if __opts__['test']:
                ret['comment'] = 'Index {0} will be removed'.format(name)
                ret['changes']['old'] = index[name]
                ret['result'] = None
            else:
                ret['result'] = __salt__['elasticsearch.index_delete'](index=name)
                if ret['result']:
                    ret['comment'] = 'Successfully removed index {0}'.format(name)
                    ret['changes']['old'] = index[name]
                else:
                    ret['comment'] = 'Failed to remove index {0} for unknown reasons'.format(name)
        else:
            ret['comment'] = 'Index {0} is already absent'.format(name)
    except Exception as err:
        ret['result'] = False
        ret['comment'] = six.text_type(err)

    return ret
223490
def rename_index(self, *args):
        '''
        '''
        if len(args) == 1:
            new_indices = args[0]
            old_indices =force_list(self.indices.keys())
        else:
            old_indices, new_indices = args
            old_indices, single = convert_index_to_keys(self.indices, old_indices)
            if single:
                old_indices, new_indices = [old_indices], [new_indices]

        if len(new_indices) != len(old_indices):
            raise ValueError('Length of update indices (%s) does not match '
                             'existing indices (%s)' %
                             (len(new_indices), len(old_indices)))

        map(MI_check_index_name, new_indices)

        if len(new_indices) != len(set(new_indices)):
            raise ValueError('New indices names are not unique: %s' % (new_indices,))

        od_replace_key(self.indices, old_indices, new_indices, multi=True)
617417
def delete(self, name):
    '''
    
    '''
    # TODO: confirm that this does not use the combo index and determine
    # performance implications.
    num_deleted = 0
    for interval,config in self._intervals.items():
      # TODO: use write preference settings if we have them
      num_deleted += self._client[interval].remove( {'name':name} )['n']
    return num_deleted
81843
def remove(self, *args):
        

        key = self.get_storage_key(*args)
        pk = self.instance.pk.get()
        logger.debug("removing %s from index %s" % (pk, key))
        self.connection.srem(key, pk)
        self._deindexed_values.add(tuple(args))
190450
def _partition_index_names(provisioned_index_names, index_names):
    ''''''
    existing_index_names = set()
    new_index_names = set()
    for name in index_names:
        if name in provisioned_index_names:
            existing_index_names.add(name)
        else:
            new_index_names.add(name)
    index_names_to_be_deleted = provisioned_index_names - existing_index_names
    return existing_index_names, new_index_names, index_names_to_be_deleted
446633
def absent(name=None, canonical=None, **api_opts):
    '''
    
    '''
    ret = {'name': name, 'result': False, 'comment': '', 'changes': {}}
    obj = __salt__['infoblox.get_cname'](name=name, canonical=canonical, **api_opts)

    if not obj:
        ret['result'] = True
        ret['comment'] = 'infoblox already removed'
        return ret

    if __opts__['test']:
        ret['result'] = None
        ret['changes'] = {'old': obj, 'new': 'absent'}
        return ret

    if __salt__['infoblox.delete_cname'](name=name, canonical=canonical, **api_opts):
        ret['result'] = True
        ret['changes'] = {'old': obj, 'new': 'absent'}
    return ret
174871
def delete_index(self, attr):
        
        if attr in self._indexes:
            del self._indexes[attr]
            self._uniqueIndexes = [ind for ind in self._indexes.values() if ind.is_unique]
        return self
1042186
public void removeAt(int index) {
        synchronized (mLock) {
            if (mOriginalValues != null) {
                mOriginalValues.remove(index);
            } else {
                mObjects.remove(index);
            }
        }
        if (mNotifyOnChange) notifyDataSetChanged();
    }
1231319
def delete_index(self):
        
        es = self._init_connection()
        if es.indices.exists(index=self.index):
            es.indices.delete(index=self.index)
1321423
def remove_index(columns, index_name = nil)
      options = if index_name
                  { name: index_name }
                else
                  { column: columns }
                end
      migration.remove_index(table_name, options)
    end
984398
def absent(name):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    # remove if needed
    if name in __salt__['pdbedit.list'](False):
        res = __salt__['pdbedit.delete'](name)
        if res[name] in ['deleted']:  # check if we need to update changes
            ret['changes'].update(res)
        elif res[name] not in ['absent']:  # oops something went wrong
            ret['result'] = False
    else:
        ret['comment'] = 'account {login} is absent'.format(login=name)

    return ret
931706
def remove(self, index):
        '''
        
        '''
        raise NotImplementedError
        if hasattr(index, '__iter__'):
            ind = set(index)
        else:
            ind = [index]

        # Rebuild relationships, excluding the provided indices
        self._relationships = [r for i, r in enumerate(self._relationships) if i not in ind]
584020
def clean_names(lines, ensure_unique_names=False, strip_prefix=False,
                make_database_safe=False):
    
    names = {}

    for row in lines:
        if strip_prefix:
            row['name'] = row['name'][row['name'].find('-') + 1:]

            if row['indexed_by'] is not None:
                row['indexed_by'] = row['indexed_by'][row['indexed_by'].find(
                    '-') + 1:]

        if ensure_unique_names:
            i = 1
            while (row['name'] if i == 1 else
                   row['name'] + "-" + str(i)) in names:
                i += 1

            names[row['name'] if i == 1 else row['name'] + "-" + str(i)] = 1

            if i > 1:
                row['name'] = row['name'] + "-" + str(i)

        if make_database_safe:
            row['name'] = row['name'].replace("-", "_")
    return lines
642579
def absent(version,
           name):
    '''
    
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    #check if cluster exists and remove it
    if __salt__['postgres.cluster_exists'](version, name):
        if __opts__.get('test'):
            ret['result'] = None
            msg = 'Cluster {0}/{1} is set to be removed'
            ret['comment'] = msg.format(version, name)
            return ret
        if __salt__['postgres.cluster_remove'](version, name, True):
            msg = 'Cluster {0}/{1} has been removed'
            ret['comment'] = msg.format(version, name)
            ret['changes'][name] = 'Absent'
            return ret

    # fallback
    ret['comment'] = 'Cluster {0}/{1} is not present, so it cannot ' \
                     'be removed'.format(version, name)
    return ret
115781
def delete_terms_indexes(es, index_name: str = "terms_*"):
    """"""

    try:
        es.indices.delete(index=index_name)
    except Exception as e:
        log.error(f"Could not delete all terms indices: {e}")
878320
def index_template_absent(name):
    '''
    
    '''

    ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}

    try:
        index_template = __salt__['elasticsearch.index_template_get'](name=name)
        if index_template and name in index_template:
            if __opts__['test']:
                ret['comment'] = 'Index template {0} will be removed'.format(name)
                ret['changes']['old'] = index_template[name]
                ret['result'] = None
            else:
                ret['result'] = __salt__['elasticsearch.index_template_delete'](name=name)
                if ret['result']:
                    ret['comment'] = 'Successfully removed index template {0}'.format(name)
                    ret['changes']['old'] = index_template[name]
                else:
                    ret['comment'] = 'Failed to remove index template {0} for unknown reasons'.format(name)
        else:
            ret['comment'] = 'Index template {0} is already absent'.format(name)
    except Exception as err:
        ret['result'] = False
        ret['comment'] = six.text_type(err)

    return ret
786756
def absent(name):
    '''
    
    '''
    ret = {'changes': {},
           'comment': '',
           'name': name,
           'result': True}

    # Make name all Uppers since make.conf uses all Upper vars
    upper_name = name.upper()

    old_value = __salt__['makeconf.get_var'](upper_name)

    if old_value is None:
        msg = 'Variable {0} is already absent from make.conf'
        ret['comment'] = msg.format(name)
    else:
        if __opts__['test']:
            msg = 'Variable {0} is set to be removed from make.conf'
            ret['comment'] = msg.format(name)
            ret['result'] = None
        else:
            __salt__['makeconf.remove_var'](upper_name)

            new_value = __salt__['makeconf.get_var'](upper_name)
            if new_value is not None:
                msg = 'Variable {0} failed to be removed from make.conf'
                ret['comment'] = msg.format(name)
                ret['result'] = False
            else:
                msg = 'Variable {0} was removed from make.conf'
                ret['comment'] = msg.format(name)
                ret['result'] = True
    return ret