

@_handle_container_not_found
def set_cdn_metadata(self, container, metadata):
    '\n        Accepts a dictionary of metadata key/value pairs and updates\n        the specified container metadata with them.\n\n        NOTE: arbitrary metadata headers are not allowed. The only metadata\n        you can update are: X-Log-Retention, X-CDN-enabled, and X-TTL.\n        '
    allowed = ('x-log-retention', 'x-cdn-enabled', 'x-ttl')
    hdrs = {
        
    }
    bad = []
    for (mkey, mval) in six.iteritems(metadata):
        if (mkey.lower() not in allowed):
            allowed.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/VarMisuse@71/201 `bad`->`allowed`