(self, request, container_name)
Api call to get the meta-data regarding a container
Api call to get the meta-data regarding a container
Api call to get the meta - data regarding a container
def head_container(self, request, container_name):
        """
        Api call to get the meta-data regarding a container
        """
        if container_name in self.containers:
            container = self.containers[container_name]
            object_count = "{0}".format(container.object_count).encode("utf-8")
            byte_count = "{0}".format(container.byte_count).encode("utf-8")
            request.responseHeaders.setRawHeaders(b"content-type",
                                                  [b"application/json"])
            request.responseHeaders.setRawHeaders(b"x-container-object-count",
                                                  [object_count])
            request.responseHeaders.setRawHeaders(b"x-container-bytes-used",
                                                  [byte_count])
            request.setResponseCode(204)
            return b""

        else:
            return NoResource("No such container")
def head_container ( self , request , container_name ) : if container_name in self . containers : container = self . containers [ container_name ] object_count = "{0}" . format ( container . object_count ) . encode ( "utf-8" ) byte_count = "{0}" . format ( container . byte_count ) . encode ( "utf-8" ) request . responseHeaders . setRawHeaders ( b"content-type" , [ b"application/json" ] ) request . responseHeaders . setRawHeaders ( b"x-container-object-count" , [ object_count ] ) request . responseHeaders . setRawHeaders ( b"x-container-bytes-used" , [ byte_count ] ) request . setResponseCode ( 204 ) return b"" else : return NoResource ( "No such container" )