Delete all services created in namespaces associated with this backend
        :return: None
329669
def cleanup_services(self):
        
        services = self.list_services()

        for service in services:
            if service.namespace in self.managed_namespaces:
                service.delete()
334343
def delete(self):
        
        resp = self._client.delete(type(self).api_endpoint, model=self)

        if 'error' in resp:
            return False
        self.invalidate()
        return True
1227849
private void cleanupEndpointActivationServiceInfo(EndpointActivationServiceInfo easInfo) {
        if (easInfo.serviceRef == null && easInfo.endpointFactories.isEmpty()) {
            endpointActivationServices.remove(easInfo.id);
        }
    }
1698
def cleanup(self):
        

        while self.inactive_timeout > 0:
            self.time = time.time()

            keys = []

            for key, client in self.clients.items.items():
                t = getattr(client, "active_at", 0)
                if t > 0 and self.time - t > self.inactive_timeout:
                    client.kwargs["link"].disconnect()
                    keys.append(key)

            for key in keys:
                self.log_debug("Removing client (inactive): %s" % key)
                del self.clients[key]

            time.sleep(1)
415913
def remove(self, _query=None, **kwargs):
        
        for entry in self._find_entries(_query=_query, **kwargs):
            self._service.DeleteRow(entry)
610801
def clear(self):
        
        self.services.clear()
        self.services = None
        self._future_value = None
        super(AggregateDependency, self).clear()
1143695
def clean(self):
        
        cleaned_data = super(UserServiceForm, self).clean()
        sa = ServicesActivated.objects.get(name=self.initial['name'])
        # set the name of the service, related to ServicesActivated model
        cleaned_data['name'] = sa
        if sa.auth_required and sa.self_hosted:
            if cleaned_data.get('host') == '' or \
               cleaned_data.get('username') == '' or \
               cleaned_data.get('password') == '' or \
               cleaned_data.get('client_id') == '' or \
               cleaned_data.get('client_secret') == '':
                self.add_error('username', 'All the five fields are altogether mandatory')
            elif cleaned_data.get('host') is None:
                self.add_error('host', 'Check its protocol and its name')
            elif cleaned_data.get('host').endswith('/'):
                cleaned_data['host'] = cleaned_data['host'][:-1]
592559
def unregister_namespace(self, namespace):
        
        if namespace not in self._namespaces:
            raise NoRegisteredError("Namespace '{0}' is not registered on loader.".format(namespace))

        del self._namespaces[namespace]
1258662
def tablespace_remove(name, user=None, host=None, port=None,
                      maintenance_db=None, password=None, runas=None):
    '''
    
    '''
    query = 'DROP TABLESPACE "{0}"'.format(name)
    ret = _psql_prepare_and_run(['-c', query],
                                user=user,
                                host=host,
                                port=port,
                                runas=runas,
                                maintenance_db=maintenance_db,
                                password=password)
    return ret['retcode'] == 0
708784
def delete_service(resource_root, name, cluster_name="default"):
  
  return call(resource_root.delete,
      "%s/%s" % (SERVICES_PATH % (cluster_name,), name),
      ApiService)
419591
def delete(self):
        
        redis_search_key = ":".join([self.namespace, self.key, "*"])
        keys = self.conn.keys(redis_search_key)
        if keys:
            for key in keys:
                part = key.split(":")[-1]
                self._data.pop(part)
                self.conn.delete(part)

        del self
763369
def remove_namespace(self, namespace):
        """"""
        params = (namespace, )
        execute = self.cursor.execute
        execute('DELETE FROM gauged_data WHERE namespace = %s', params)
        execute('DELETE FROM gauged_statistics WHERE namespace = %s', params)
        execute('DELETE FROM gauged_keys WHERE namespace = %s', params)
        self.remove_cache(namespace)
1263148
def _clear_namespace():
    
    ok_names = set(default_backend.__dict__)
    ok_names.update(['gl2', 'glplus'])  # don't remove the module
    NS = globals()
    for name in list(NS.keys()):
        if name.lower().startswith('gl'):
            if name not in ok_names:
                del NS[name]
222629
def delete_service(self, service: str):
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Services can only be deleted '
                               'on swarm manager nodes')

        # Remove service
        self._api_client.remove_service(service)
1293331
def _uninstall(cls):
        
        if cls._hook:
            sys.meta_path.remove(cls._hook)
            cls._hook = None
1314903
def _cleanup_api(self):
        '''
        
        '''
        resources = __salt__['boto_apigateway.describe_api_resources'](restApiId=self.restApiId,
                                                                       **self._common_aws_args)
        if resources.get('resources'):
            res = resources.get('resources')[1:]
            res.reverse()
            for resource in res:
                delres = __salt__['boto_apigateway.delete_api_resources'](restApiId=self.restApiId,
                                                                          path=resource.get('path'),
                                                                          **self._common_aws_args)
                if not delres.get('deleted'):
                    return delres

        models = __salt__['boto_apigateway.describe_api_models'](restApiId=self.restApiId, **self._common_aws_args)
        if models.get('models'):
            for model in models.get('models'):
                delres = __salt__['boto_apigateway.delete_api_model'](restApiId=self.restApiId,
                                                                      modelName=model.get('name'),
                                                                      **self._common_aws_args)
                if not delres.get('deleted'):
                    return delres

        return {'deleted': True}
1200205
def destroy(self, names):
        '''
        
        '''
        mapper = salt.cloud.Map(self._opts_defaults(destroy=True))
        if isinstance(names, six.string_types):
            names = names.split(',')
        return salt.utils.data.simple_types_filter(
            mapper.destroy(names)
        )