(self, request)
return b""
Api call to get the meta-data regarding all containers for a tenant
Api call to get the meta-data regarding all containers for a tenant
Api call to get the meta - data regarding all containers for a tenant
def head_account(self, request):
        """
        Api call to get the meta-data regarding all containers for a tenant
        """
        total_containers = len(self.containers)
        total_objects = 0
        total_bytes = 0
        for container in self.containers.values():
            total_objects += container.object_count
            total_bytes += container.byte_count
        container_count = "{0}".format(total_containers).encode("utf-8")
        object_count = "{0}".format(total_objects).encode("utf-8")
        byte_count = "{0}".format(total_bytes).encode("utf-8")
        request.responseHeaders.setRawHeaders(b"content-type",
                                              [b"application/json"])
        request.responseHeaders.setRawHeaders(b"x-account-container-count",
                                              [container_count])
        request.responseHeaders.setRawHeaders(b"x-account-object-count",
                                              [object_count])
        request.responseHeaders.setRawHeaders(b"x-account-bytes-used",
                                              [byte_count])
        for k, v in self.metadata.items():
            request.responseHeaders.setRawHeaders(
                "X-Account-Meta-{0}".format(k).encode("utf-8"),
                v)

        request.setResponseCode(204)
        return b""
def head_account ( self , request ) : total_containers = len ( self . containers ) total_objects = 0 total_bytes = 0 for container in self . containers . values ( ) : total_objects += container . object_count total_bytes += container . byte_count container_count = "{0}" . format ( total_containers ) . encode ( "utf-8" ) object_count = "{0}" . format ( total_objects ) . encode ( "utf-8" ) byte_count = "{0}" . format ( total_bytes ) . encode ( "utf-8" ) request . responseHeaders . setRawHeaders ( b"content-type" , [ b"application/json" ] ) request . responseHeaders . setRawHeaders ( b"x-account-container-count" , [ container_count ] ) request . responseHeaders . setRawHeaders ( b"x-account-object-count" , [ object_count ] ) request . responseHeaders . setRawHeaders ( b"x-account-bytes-used" , [ byte_count ] ) for k , v in self . metadata . items ( ) : request . responseHeaders . setRawHeaders ( "X-Account-Meta-{0}" . format ( k ) . encode ( "utf-8" ) , v ) request . setResponseCode ( 204 ) return b""