def processRequest(self, command, command_data): _request = json.loads(command_data) if command == "subnode.get.all": return self.cmd_childnodes(**_request) elif command == "subnode.add": return self.cmd_addchild(**_request) elif command == "subnode.del": return self.cmd_removechild(**_request) elif command == "node.del": return self.cmd_removenode(**_request) elif command == "node.get": return self.cmd_getnode(**_request) elif command == "node.get.all": return self.cmd_getnodelist(**_request) elif command == "node.save": return self.cmd_savenode(**_request) elif command == "binary.save": return self.cmd_saveattachment(**_request) elif command == "binary.del": return self.cmd_removeattachment(**_request) elif command == "node.update.all": return self.cmd_updatenodes(**_request) elif command == "node.get.bypath": return self.cmd_getnode_bypath(**_request) elif command == "node.copy": return self.cmd_copynode(**_request) elif command == "db.make": return self.cmd_makedatabase(**_request) elif command == "db.del": return self.cmd_removedatabase(**_request) elif command == "db.copy": return self.cmd_copydatabase(**_request) elif command == "db.get.all": return self.cmd_listdatabases(**_request) elif command == "server.init": return self.cmd_rebuildserver(**_request) elif command == "authenticate": return self.authenticate(**_request) elif command == "user.new": return self.newuser(**_request) elif command == "user.del": return self.removeuser(**_request) elif command == "user.del.all": return self.removeuser_all(**_request) elif command == "user.show": return self.getuserinfo(**_request) elif command == "user.show.all": return self.getallusers(**_request) elif command == "user.passwd": return self.updatepassword(**_request) elif command == "user.dbaccess.grant": return self.grantdbaccess(**_request) elif command == "user.all.dbaccess.grant": return self.grantdbaccess_all(**_request) elif command == "user.dbaccess.revoke": return self.revokedbaccess(**_request) elif command == "user.all.dbaccess.revoke": return self.revokedbaccess_all(**_request) elif command == "user.dbaccess": return self.has_dbaccess(**_request) elif command == "user.activate": return self.activateuser(**_request) elif command == "user.deactivate": return self.deactivitateuser(**_request) elif command == "session.new": return self.cmd_createsession(**_request) elif command == "session.get": return self.cmd_getsession(**_request) elif command == "session.update": return self.cmd_updatesession(**_request) elif command == "session.drop": return self.cmd_dropsession(**_request) elif command == "memory.add": return self.cmd_additem(**_request) elif command == "memory.get": return self.cmd_getitem(**_request) elif command == "memory.getrange": return self.cmd_getrange(**_request) elif command == "memory.delete": return self.cmd_delete(**_request) elif command == "counter.update": return self.counter_update(**_request) elif command == "counter.list": return self.counter_list(**_request) elif command == "counter.clear": return self.counter_clear(**_request) elif command == "counter.get": return self.counter_get(**_request) elif command == "find": return self.cmd_find(**_request) else: return common.requestMethodNotFound("command '%s' doesn't exist" % command)
def processRequest(self, command, command_data): _request = json.loads(command_data) if command == "email.send": return self.cmd_sendmail(**_request) else: return common.requestMethodNotFound("command '%s' doesn't exist" % command)