)]}'
{"ovsdbapp/api.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"09f4512054e0a8fb99c7e683035625f632b3ef4c","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        :param if_exists: Do not fail if the record does not exist"},{"line_number":242,"context_line":"        :type if_exists:  bool"},{"line_number":243,"context_line":"        :returns:         :class:`Command` with [{\u0027column\u0027, value}, ...] result"},{"line_number":244,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_b302b908","line":243,"updated":"2017-07-20 19:13:59.000000000","message":"This doesn\u0027t actually return a result","commit_id":"bb7d95715b4f4e26bcd6a27b3fe257c239c019a0"}],"ovsdbapp/backend/ovs_idl/__init__.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"04f93948095127734fa0b999ce3d861ce4e377c6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def db_find(self, table, *conditions, **kwargs):"},{"line_number":62,"context_line":"        return cmd.DbFindCommand(self, table, *conditions, **kwargs)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def db_remove(self, table, record, column, key\u003dNone, value\u003dNone,"},{"line_number":65,"context_line":"                  if_exists\u003dFalse):"},{"line_number":66,"context_line":"        return cmd.DbRemoveCommand(self, table, record, column, key\u003dkey,"},{"line_number":67,"context_line":"                                   value\u003dvalue, if_exists\u003dif_exists)"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_9dad87ec","line":64,"updated":"2017-07-20 20:57:19.000000000","message":"To match the \"remove\" CLI command, this should handle multiple values or key value pairs. I think (preliminarily) we could do:\n\n db_remove(self, table, record, column, *values, **keyvalues):\n     if_exists \u003d keyvalues.pop()\n     ...\n\nThen in the command after determining column type, loop through values and keyvalues. if column isn\u0027t a dict, just loop through values. if column is dict, values would be keys deleted regardless of value, and keyvalues would be for deleting keys matching a value","commit_id":"bb7d95715b4f4e26bcd6a27b3fe257c239c019a0"}],"ovsdbapp/backend/ovs_idl/command.py":[{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"66c149549e4004c0e6e5c4c85339374608388ded","unresolved":false,"context_lines":[{"line_number":248,"context_line":"            if self.if_exists:"},{"line_number":249,"context_line":"                return"},{"line_number":250,"context_line":"            else:"},{"line_number":251,"context_line":"                raise RuntimeError("},{"line_number":252,"context_line":"                    \"Row doesn\u0027t exist in the DB. Request info: \""},{"line_number":253,"context_line":"                    \"Table\u003d%(table). Column\u003d%(column). \""},{"line_number":254,"context_line":"                    \"Record\u003d%(records).\" % {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f1d235d_38e64c18","line":251,"updated":"2017-07-11 12:59:36.000000000","message":"There is a RowNotFound exception in idlutils that we\u0027ve been raising. It is a RuntimeError, so existing code will catch it. \nI need to eventually move that to ovsdbapp/exceptions.py.","commit_id":"f7ef831a413bd013f36fb5e783a0973449175708"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"06dad1903a341391e2bcce59884fa9fec58e0cb3","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"    def run_idl(self, txn):"},{"line_number":246,"context_line":"        record \u003d self.api.lookup(self.table, self.record)"},{"line_number":247,"context_line":"        if not record:"},{"line_number":248,"context_line":"            if self.if_exists:"},{"line_number":249,"context_line":"                return"},{"line_number":250,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f1d235d_a9efb085","line":247,"updated":"2017-07-11 14:13:28.000000000","message":"lookup, by default will raise a RowNotFound exception, so this should be a try/except. Then later, after the check for self.if_exsits, you should just be able to call \"raise\" to raise the original exception (for future reference, when raising RowNotFound by itself, you would just do raise RowNotFound(table\u003dself.table, column\u003dself.column, record\u003dself.record).","commit_id":"f8740df4f5a21276597174a9b1cf0622cce6eb8e"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"04f93948095127734fa0b999ce3d861ce4e377c6","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            record \u003d self.api.lookup(self.table, self.record)"},{"line_number":248,"context_line":"            if isinstance(getattr(record, self.column), dict):"},{"line_number":249,"context_line":"                record.delkey(self.column, self.key, self.value)"},{"line_number":250,"context_line":"            elif isinstance(getattr(record, self.column), list):"},{"line_number":251,"context_line":"                record.delvalue(self.column, self.value or self.key)"},{"line_number":252,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_1704b8c5","line":249,"updated":"2017-07-20 20:57:19.000000000","message":"I want to be able to use these methods because they are super useful, but they aren\u0027t currently sufficient to make the error reporting guarantees because there is no way to tell whether or not they have failed. e.g. we should raise a RowNotFound if key doesn\u0027t exist or if key exists but doesn\u0027t have value val, but can\u0027t because delkey/delvalue always return None.","commit_id":"bb7d95715b4f4e26bcd6a27b3fe257c239c019a0"},{"author":{"_account_id":25007,"name":"Marcin Mirecki","email":"mmirecki@redhat.com","username":"mmirecki"},"change_message_id":"ec0026f807d457c1400c6c3bda39d8c421eeec95","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        try:"},{"line_number":247,"context_line":"            record \u003d self.api.lookup(self.table, self.record)"},{"line_number":248,"context_line":"            if isinstance(getattr(record, self.column), dict):"},{"line_number":249,"context_line":"                record.delkey(self.column, self.key, self.value)"},{"line_number":250,"context_line":"            elif isinstance(getattr(record, self.column), list):"},{"line_number":251,"context_line":"                record.delvalue(self.column, self.value or self.key)"},{"line_number":252,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1f1a1f67_af6c7b9c","line":249,"in_reply_to":"1f1a1f67_1704b8c5","updated":"2017-07-21 08:01:54.000000000","message":"Raising in case of key not present is not how ovs-vsctl would behave.\nThe ovs docs on this say:\n\"It is not an error if the column does not contain the  specified key or value or pair.\"\n\nIf we raise in case the key is not present, we should also add \"if_key_exists\" (similar to if_exists). But that again is something we do not have in ovs-vsctl.","commit_id":"bb7d95715b4f4e26bcd6a27b3fe257c239c019a0"}]}
