Delete object in container

        :param container: container name (Container is equivalent to
                          Bucket term in Amazon).
        :param obj: object name (Object is equivalent to
                    Key term in Amazon).
485658
def delete_object(self, container, obj, **kwargs):
        
        try:
            LOG.debug('delete_object() with %s is success.', self.driver)
            return self.driver.delete_object(container, obj, **kwargs)
        except DriverException as e:
            LOG.exception('download_object() with %s raised\
                            an exception %s.', self.driver, e)
476634
def delete(self, object_id):
        
        obj = self.session.query(self.cls).filter_by(id=object_id).one()
        self.session.delete(obj)
        return obj
1191927
def delete(self, obj):
        """"""
        del_id = obj.get_id()
        if not del_id:
            return

        coll = self.get_collection(obj.__class__.get_table_name())
        coll.delete_one({"_id": del_id})
1091979
function(obj, key) {
		var value;
		for (var i = 2; i < arguments.length; i++) {
			value = arguments[i];
			if (value !== undefined) {
				obj[key] = value;
				break;
			}
		}

		if (value === undefined) delete obj[key];

		return obj;
	}
481799
def copy_object(self, obj, new_container, new_obj_name=None,
            content_type=None):
        
        return self.manager.copy_object(self, obj, new_container,
                new_obj_name=new_obj_name, content_type=content_type)
442325
def delete_items(self, url, container, container_object=None):
        

        headers, container_uri = self._return_base_data(
            url=url,
            container=container,
            container_object=container_object
        )

        return self._deleter(uri=container_uri, headers=headers)
887637
def _deleter(self, obj):
        
        if self._fdel_ is not None:
            self._fdel_(obj)

        else:
            delattr(obj, self._attrname())

        # notify parent schema about value deletion.
        if isinstance(obj, Schema):
            obj._delvalue(self)
1258323
def delete_object(self, obj, view_kwargs):
        
        if obj is None:
            url_field = getattr(self, 'url_field', 'id')
            filter_value = view_kwargs[url_field]
            raise ObjectNotFound('{}: {} not found'.format(self.model.__name__, filter_value),
                                 source={'parameter': url_field})

        self.before_delete_object(obj, view_kwargs)

        self.session.delete(obj)
        try:
            self.session.commit()
        except JsonApiException as e:
            self.session.rollback()
            raise e
        except Exception as e:
            self.session.rollback()
            raise JsonApiException("Delete object error: " + str(e))

        self.after_delete_object(obj, view_kwargs)
241609
def _delete(self, obj, **kwargs):
        
        if isinstance(obj, sqlalchemy.orm.query.Query):
            obj = obj.one()
        obj = self.preprocessing(obj=obj).delete()
        self.session.delete(obj)
        if kwargs.get('commit', self.commit) is True:
            try:
                self.session.commit()
            except AssertionError:
                transaction.commit()
        return True
61363
def objects_delete(self, bucket, key):
    
    url = Api._ENDPOINT + (Api._OBJECT_PATH % (bucket, Api._escape_key(key)))
    datalab.utils.Http.request(url, method='DELETE', credentials=self._credentials,
                               raw_response=True)
1196448
def delete_bucket(self, bucket_name):

        '''
            
        '''

        title = '%s.delete_bucket' % self.__class__.__name__
        
    # validate inputs
        input_fields = {
            'bucket_name': bucket_name
        }
        for key, value in input_fields.items():
            object_title = '%s(%s=%s)' % (title, key, str(value))
            self.fields.validate(value, '.%s' % key, object_title)

    # check for existence of bucket
        if not bucket_name in self.bucket_list:
            if not bucket_name in self.list_buckets():
                status_msg = 'S3 bucket "%s" does not exist.' % bucket_name
                self.iam.printer(status_msg)
                return status_msg

    # retrieve list of records in bucket
        record_keys = []
        record_list, next_key = self.list_versions(bucket_name)
        for record in record_list:
            details = {
                'Key': record['key'],
                'VersionId': record['version_id']
            }
            record_keys.append(details)

    # delete records in bucket
        kw_args = {
            'Bucket': bucket_name,
            'Delete': { 'Objects': record_keys }
        }
        if record_keys:
            try:
                response = self.connection.delete_objects(**kw_args)
            except:
                raise AWSConnectionError(title)

    # continue deleting objects in bucket until empty
        if next_key:
            while next_key:
                record_keys = []
                record_list, next_key = self.list_versions(bucket_name, starting_key=next_key['key'], starting_version=next_key['version_id'])
                for record in record_list:
                    details = {
                        'Key': record['key'],
                        'VersionId': record['version_id']
                    }
                    record_keys.append(details)
                kw_args = {
                    'Bucket': bucket_name,
                    'Delete': { 'Objects': record_keys }
                }
                try:
                    response = self.connection.delete_objects(**kw_args)
                except:
                    raise AWSConnectionError(title)

    # send delete bucket request
        try:
            self.connection.delete_bucket( Bucket=bucket_name )
        except:
            raise AWSConnectionError(title)

    # report result and return true
        status_msg = 'S3 bucket "%s" deleted.' % bucket_name
        self.iam.printer(status_msg)
        
        return status_msg
813960
def use(self, container):
        
        kw = self._kw.copy()
        kw["container"] = container
        s = Storage(**kw)
        yield s
        del s
781931
function orphanContainerChildren (container, rouge = false) {
  container = fetchContainer(container)

  const children = container.children

  if (null == container)
    throw new TypeError( "orphanContainerChildren() Expecting a container " )

  for (let child of children) {
    container.removeChild(child)
    if (true === rouge) {
      orphanContainerChildren(child, true)
      CONTAINERS.delete(child.id)
    }
  }
}
1354438
def delete_object(self, obj):
        
        session = self.get_db_session()
        session.delete(obj)
        session.commit()
1356534
def delete_object(self, mpath):
        
        log.debug('DeleteObject %r', mpath)
        res, content = self._request(mpath, "DELETE")
        if res["status"] != "204":
            raise errors.MantaAPIError(res, content)
        return res
1343365
@Override
    public boolean remove(Object o) {
        IAtomContainer atomContainer = (IAtomContainer) o;

        // we should never have a null conformer
        if (atomContainer == null) return false;

        int index = indexOf(atomContainer);
        if (index >= 0) {
            remove(index);
            return true;
        }
        return false;
    }
204238
def remove_container(self, container, **kwargs):
        
        self.push_log("Removing container '{0}'.".format(container))
        set_raise_on_error(kwargs)
        super(DockerFabricClient, self).remove_container(container, **kwargs)