@_handle_container_not_found
    def set_cdn_metadata(self, container, metadata):
        """
        Accepts a dictionary of metadata key/value pairs and updates
        the specified container metadata with them.

        NOTE: arbitrary metadata headers are not allowed. The only metadata
        you can update are: X-Log-Retention, X-CDN-enabled, and X-TTL.
        """
        allowed = ("x-log-retention", "x-cdn-enabled", "x-ttl")
        hdrs = {}
        bad = []
        for mkey, mval in six.iteritems(metadata):
            if mkey.lower() not in allowed:
                bad.append(mkey)
                continue
            hdrs[mkey] = str(mval)
        if bad:
            raise exc.InvalidCDNMetadata("The only CDN metadata you can "
                    "update are: X-Log-Retention, X-CDN-enabled, and X-TTL. "
                    "Received the following illegal item(s): %s" %
                    ", ".join(bad))
        uri = "%s/%s" % (self.uri_base, utils.get_name(container))
        resp, resp_body = self.api.cdn_request(uri, "POST", headers=hdrs)
        return resp
dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/ContainerManager.set_cdn_metadata/original