def __putOperation(self): if 'newadmin' in self.utakaReq.customHeaderTable: results = Service.setService(self.utakaReq.customHeaderTable['newadmin']) else: results = Service.setService(self.utakaReq.customHeaderTable['newuser']) self.utakaReq.write('accesskey:%s\r\n' % results[0]) self.utakaReq.write('secretkey:%s\r\n' % results[1])
def __getOperation(self): if self.utakaReq.user: result = Service.getService(self.utakaReq.user) userDict = result['user'] listOfBuckets = result['buckets'] self.utakaReq.req.content_type = 'application/xml' self.utakaReq.write(self.__getServiceXMLResponse(userDict, listOfBuckets)) else: raise ForbiddenException.AccessDeniedException()
def __deleteOperation(self): results = Service.destroyService(self.utakaReq.customHeaderTable['userid']) self.utakaReq.req.status = 204 pass