Mark the community for deletion.

        :param delete_time: DateTime after which to delete the community.
        :type delete_time: datetime.datetime
        :raises: CommunitiesError
518286
def delete(self):
        
        if self.deleted_at is not None:
            raise CommunitiesError(community=self)
        else:
            self.deleted_at = datetime.utcnow()
279577
def delete(self, p_timestamp=None, p_write=True):
        
        timestamp = p_timestamp or self.timestamp
        index = self._get_index()

        try:
            del self.backup_dict[timestamp]
            index.remove(index[[change[0] for change in index].index(timestamp)])
            self._save_index(index)

            if p_write:
                self._write()
        except KeyError:
            pass
1271572
public static base_response delete(nitro_service client, String communityname) throws Exception {
		snmpcommunity deleteresource = new snmpcommunity();
		deleteresource.communityname = communityname;
		return deleteresource.delete_resource(client);
	}
249919
public function cleanup(string $time = self::DEFAULT_MAX_LENGTH) : void
    {
        $table = $this->loadModel('Search.SavedSearches');

        $date = strtotime($time);

        if (false === $date) {
            $this->err(sprintf('Failed to remove pre-saved searches, unsupported time value provided: %s', $time));

            return;
        }

        $count = $table->deleteAll([
            'modified <' => $date,
            'OR' => ['name' => '', 'name IS' => null]
        ]);

        $this->info($count . ' outdated pre-saved searches removed.');
    }
467037
def delete(self, stream, start_time, end_time, start_id=None, namespace=None):
    
    if isinstance(start_time, types.StringTypes):
      start_time = parse(start_time)
    if isinstance(end_time, types.StringTypes):
      end_time = parse(end_time)
    if isinstance(start_time, datetime):
      start_time = datetime_to_kronos_time(start_time)
    if isinstance(end_time, datetime):
      end_time = datetime_to_kronos_time(end_time)
    request_dict = {
      'stream': stream,
      'end_time': end_time
    }
    if start_id:
      request_dict['start_id'] = start_id
    else:
      request_dict['start_time'] = start_time

    namespace = namespace or self.namespace
    if namespace is not None:
      request_dict['namespace'] = namespace

    return self._make_request(self._delete_url, data=request_dict)
411150
def community_post_comment_delete(self, post_id, id, **kwargs):
        ""
        api_path = "/api/v2/community/posts/{post_id}/comments/{id}.json"
        api_path = api_path.format(post_id=post_id, id=id)
        return self.call(api_path, method="DELETE", **kwargs)
303636
def delete(self, **kwds):
        
        result = self._client.tag.delete(self, **kwds)
        self._delete_fields()
        return result
921945
private void deleteTimes() throws IfmapErrorResult, IfmapException {
		String filter = IfmapStrings.OP_METADATA_PREFIX + ":client-time[@" + IfmapStrings.PUBLISHER_ID_ATTR
			+ " = \"" + mSsrc.getPublisherId() + "\"]";
		PublishDelete pd = Requests.createPublishDelete(mDev, filter);
		pd.addNamespaceDeclaration(IfmapStrings.OP_METADATA_PREFIX,
				IfmapStrings.OP_METADATA_NS_URI);
		PublishRequest pr = Requests.createPublishReq(pd);

		mSsrc.publish(pr);
	}
1219562
private void markDateInvocation() {

    _updatePreviousDates = !_dateGivenInGroup;
    _dateGivenInGroup = true;
    _dateGroup.setDateInferred(false);

    if(_firstDateInvocationInGroup) {
      // if a time has been given within the current date group, 
      // we capture the current time before resetting the calendar
      if(_timeGivenInGroup) {
        int hours = _calendar.get(Calendar.HOUR_OF_DAY);
        int minutes = _calendar.get(Calendar.MINUTE);
        int seconds = _calendar.get(Calendar.SECOND);
        resetCalendar();
        _calendar.set(Calendar.HOUR_OF_DAY, hours);
        _calendar.set(Calendar.MINUTE, minutes);
        _calendar.set(Calendar.SECOND, seconds);
      }
      else {
        resetCalendar();
      }
      _firstDateInvocationInGroup = false;
    }
  }
457875
def delete(self, **kwargs):
        

        return self._client['users/*/lists/*'].delete(self.username, self.id, **kwargs)
802379
def clear_caches(delete_all=False):
    
    global _time_caches

    if delete_all:
        _time_caches = []
        _parser = { "default": CodeParser() }
    else:
        # normally just kill the expired entries, not all
        for tc in _time_caches:
            # check time_cache for expired entries
            for key, (t, value) in list(tc.items()):
                if t < time.time():
                    # delete expired entries
                    del tc[key]
333750
def delete_item(self, item):
        '''  '''
        for relation, dst in self.relations_of(item, True):
            self.delete_relation(item, relation, dst)
            #print(item, relation, dst)
        for src, relation in self.relations_to(item, True):
            self.delete_relation(src, relation, item)
            #print(src, relation, item)
        h = self._item_hash(item)
        if item in self:
            #print('deleting item:', item)
            self.nodes[h].clear()
            del self.nodes[h]
442817
def delete_items(self, retention_time, time_field="metadata__updated_on"):
        
        if retention_time is None:
            logger.debug("[items retention] Retention policy disabled, no items will be deleted.")
            return

        if retention_time <= 0:
            logger.debug("[items retention] Minutes to retain must be greater than 0.")
            return

        before_date = get_diff_current_date(minutes=retention_time)
        before_date_str = before_date.isoformat()

        es_query = '''
                    {
                      "query": {
                        "range": {
                            "%s": {
                                "lte": "%s"
                            }
                        }
                      }
                    }
                    ''' % (time_field, before_date_str)

        r = self.requests.post(self.index_url + "/_delete_by_query?refresh",
                               data=es_query, headers=HEADER_JSON, verify=False)
        try:
            r.raise_for_status()
            r_json = r.json()
            logger.debug("[items retention] %s items deleted from %s before %s.",
                         r_json['deleted'], self.anonymize_url(self.index_url), before_date)
        except requests.exceptions.HTTPError as ex:
            logger.error("[items retention] Error deleted items from %s.", self.anonymize_url(self.index_url))
            logger.error(ex)
            return
546966
def _delete(self, namespace, stream, start_id, end_time, configuration):
    
    start_time = uuid_to_kronos_time(start_id)
    body_query = {
      'query': {
        'filtered': {
          'query': {'match_all': {}},
          'filter': {
            'bool': {
              'should': [
                {
                  'range': {TIMESTAMP_FIELD: {'gt': start_time,
                                              'lte': end_time}}
                },
                {
                  'bool': {
                    'must': [
                      {'range': {ID_FIELD: {'gt': str(start_id)}}},
                      {'term': {TIMESTAMP_FIELD: start_time}}
                    ]
                  }
                }
              ]
            }
          }
        }
      }
    }
    query = {'index': self.index_manager.get_index(namespace),
             'doc_type': stream,
             'body': body_query,
             'ignore': 404,
             'allow_no_indices': True,
             'ignore_unavailable': True}
    try:
      # XXX: ElasticSearch does not return stats on deletions.
      # https://github.com/elasticsearch/elasticsearch/issues/6519
      count = self.es.count(**query).get('count', 0)
      if count:
        self.es.delete_by_query(**query)
      return count, []
    except Exception, e:
      return 0, [repr(e)]
637816
def cleanup(self):
        
        date_cur_ = datetime.now()
        for seq in (self._mv_cookie, self._mv):
            for k in list(seq.keys()):
                if (date_cur_ - seq[k][1]) > timedelta(minutes=1):
                    log.debug('Cleanup: deleting entry %s', seq[k][0])
                    del seq[k]
1026251
def remove_bookmark(self, time):
        
        self.annot.remove_bookmark(time=time)
        self.update_annotations()
400889
def clear_start_time(self):
        
        # Implemented from template for osid.assessment.AssessmentOfferedForm.clear_start_time_template
        if (self.get_start_time_metadata().is_read_only() or
                self.get_start_time_metadata().is_required()):
            raise errors.NoAccess()
        self._my_map['startTime'] = self._start_time_default