)]}'
{"ovsdbapp/backend/ovs_idl/__init__.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a14429d9f4f1e80535867cb5940b1baf46650e61","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            # If record isn\u0027t found by UUID , go ahead and look up by the table"},{"line_number":85,"context_line":"            pass"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if record \u003d\u003d \"\":"},{"line_number":88,"context_line":"            raise TypeError(\"Cannot look up record by empty string\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not self.lookup_table:"},{"line_number":91,"context_line":"            raise idlutils.RowNotFound(table\u003dtable, col\u003d\u0027record\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_c35220df","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":68},"updated":"2017-07-07 15:54:10.000000000","message":"nit: Maybe we should do this as the first thing in the method (before L73) ? This is basically parameter validation so we ideally should happen before any other action.\n\nAlso, as a suggestion, \"if not record\" is more elegant (-:","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"08207e31806c51524c40a2ce20fb0857107b9b31","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            # If record isn\u0027t found by UUID , go ahead and look up by the table"},{"line_number":85,"context_line":"            pass"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        if record \u003d\u003d \"\":"},{"line_number":88,"context_line":"            raise TypeError(\"Cannot look up record by empty string\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        if not self.lookup_table:"},{"line_number":91,"context_line":"            raise idlutils.RowNotFound(table\u003dtable, col\u003d\u0027record\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_40add4e8","line":88,"range":{"start_line":87,"start_character":0,"end_line":88,"end_character":68},"in_reply_to":"3f1d235d_c35220df","updated":"2017-07-08 05:07:40.000000000","message":"Yeah, I\u0027ll move it. A record could *theoretically* be looked up by an integer column which could be 0. I need to look up what caused me to put this in as I\u0027ve forgotten.","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"}],"ovsdbapp/schema/ovn_northbound/api.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a14429d9f4f1e80535867cb5940b1baf46650e61","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @abc.abstractmethod"},{"line_number":295,"context_line":"    def lr_add(self, router\u003dNone, may_exist\u003dFalse, **columns):"},{"line_number":296,"context_line":"        \"\"\"Create a logical router named \u0027router\u0027"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        :param router:    The optional name or uuid of the router"},{"line_number":299,"context_line":"        :type router:     string or uuid.UUID"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_892c494b","line":296,"range":{"start_line":296,"start_character":35,"end_line":296,"end_character":48},"updated":"2017-07-07 15:54:10.000000000","message":"This reads a bit strange, first time I read I thought that by default the name of the new router would be \"router\", but not, the new resource will be named accordingly to the parameter `router`.","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"08207e31806c51524c40a2ce20fb0857107b9b31","unresolved":false,"context_lines":[{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    @abc.abstractmethod"},{"line_number":295,"context_line":"    def lr_add(self, router\u003dNone, may_exist\u003dFalse, **columns):"},{"line_number":296,"context_line":"        \"\"\"Create a logical router named \u0027router\u0027"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        :param router:    The optional name or uuid of the router"},{"line_number":299,"context_line":"        :type router:     string or uuid.UUID"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_e0b3c04c","line":296,"range":{"start_line":296,"start_character":35,"end_line":296,"end_character":48},"in_reply_to":"3f1d235d_892c494b","updated":"2017-07-08 05:07:40.000000000","message":"Yeah, should be ``","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a14429d9f4f1e80535867cb5940b1baf46650e61","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \"\"\"Delete \u0027router\u0027 and all its ports"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        :param router: The name or uuid of the router"},{"line_number":311,"context_line":"        :type router:  string or uuid.UUID"},{"line_number":312,"context_line":"        :param if_exists: If True, don\u0027t fail if the router doesn\u0027t exist"},{"line_number":313,"context_line":"        :type if_exists: boolean"},{"line_number":314,"context_line":"        :returns:        :class:`Command` with no result"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_e9c61d4a","line":311,"range":{"start_line":311,"start_character":8,"end_line":311,"end_character":42},"updated":"2017-07-07 15:54:10.000000000","message":"(not related to this patch)\n\nJust an observation, I know it\u0027s the same for all other commands but I think this is a strange interface to accept a string or a uuid object. IMHO, I think we should have more consistent parameters, for example in this case we should only accept strings. Anyone creating a new resource can do a str(uuid_obj) when invoking this.","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"08207e31806c51524c40a2ce20fb0857107b9b31","unresolved":false,"context_lines":[{"line_number":308,"context_line":"        \"\"\"Delete \u0027router\u0027 and all its ports"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        :param router: The name or uuid of the router"},{"line_number":311,"context_line":"        :type router:  string or uuid.UUID"},{"line_number":312,"context_line":"        :param if_exists: If True, don\u0027t fail if the router doesn\u0027t exist"},{"line_number":313,"context_line":"        :type if_exists: boolean"},{"line_number":314,"context_line":"        :returns:        :class:`Command` with no result"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_00e59c38","line":311,"range":{"start_line":311,"start_character":8,"end_line":311,"end_character":42},"in_reply_to":"3f1d235d_e9c61d4a","updated":"2017-07-08 05:07:40.000000000","message":"I sort-of disagree. This is Python. Types don\u0027t matter. (And this is coming from me who *hates* that about Python) and the ovs python lib returns a uuid, so having to do str(uuid) every time would be *really* annoying.\n\nThe reason it is string or UUID in general is that ovn-nbctl does a \"name or uuid\" lookup. One could argue that this makes more sense for a CLI tool than a programmatic API and I wouldn\u0027t really disagree with that. I think it is a little weird. Especially when doing an add where you can look up by UUID but then use the value passed as the name field. But, we\u0027ve got some people (oVirt) who want to almost exclusively look up by UUID and others which use name lookups and I don\u0027t really want to make two methods for each object. Also, if doing the CLI backend ever happened, it\u0027d make it harder to implement the same behavior. The basic idea was to make it as close as possible just to be really easy to understand and use.\n\nI personally wouldn\u0027t be unhappy if name or uuid lookups went away entirely, but that would involve some serious discussion with several different groups.","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a14429d9f4f1e80535867cb5940b1baf46650e61","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def lrp_del(self, port, router\u003dNone, if_exists\u003dNone):"},{"line_number":344,"context_line":"        \"\"\"Delete \u0027port\u0027 from its attached router"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        :param port:      The name or w of the port"},{"line_number":347,"context_line":"        :type port:       string or uuid.UUID"},{"line_number":348,"context_line":"        :param router:    Only delete router if attached to `router`"},{"line_number":349,"context_line":"        :type router:     string or uuiwhd.UUID"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_a9c4a560","line":346,"range":{"start_line":346,"start_character":35,"end_line":346,"end_character":39},"updated":"2017-07-07 15:54:10.000000000","message":"or uuid","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"08207e31806c51524c40a2ce20fb0857107b9b31","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def lrp_del(self, port, router\u003dNone, if_exists\u003dNone):"},{"line_number":344,"context_line":"        \"\"\"Delete \u0027port\u0027 from its attached router"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        :param port:      The name or w of the port"},{"line_number":347,"context_line":"        :type port:       string or uuid.UUID"},{"line_number":348,"context_line":"        :param router:    Only delete router if attached to `router`"},{"line_number":349,"context_line":"        :type router:     string or uuiwhd.UUID"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_e0baa008","line":346,"range":{"start_line":346,"start_character":35,"end_line":346,"end_character":39},"in_reply_to":"3f1d235d_a9c4a560","updated":"2017-07-08 05:07:40.000000000","message":"Done","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"}],"ovsdbapp/schema/ovn_northbound/commands.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a14429d9f4f1e80535867cb5940b1baf46650e61","unresolved":false,"context_lines":[{"line_number":262,"context_line":"class LspDelCommand(PortDelCommand):"},{"line_number":263,"context_line":"    def __init__(self, api, port, switch\u003dNone, if_exists\u003dFalse):"},{"line_number":264,"context_line":"        super(LspDelCommand, self).__init__("},{"line_number":265,"context_line":"            api, \u0027Logical_Switch_Port\u0027, port, \u0027Logical_Switch\u0027, switch,"},{"line_number":266,"context_line":"            if_exists)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_e9f4dd89","line":265,"range":{"start_line":265,"start_character":17,"end_line":265,"end_character":38},"updated":"2017-07-07 15:54:10.000000000","message":"(not related to this patch)\n\nJust an observation, I\u0027ve seem this tables names being referred in many places on different files, we may want to consider creating constants for those in case the db schema changes in OVN for whatever reason we wouldn\u0027t need to go over many files replacing one by one (which can be error prone)","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"08207e31806c51524c40a2ce20fb0857107b9b31","unresolved":false,"context_lines":[{"line_number":262,"context_line":"class LspDelCommand(PortDelCommand):"},{"line_number":263,"context_line":"    def __init__(self, api, port, switch\u003dNone, if_exists\u003dFalse):"},{"line_number":264,"context_line":"        super(LspDelCommand, self).__init__("},{"line_number":265,"context_line":"            api, \u0027Logical_Switch_Port\u0027, port, \u0027Logical_Switch\u0027, switch,"},{"line_number":266,"context_line":"            if_exists)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f1d235d_a0d5c845","line":265,"range":{"start_line":265,"start_character":17,"end_line":265,"end_character":38},"in_reply_to":"3f1d235d_e9f4dd89","updated":"2017-07-08 05:07:40.000000000","message":"I\u0027ve gone back and forth on this. I finally decided that Logical_Switch_Port was just a lot shorter to type than constants.LOGICAL_SWITCH_PORT and that unit tests would catch errors. I agree that this is technically the wrong decision. I would not be opposed to someone fixing it. :)","commit_id":"1c9e7d5c8a10c8ad117f9b864f2696b8e881d022"}]}
