(self, uri, acl)
| 1142 | return acl |
| 1143 | |
| 1144 | def set_acl(self, uri, acl): |
| 1145 | body = u"%s"% acl |
| 1146 | debug(u"set_acl(%s): acl-xml: %s" % (uri, body)) |
| 1147 | |
| 1148 | headers = SortedDict({'content-type': 'application/xml'}, ignore_case = True) |
| 1149 | if uri.has_object(): |
| 1150 | request = self.create_request("OBJECT_PUT", uri = uri, |
| 1151 | headers = headers, body = body, |
| 1152 | uri_params = {'acl': None}) |
| 1153 | else: |
| 1154 | request = self.create_request("BUCKET_CREATE", bucket = uri.bucket(), |
| 1155 | headers = headers, body = body, |
| 1156 | uri_params = {'acl': None}) |
| 1157 | |
| 1158 | response = self.send_request(request) |
| 1159 | return response |
| 1160 | |
| 1161 | def set_versioning(self, uri, enabled): |
| 1162 | headers = SortedDict(ignore_case = True) |
no test coverage detected