)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Recovery: Moved resource fetching in drivers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to different interface for fetching resources information,"},{"line_number":10,"context_line":"we need a lot of conditions during recovery."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds _recovery and _full_sync methods inside the"},{"line_number":13,"context_line":"drivers. It will keep complexity away from full sync and keep"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"1f485f77_6288f370","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":44},"updated":"2017-11-09 16:16:02.000000000","message":"Each driver has a different way of fetching resource information. Right now it is handled by a global function which handles different conditions. However, it makes sense to encapsulate this functionality in a per-driver basis.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Due to different interface for fetching resources information,"},{"line_number":10,"context_line":"we need a lot of conditions during recovery."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds _recovery and _full_sync methods inside the"},{"line_number":13,"context_line":"drivers. It will keep complexity away from full sync and keep"},{"line_number":14,"context_line":"specific details to, where they belong."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"1f485f77_c249e760","line":12,"range":{"start_line":12,"start_character":11,"end_line":12,"end_character":15},"updated":"2017-11-09 16:16:02.000000000","message":"adds two standard methods (...) to all drivers that are responsible of executing the proper operations\n\nor something like that... (I\u0027m not happy with what I wrote but you understand what I\u0027m pointing at)","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":10,"context_line":"we need a lot of conditions during recovery."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch adds _recovery and _full_sync methods inside the"},{"line_number":13,"context_line":"drivers. It will keep complexity away from full sync and keep"},{"line_number":14,"context_line":"specific details to, where they belong."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I678bf3ba065cb8c93fa39d9e5f6d32f7e0184ce6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"1f485f77_622c7399","line":13,"range":{"start_line":13,"start_character":43,"end_line":13,"end_character":52},"updated":"2017-11-09 16:16:02.000000000","message":"isn\u0027t it recovery? :)","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"}],"doc/source/contributor/drivers_architecture.rst":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"0a60cd01bee8d70280133ae805777963ba69285d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"     mechanism handles the case, where resources are fetched only by resource"},{"line_number":70,"context_line":"     id. However in this case, nested resources are to be fetched, this"},{"line_number":71,"context_line":"     inconsistency is handled by *_recovery*."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"*_full_sync* method in driver class is defined, if customized resource"},{"line_number":74,"context_line":"fetching is required or some pre processing or post porcessing"},{"line_number":75,"context_line":"for sync of a resource is to be done. For examples"}],"source_content_type":"text/x-rst","patch_set":20,"id":"3f4b6375_bfa8a41f","line":72,"updated":"2017-10-25 00:07:57.000000000","message":"please describe default behaviour.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"0a60cd01bee8d70280133ae805777963ba69285d","unresolved":false,"context_lines":[{"line_number":82,"context_line":"  #. For lbaas driver, as per default resource fetching mechanism, it looks for"},{"line_number":83,"context_line":"     *get_member* but *get_pool_member* is defined in lbaas plugin, these"},{"line_number":84,"context_line":"     kind of inconsistencies can be handled in *_full_sync* method."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"Journal Entry Lifecycle"},{"line_number":87,"context_line":"-----------------------"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"3f4b6375_9fa5e849","line":85,"updated":"2017-10-25 00:07:57.000000000","message":"ditto.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"}],"networking_odl/bgpvpn/odl_v2.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"87db5f6756b11776f28344201de020165d842594","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                self.get_resources)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @classmethod"},{"line_number":64,"context_line":"    def get_resources(cls, context, resource_type, nested_resource_id\u003dNone,"},{"line_number":65,"context_line":"                      nesting_resource_id\u003dNone):"},{"line_number":66,"context_line":"        plugin \u003d directory.get_plugin(bgpvpn_const.LABEL)"},{"line_number":67,"context_line":"        if resource_type \u003d\u003d odl_const.ODL_BGPVPN:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_9d788f2a","line":64,"updated":"2017-09-13 14:27:55.000000000","message":"Like HERE","commit_id":"f60551ecb574fe1812417989e93561f29742197e"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def get_resource_for_recovery(context, obj, plugin_type):"},{"line_number":77,"context_line":"        plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":78,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_BGPVPN:"},{"line_number":79,"context_line":"            obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % obj.object_type)"},{"line_number":80,"context_line":"            return obj_getter(context, obj.object_uuid)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        method_name \u003d \"get_%s\" % obj.object_type"},{"line_number":83,"context_line":"        return resource_syncer.get_nested_resource("}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_7e4bf986","line":80,"range":{"start_line":79,"start_character":12,"end_line":80,"end_character":55},"updated":"2017-09-19 08:13:12.000000000","message":"You can just:\n\n  return get_resource_by_id(..)","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"BGPVPN_RESOURCES \u003d {"},{"line_number":36,"context_line":"    odl_const.ODL_BGPVPN: odl_const.ODL_BGPVPNS,"},{"line_number":37,"context_line":"    odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION:"},{"line_number":38,"context_line":"        odl_const.ODL_BGPVPN_NETWORK_ASSOCIATIONS,"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION:"},{"line_number":41,"context_line":"        odl_const.ODL_BGPVPN_ROUTER_ASSOCIATIONS"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_e454fa56","line":41,"range":{"start_line":37,"start_character":0,"end_line":41,"end_character":48},"updated":"2017-10-18 06:07:30.000000000","message":"association is covered by ODL_BGPVPNS case. so it\u0027s not necessary to sync association.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"BGPVPN_RESOURCES \u003d {"},{"line_number":36,"context_line":"    odl_const.ODL_BGPVPN: odl_const.ODL_BGPVPNS,"},{"line_number":37,"context_line":"    odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION:"},{"line_number":38,"context_line":"        odl_const.ODL_BGPVPN_NETWORK_ASSOCIATIONS,"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION:"},{"line_number":41,"context_line":"        odl_const.ODL_BGPVPN_ROUTER_ASSOCIATIONS"},{"line_number":42,"context_line":"}"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_ab9306a3","line":41,"range":{"start_line":37,"start_character":0,"end_line":41,"end_character":48},"in_reply_to":"3f4b6375_e454fa56","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        resource_syncer.register(bgpvpn_const.LABEL, BGPVPN_RESOURCES, self)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _full_sync(self, context, plugin, resource_suffix):"},{"line_number":62,"context_line":"        if resource_suffix \u003d\u003d odl_const.ODL_BGPVPNS:"},{"line_number":63,"context_line":"            return resource_syncer.get_resources(context, plugin,"},{"line_number":64,"context_line":"                                                 resource_suffix)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_64948ae9","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":52},"updated":"2017-10-18 06:07:30.000000000","message":"no need to handle association.\nmore explicitly we can do\nassert resource_suffic \u003d\u003d ODL_BGPVPN","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        resource_syncer.register(bgpvpn_const.LABEL, BGPVPN_RESOURCES, self)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _full_sync(self, context, plugin, resource_suffix):"},{"line_number":62,"context_line":"        if resource_suffix \u003d\u003d odl_const.ODL_BGPVPNS:"},{"line_number":63,"context_line":"            return resource_syncer.get_resources(context, plugin,"},{"line_number":64,"context_line":"                                                 resource_suffix)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_8b928a9d","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":52},"in_reply_to":"3f4b6375_64948ae9","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @staticmethod"},{"line_number":80,"context_line":"    def _recovery(context, obj, plugin):"},{"line_number":81,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_BGPVPN:"},{"line_number":82,"context_line":"            return resource_syncer.get_resource_by_id(context, obj, plugin)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        method_name \u003d \"get_%s\" % obj.object_type"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_249e9207","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":51},"updated":"2017-10-18 06:07:30.000000000","message":"ditto.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @staticmethod"},{"line_number":80,"context_line":"    def _recovery(context, obj, plugin):"},{"line_number":81,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_BGPVPN:"},{"line_number":82,"context_line":"            return resource_syncer.get_resource_by_id(context, obj, plugin)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        method_name \u003d \"get_%s\" % obj.object_type"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_6b8d0e7a","line":81,"range":{"start_line":81,"start_character":0,"end_line":81,"end_character":51},"in_reply_to":"3f4b6375_249e9207","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    @log_helpers.log_method_call"},{"line_number":124,"context_line":"    def create_net_assoc_precommit(self, context, net_assoc):"},{"line_number":125,"context_line":"        our_bgpvpn \u003d self._update_for_net_assoc(context, net_assoc)"},{"line_number":126,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":127,"context_line":"                       our_bgpvpn[\u0027id\u0027], odl_const.ODL_UPDATE, our_bgpvpn)"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_aa580b56","line":125,"updated":"2017-10-18 08:08:58.000000000","message":"Not really your fault, but in L131, L146 and L152 bgpvpn is used instead of our_bgpvpn. I think it makes sense to be consistent.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"BGPVPN_RESOURCES \u003d {"},{"line_number":36,"context_line":"    odl_const.ODL_BGPVPN: odl_const.ODL_BGPVPNS,"},{"line_number":37,"context_line":"}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_3dfbc347","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":48},"updated":"2017-10-23 22:27:16.000000000","message":"nitpick: please add comment on why association isn\u0027t needed.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"BGPVPN_RESOURCES \u003d {"},{"line_number":36,"context_line":"    odl_const.ODL_BGPVPN: odl_const.ODL_BGPVPNS,"},{"line_number":37,"context_line":"}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_5e755231","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":48},"in_reply_to":"3f4b6375_3dfbc347","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":75,"context_line":"                       bgpvpn[\u0027id\u0027], odl_const.ODL_DELETE, [])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _update_for_net_assoc(self, context, net_assoc):"},{"line_number":78,"context_line":"        our_bgpvpn \u003d None"},{"line_number":79,"context_line":"        bgpvpns \u003d self.get_bgpvpns(context)"},{"line_number":80,"context_line":"        for bgpvpn in bgpvpns:"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_6664f522","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":56},"updated":"2017-11-02 19:46:24.000000000","message":"Is this change needed?\nI know this was needed by previous patches. But the current patch, this method is used only by created_netw_assoc_precommit.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":75,"context_line":"                       bgpvpn[\u0027id\u0027], odl_const.ODL_DELETE, [])"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def _update_for_net_assoc(self, context, net_assoc):"},{"line_number":78,"context_line":"        our_bgpvpn \u003d None"},{"line_number":79,"context_line":"        bgpvpns \u003d self.get_bgpvpns(context)"},{"line_number":80,"context_line":"        for bgpvpn in bgpvpns:"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_67c868a7","line":77,"range":{"start_line":77,"start_character":4,"end_line":77,"end_character":56},"in_reply_to":"3f4b6375_6664f522","updated":"2017-11-03 09:42:31.000000000","message":"Done","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":108,"context_line":"                       bgpvpn[\u0027id\u0027], odl_const.ODL_UPDATE, bgpvpn)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _update_for_router_assoc(self, context, router_assoc):"},{"line_number":111,"context_line":"        associated_routers \u003d self.get_router_assocs(context,"},{"line_number":112,"context_line":"                                                    router_assoc[\u0027bgpvpn_id\u0027])"},{"line_number":113,"context_line":"        for assoc_router in associated_routers:"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_4669f9f6","line":110,"range":{"start_line":110,"start_character":4,"end_line":110,"end_character":62},"updated":"2017-11-02 19:46:24.000000000","message":"similar as above.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":108,"context_line":"                       bgpvpn[\u0027id\u0027], odl_const.ODL_UPDATE, bgpvpn)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _update_for_router_assoc(self, context, router_assoc):"},{"line_number":111,"context_line":"        associated_routers \u003d self.get_router_assocs(context,"},{"line_number":112,"context_line":"                                                    router_assoc[\u0027bgpvpn_id\u0027])"},{"line_number":113,"context_line":"        for assoc_router in associated_routers:"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_47cd6cb5","line":110,"range":{"start_line":110,"start_character":4,"end_line":110,"end_character":62},"in_reply_to":"3f4b6375_4669f9f6","updated":"2017-11-03 09:42:31.000000000","message":"Done","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a0b3b1947afc456bd3387cb159a1f7c5821dd3c9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                        driver\u003d\"OpenDaylight V2\","},{"line_number":90,"context_line":"                        network\u003dnet_assoc[\u0027network_id\u0027],"},{"line_number":91,"context_line":"                        bgpvpn\u003dbgpvpn[\u0027id\u0027])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        journal.record(context, odl_const.ODL_BGPVPN,"},{"line_number":94,"context_line":"                       our_bgpvpn[\u0027id\u0027], odl_const.ODL_UPDATE, our_bgpvpn)"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_1b70a171","line":92,"range":{"start_line":92,"start_character":0,"end_line":92,"end_character":0},"updated":"2017-11-07 17:39:18.000000000","message":"nitpick: unrelated change.\nOnly in case of resping.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION and"},{"line_number":36,"context_line":"# odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION are not registered because"},{"line_number":37,"context_line":"# these resources are covered by odl_const.BGPVPNS. Associated network"},{"line_number":38,"context_line":"# and routers are association attributes of bgpvpn, which are updated"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_82e88f16","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":1},"updated":"2017-11-09 16:16:02.000000000","message":"# NOTE(rajivk): ...","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"}],"networking_odl/common/constants.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":96,"context_line":"# dict to store url mappings"},{"line_number":97,"context_line":"RESOURCE_URL_MAPPINGS \u003d {"},{"line_number":98,"context_line":"    ODL_QOS_POLICY: \"%s/%s\" % (ODL_QOS, ODL_QOS_POLICIES),"},{"line_number":99,"context_line":"    ODL_SFC_FLOW_CLASSIFIER: \"%s/%s\" % (ODL_SFC, ODL_SFC_FLOW_CLASSIFIERS),"},{"line_number":100,"context_line":"    ODL_SFC_PORT_PAIR: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIRS),"},{"line_number":101,"context_line":"    ODL_SFC_PORT_PAIR_GROUP: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIR_GROUPS),"},{"line_number":102,"context_line":"    ODL_SFC_PORT_CHAIN: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_CHAINS),"},{"line_number":103,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_a71ba471","line":102,"range":{"start_line":99,"start_character":0,"end_line":102,"end_character":65},"updated":"2017-10-18 06:07:30.000000000","message":"This is an independent fix.\nCan you please split out into independent patch?\nso that we can merge this fix early.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":96,"context_line":"# dict to store url mappings"},{"line_number":97,"context_line":"RESOURCE_URL_MAPPINGS \u003d {"},{"line_number":98,"context_line":"    ODL_QOS_POLICY: \"%s/%s\" % (ODL_QOS, ODL_QOS_POLICIES),"},{"line_number":99,"context_line":"    ODL_SFC_FLOW_CLASSIFIER: \"%s/%s\" % (ODL_SFC, ODL_SFC_FLOW_CLASSIFIERS),"},{"line_number":100,"context_line":"    ODL_SFC_PORT_PAIR: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIRS),"},{"line_number":101,"context_line":"    ODL_SFC_PORT_PAIR_GROUP: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIR_GROUPS),"},{"line_number":102,"context_line":"    ODL_SFC_PORT_CHAIN: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_CHAINS),"},{"line_number":103,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_cb9882c1","line":102,"range":{"start_line":99,"start_character":0,"end_line":102,"end_character":65},"in_reply_to":"3f4b6375_8a2aef8d","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":96,"context_line":"# dict to store url mappings"},{"line_number":97,"context_line":"RESOURCE_URL_MAPPINGS \u003d {"},{"line_number":98,"context_line":"    ODL_QOS_POLICY: \"%s/%s\" % (ODL_QOS, ODL_QOS_POLICIES),"},{"line_number":99,"context_line":"    ODL_SFC_FLOW_CLASSIFIER: \"%s/%s\" % (ODL_SFC, ODL_SFC_FLOW_CLASSIFIERS),"},{"line_number":100,"context_line":"    ODL_SFC_PORT_PAIR: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIRS),"},{"line_number":101,"context_line":"    ODL_SFC_PORT_PAIR_GROUP: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_PAIR_GROUPS),"},{"line_number":102,"context_line":"    ODL_SFC_PORT_CHAIN: \"%s/%s\" % (ODL_SFC, ODL_SFC_PORT_CHAINS),"},{"line_number":103,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_8a2aef8d","line":102,"range":{"start_line":99,"start_character":0,"end_line":102,"end_character":65},"in_reply_to":"3f4b6375_a71ba471","updated":"2017-10-18 08:08:58.000000000","message":"+1\n\nIt makes the changelog much more precise and easy to understand what is going on in each patchset.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"}],"networking_odl/journal/base.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b6ef5bcd95f24553310158ff1e67bb05d0244cc2","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def get_resources(context, plugin_type, resource_type, id_\u003dNone):"},{"line_number":52,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":53,"context_line":"    if resource_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"},{"line_number":54,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_l2_gateway_connection\u0027)"},{"line_number":55,"context_line":"    else:"},{"line_number":56,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_type)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_98df6839","line":54,"range":{"start_line":53,"start_character":0,"end_line":54,"end_character":65},"updated":"2017-09-06 14:37:54.000000000","message":"Hmm, how ugly this is. Does this mean full_sync is broken with l2 gateway?\n\nWhat about passing additional argument\u003dNone?\nIf it\u0027s None, falls back to line 56.","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"4bee10a1e3ec09c1b583307d0c69f8145d1035b5","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def get_resources(context, plugin_type, resource_type, id_\u003dNone):"},{"line_number":52,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":53,"context_line":"    if resource_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"},{"line_number":54,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_l2_gateway_connection\u0027)"},{"line_number":55,"context_line":"    else:"},{"line_number":56,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_type)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_6f4e1b39","line":54,"range":{"start_line":53,"start_character":0,"end_line":54,"end_character":65},"in_reply_to":"7f287b81_98df6839","updated":"2017-09-08 05:51:38.000000000","message":"No, i full sync is not broken because we are using ODL_L2GATEWAY_CONNECTIONS and it\u0027s value(l2_gateway_connections\u0027 is, what plugin expext. but value of ODL_L2_CONNECTION is \u0027l2gateway_connection\u0027 but exptected value is \u0027l2_gateway_connection. See here diff b/w two constants, https://github.com/openstack/networking-odl/blob/master/networking_odl/common/constants.py#L70-L71.\n\nsee: https://github.com/openstack/networking-l2gw/blob/8de204056ce250ce1d9fd54d818c86ee24f8ddea/networking_l2gw/db/l2gateway/l2gateway_db.py#L327","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5f2577a7_4e24f4c6","updated":"2017-09-11 07:17:41.000000000","message":"I would call it utils or common, base is a name that sounds more likely for base classes.","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"}],"networking_odl/journal/common.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"87db5f6756b11776f28344201de020165d842594","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from networking_odl.journal import journal"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"ALL_RESOURCES \u003d dict()"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(driver, resources, handler\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_3d8e3b2e","line":23,"range":{"start_line":23,"start_character":16,"end_line":23,"end_character":22},"updated":"2017-09-13 14:27:55.000000000","message":"recommended pythonic way is {}","commit_id":"f60551ecb574fe1812417989e93561f29742197e"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"068c8d5ed8e5c3b4e34ecfaa79dc7e318d21eb82","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"5f2577a7_d1e816e3","updated":"2017-09-14 22:15:21.000000000","message":"Probably a better module name is \"resource_fetcher\" or something similar because thats what this module does.","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fff307862e970776dd8085592e0631813ff133a0","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(driver, resources, handler\u003dNone):"},{"line_number":27,"context_line":"    def default_handler(context, resource_type, id_\u003dNone, is_full_sync\u003dTrue):"},{"line_number":28,"context_line":"        if is_full_sync:"},{"line_number":29,"context_line":"            return get_resources(context, driver, resources[resource_type])"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_9a3d032d","line":27,"range":{"start_line":27,"start_character":58,"end_line":27,"end_character":75},"updated":"2017-09-15 00:50:01.000000000","message":"Only method to get for plural resources will do with filter.","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"72541eabd8116b4bc6c8fcb3293fe5cb3ba2e57e","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(driver, resources, handler\u003dNone):"},{"line_number":27,"context_line":"    def default_handler(context, resource_type, id_\u003dNone, is_full_sync\u003dTrue):"},{"line_number":28,"context_line":"        if is_full_sync:"},{"line_number":29,"context_line":"            return get_resources(context, driver, resources[resource_type])"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        return get_resources(context, driver, resource_type, id_)"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_2e2135b1","line":29,"range":{"start_line":28,"start_character":8,"end_line":29,"end_character":75},"updated":"2017-09-14 22:03:26.000000000","message":"This approach is confusing, it would be much simpler and elegant to have a \"full_sync_handler\" and a \"recovery_handler\" for each resources type.\n\nThe default implementations could be a \"get_resources\" or a \"get_resource_by_id\" type of methods that can also be provided by the different drivers.","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"068c8d5ed8e5c3b4e34ecfaa79dc7e318d21eb82","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(driver, resources, handler\u003dNone):"},{"line_number":27,"context_line":"    def default_handler(context, resource_type, id_\u003dNone, is_full_sync\u003dTrue):"},{"line_number":28,"context_line":"        if is_full_sync:"},{"line_number":29,"context_line":"            return get_resources(context, driver, resources[resource_type])"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        return get_resources(context, driver, resource_type, id_)"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_f1b8b2e5","line":29,"range":{"start_line":28,"start_character":8,"end_line":29,"end_character":75},"in_reply_to":"5f2577a7_2e2135b1","updated":"2017-09-14 22:15:21.000000000","message":"Probably even \"get_resources_handler\" and \"get_resource_handler\" would make sense, to decouple this a bit from the use and make it more reusable.\n\nAlso doctext would be nice for future drivers.","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fff307862e970776dd8085592e0631813ff133a0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        if is_full_sync:"},{"line_number":29,"context_line":"            return get_resources(context, driver, resources[resource_type])"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        return get_resources(context, driver, resource_type, id_)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    handler \u003d handler or default_handler"},{"line_number":34,"context_line":"    for resource in resources:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_5a431bb0","line":31,"range":{"start_line":31,"start_character":27,"end_line":31,"end_character":28},"updated":"2017-09-15 00:50:01.000000000","message":"get_resource?\n(no trailing \u0027s\u0027)","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fff307862e970776dd8085592e0631813ff133a0","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def get_resources(context, plugin_type, resource_type, id_\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if resource_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"},{"line_number":55,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_l2_gateway_connection\u0027)"},{"line_number":56,"context_line":"    else:"},{"line_number":57,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_type)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_3a084f90","line":55,"range":{"start_line":54,"start_character":0,"end_line":55,"end_character":65},"updated":"2017-09-15 00:50:01.000000000","message":"+1.\nThis part can be pushed down into l2gw","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"068c8d5ed8e5c3b4e34ecfaa79dc7e318d21eb82","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def get_resources(context, plugin_type, resource_type, id_\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if resource_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"},{"line_number":55,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_l2_gateway_connection\u0027)"},{"line_number":56,"context_line":"    else:"},{"line_number":57,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_type)"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_711602f4","line":55,"range":{"start_line":54,"start_character":4,"end_line":55,"end_character":65},"updated":"2017-09-14 22:15:21.000000000","message":"This should probably be in the specific l2gw handler.","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"fff307862e970776dd8085592e0631813ff133a0","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    else:"},{"line_number":57,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_type)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    if id_ is None:"},{"line_number":60,"context_line":"        return obj_getter(context)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    return obj_getter(context, id_)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_7af13795","line":60,"range":{"start_line":59,"start_character":0,"end_line":60,"end_character":34},"updated":"2017-09-15 00:50:01.000000000","message":"In this case, plural \"s\" is needed.\ne.g.\nget_network vs get_networks.\nOne possibility is use plural version always and filter\u003d{\u0027id\u0027: id}","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"72541eabd8116b4bc6c8fcb3293fe5cb3ba2e57e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    if id_ is None:"},{"line_number":60,"context_line":"        return obj_getter(context)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    return obj_getter(context, id_)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def get_nested_resource(context, plugin_type, nested_resource_id,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_ae0c0541","line":62,"range":{"start_line":62,"start_character":4,"end_line":62,"end_character":35},"updated":"2017-09-14 22:03:26.000000000","message":"This isn\u0027t really get_resources, isn\u0027t it?\n\nIt\u0027s more a \"get_resource_by_id\"","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"72541eabd8116b4bc6c8fcb3293fe5cb3ba2e57e","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":67,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if method_name is None:"},{"line_number":70,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    obj_getter \u003d getattr(plugin, method_name)"},{"line_number":73,"context_line":"    return obj_getter(context, nested_resource_id, nesting_resource_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_d16b76b4","line":70,"range":{"start_line":69,"start_character":4,"end_line":70,"end_character":44},"updated":"2017-09-14 22:03:26.000000000","message":"This is confusing, also currently there\u0027s no caller not sending this parameter so why make it optional?","commit_id":"bca075d49df01271391a151354f1c37904695da6"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"72541eabd8116b4bc6c8fcb3293fe5cb3ba2e57e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return handler(context, object_type, object_uuid, is_full_sync\u003dFalse)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def sync_resources(context, object_type):"},{"line_number":83,"context_line":"    handler \u003d ALL_RESOURCES.get(object_type)"},{"line_number":84,"context_line":"    if handler is not None:"},{"line_number":85,"context_line":"        resources \u003d handler(context, object_type)"},{"line_number":86,"context_line":"        for resource in resources:"},{"line_number":87,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":88,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f2577a7_519d46ba","line":88,"range":{"start_line":82,"start_character":0,"end_line":88,"end_character":58},"updated":"2017-09-14 22:03:26.000000000","message":"This piece should remain in full_sync, it\u0027s not really related to here.","commit_id":"bca075d49df01271391a151354f1c37904695da6"}],"networking_odl/journal/full_sync.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b6ef5bcd95f24553310158ff1e67bb05d0244cc2","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    db.delete_pending_rows(context.session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    for resource_type in _ORDERED_ODL_RESOURCES:"},{"line_number":69,"context_line":"        handler \u003d journal_base.ALL_RESOURCES.get(resource_type)"},{"line_number":70,"context_line":"        if handler:"},{"line_number":71,"context_line":"            _sync_resources(context, resource_type, handler)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    journal.record(context, odl_const.ODL_NETWORK, _CANARY_NETWORK_ID,"},{"line_number":74,"context_line":"                   odl_const.ODL_CREATE, _CANARY_NETWORK_DATA)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_b8aa2482","line":71,"range":{"start_line":69,"start_character":0,"end_line":71,"end_character":60},"updated":"2017-09-06 14:37:54.000000000","message":"this can combined into single method and it should live in jounal_base.","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"4bee10a1e3ec09c1b583307d0c69f8145d1035b5","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    db.delete_pending_rows(context.session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    for resource_type in _ORDERED_ODL_RESOURCES:"},{"line_number":69,"context_line":"        handler \u003d journal_base.ALL_RESOURCES.get(resource_type)"},{"line_number":70,"context_line":"        if handler:"},{"line_number":71,"context_line":"            _sync_resources(context, resource_type, handler)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    journal.record(context, odl_const.ODL_NETWORK, _CANARY_NETWORK_ID,"},{"line_number":74,"context_line":"                   odl_const.ODL_CREATE, _CANARY_NETWORK_DATA)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_52a2e6af","line":71,"range":{"start_line":69,"start_character":0,"end_line":71,"end_character":60},"in_reply_to":"7f287b81_b8aa2482","updated":"2017-09-08 05:51:38.000000000","message":"Done","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from networking_odl.db import db"},{"line_number":22,"context_line":"from networking_odl.journal import journal"},{"line_number":23,"context_line":"from networking_odl.journal import resource_syncer"},{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4d03f10e","line":24,"updated":"2017-10-18 08:08:58.000000000","message":"this needs to go before L19 with an empty line in-between.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from networking_odl.db import db"},{"line_number":22,"context_line":"from networking_odl.journal import journal"},{"line_number":23,"context_line":"from networking_odl.journal import resource_syncer"},{"line_number":24,"context_line":"from oslo_log import log as logging"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_ebf69ef9","line":24,"in_reply_to":"3f4b6375_4d03f10e","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e6647f480db2982659fe3599139e1dc4f2f58f41","unresolved":false,"context_lines":[{"line_number":63,"context_line":")"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":67,"context_line":"def full_sync(context):"},{"line_number":68,"context_line":"    with db_api.autonested_transaction(context.session):"},{"line_number":69,"context_line":"        if not _full_sync_needed(context):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_512995e3","line":66,"updated":"2017-10-25 12:19:21.000000000","message":"nice to see you started thinking about retriable functions :D","commit_id":"31fda661700cc6de6d199d2d05d8be0bf4d270f2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e6647f480db2982659fe3599139e1dc4f2f58f41","unresolved":false,"context_lines":[{"line_number":66,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":67,"context_line":"def full_sync(context):"},{"line_number":68,"context_line":"    with db_api.autonested_transaction(context.session):"},{"line_number":69,"context_line":"        if not _full_sync_needed(context):"},{"line_number":70,"context_line":"            return"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        db.delete_pending_rows(context.session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_f1f76158","line":70,"range":{"start_line":69,"start_character":4,"end_line":70,"end_character":18},"updated":"2017-10-25 12:19:21.000000000","message":"This should go outside of the transaction... (continues in L110)","commit_id":"31fda661700cc6de6d199d2d05d8be0bf4d270f2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e6647f480db2982659fe3599139e1dc4f2f58f41","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def _canary_network_not_in_journal(context):"},{"line_number":109,"context_line":"    return not db.get_pending_or_processing_ops("},{"line_number":110,"context_line":"        context.session, _CANARY_NETWORK_ID, operation\u003dodl_const.ODL_CREATE)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_d196a5f0","line":110,"range":{"start_line":108,"start_character":0,"end_line":110,"end_character":76},"updated":"2017-10-25 12:19:21.000000000","message":"...but this should have a transaction\n\nAnd the reason for it is L91 which is a non atomic operation.","commit_id":"31fda661700cc6de6d199d2d05d8be0bf4d270f2"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        db.delete_pending_rows(context.session, _OPS_TO_DELETE_ON_SYNC)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        for resource_type in _ORDERED_ODL_RESOURCES:"},{"line_number":75,"context_line":"            # Don\u0027t want to stop processing on failure of one resource."},{"line_number":76,"context_line":"            try:"},{"line_number":77,"context_line":"                resource_syncer.sync_resources(context, resource_type)"},{"line_number":78,"context_line":"            except Exception:"},{"line_number":79,"context_line":"                LOG.exception(\"Full sync for %s resource failed\","},{"line_number":80,"context_line":"                              resource_type)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        journal.record(context, odl_const.ODL_NETWORK, _CANARY_NETWORK_ID,"},{"line_number":83,"context_line":"                       odl_const.ODL_CREATE, _CANARY_NETWORK_DATA)"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_d9ca8818","line":80,"range":{"start_line":75,"start_character":1,"end_line":80,"end_character":44},"updated":"2017-11-15 11:07:11.000000000","message":"This behavioral change should be pushed in a separate patch set.","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"}],"networking_odl/journal/recovery.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b6ef5bcd95f24553310158ff1e67bb05d0244cc2","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_latest_resource(context, row):"},{"line_number":53,"context_line":"    object_type \u003d row.object_type"},{"line_number":54,"context_line":"    handler \u003d journal_base.ALL_RESOURCES.get(object_type)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if handler is not None:"},{"line_number":57,"context_line":"        return handler(context, object_type, row.object_uuid,"},{"line_number":58,"context_line":"                       is_full_sync\u003dFalse)"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        raise UnsupportedResourceType("},{"line_number":61,"context_line":"            _(\"unsupported resource type: {}\").format(object_type))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_1872584a","line":58,"range":{"start_line":54,"start_character":0,"end_line":58,"end_character":42},"updated":"2017-09-06 14:37:54.000000000","message":"This should combined into journal_base.\nPlease see a comment in full_sync.","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"4bee10a1e3ec09c1b583307d0c69f8145d1035b5","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _get_latest_resource(context, row):"},{"line_number":53,"context_line":"    object_type \u003d row.object_type"},{"line_number":54,"context_line":"    handler \u003d journal_base.ALL_RESOURCES.get(object_type)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if handler is not None:"},{"line_number":57,"context_line":"        return handler(context, object_type, row.object_uuid,"},{"line_number":58,"context_line":"                       is_full_sync\u003dFalse)"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        raise UnsupportedResourceType("},{"line_number":61,"context_line":"            _(\"unsupported resource type: {}\").format(object_type))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f287b81_d295b641","line":58,"range":{"start_line":54,"start_character":0,"end_line":58,"end_character":42},"in_reply_to":"7f287b81_1872584a","updated":"2017-09-08 05:51:38.000000000","message":"Done","commit_id":"daff2c77cfd41a5bd384064539cdba7fc50a4636"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    object_type \u003d row.object_type"},{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        resource \u003d _get_latest_resource(context, row)"},{"line_number":67,"context_line":"        if row.object_type \u003d\u003d odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION:"},{"line_number":68,"context_line":"            syncer \u003d resource_syncer.get("},{"line_number":69,"context_line":"                odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION)"},{"line_number":70,"context_line":"            resource \u003d syncer.driver._update_for_net_assoc(context, row.data)"},{"line_number":71,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":72,"context_line":"            operation_type \u003d odl_const.ODL_UPDATE"},{"line_number":73,"context_line":"        if row.object_type \u003d\u003d odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION:"},{"line_number":74,"context_line":"            syncer \u003d resource_syncer.get("},{"line_number":75,"context_line":"                odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION)"},{"line_number":76,"context_line":"            resource \u003d syncer.driver._update_for_router_assoc(context,"},{"line_number":77,"context_line":"                                                              row.data)"},{"line_number":78,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":79,"context_line":"            operation_type \u003d odl_const.ODL_UPDATE"},{"line_number":80,"context_line":"    except nexc.NotFound:"},{"line_number":81,"context_line":"        if exists_on_odl:"},{"line_number":82,"context_line":"            journal.record(context, row.object_type,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_e40cfa43","line":79,"range":{"start_line":67,"start_character":0,"end_line":79,"end_character":49},"updated":"2017-10-18 06:07:30.000000000","message":"Please refere to bgpvpn driver. ASSOCIATION isn\u0027t used. \nonly BGPVPN is sent to ODL.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    object_type \u003d row.object_type"},{"line_number":65,"context_line":"    try:"},{"line_number":66,"context_line":"        resource \u003d _get_latest_resource(context, row)"},{"line_number":67,"context_line":"        if row.object_type \u003d\u003d odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION:"},{"line_number":68,"context_line":"            syncer \u003d resource_syncer.get("},{"line_number":69,"context_line":"                odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION)"},{"line_number":70,"context_line":"            resource \u003d syncer.driver._update_for_net_assoc(context, row.data)"},{"line_number":71,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":72,"context_line":"            operation_type \u003d odl_const.ODL_UPDATE"},{"line_number":73,"context_line":"        if row.object_type \u003d\u003d odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION:"},{"line_number":74,"context_line":"            syncer \u003d resource_syncer.get("},{"line_number":75,"context_line":"                odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION)"},{"line_number":76,"context_line":"            resource \u003d syncer.driver._update_for_router_assoc(context,"},{"line_number":77,"context_line":"                                                              row.data)"},{"line_number":78,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":79,"context_line":"            operation_type \u003d odl_const.ODL_UPDATE"},{"line_number":80,"context_line":"    except nexc.NotFound:"},{"line_number":81,"context_line":"        if exists_on_odl:"},{"line_number":82,"context_line":"            journal.record(context, row.object_type,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_abd666c2","line":79,"range":{"start_line":67,"start_character":0,"end_line":79,"end_character":49},"in_reply_to":"3f4b6375_e40cfa43","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        resource \u003d _get_latest_resource(context, row)"},{"line_number":67,"context_line":"    except nexc.NotFound:"},{"line_number":68,"context_line":"        if exists_on_odl:"},{"line_number":69,"context_line":"            journal.record(context, row.object_type,"},{"line_number":70,"context_line":"                           row.object_uuid, odl_const.ODL_DELETE, [])"},{"line_number":71,"context_line":"    else:"},{"line_number":72,"context_line":"        journal.record(context, object_type, resource[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_1d548720","line":69,"range":{"start_line":69,"start_character":36,"end_line":69,"end_character":51},"updated":"2017-10-23 22:27:16.000000000","message":"nitpick: object_type","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        resource \u003d _get_latest_resource(context, row)"},{"line_number":67,"context_line":"    except nexc.NotFound:"},{"line_number":68,"context_line":"        if exists_on_odl:"},{"line_number":69,"context_line":"            journal.record(context, row.object_type,"},{"line_number":70,"context_line":"                           row.object_uuid, odl_const.ODL_DELETE, [])"},{"line_number":71,"context_line":"    else:"},{"line_number":72,"context_line":"        journal.record(context, object_type, resource[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_1e911a48","line":69,"range":{"start_line":69,"start_character":36,"end_line":69,"end_character":51},"in_reply_to":"3f4b6375_1d548720","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                    _handle_non_existing_resource(context, row)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def _get_latest_resource(context, row):"},{"line_number":59,"context_line":"    object_type \u003d row.object_type"},{"line_number":60,"context_line":"    resource \u003d resource_syncer.get_resource(context, row)"},{"line_number":61,"context_line":"    if resource is None:"},{"line_number":62,"context_line":"        raise UnsupportedResourceType("},{"line_number":63,"context_line":"            _(\"unsupported resource type: {}\").format(object_type))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    return resource"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _sync_resource_to_odl(context, row, operation_type, exists_on_odl):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_86013109","line":65,"range":{"start_line":58,"start_character":0,"end_line":65,"end_character":19},"updated":"2017-11-02 19:46:24.000000000","message":"This method is now small. this can be open-coded in _sync_source_to_odl.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"                    _handle_non_existing_resource(context, row)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"def _get_latest_resource(context, row):"},{"line_number":59,"context_line":"    object_type \u003d row.object_type"},{"line_number":60,"context_line":"    resource \u003d resource_syncer.get_resource(context, row)"},{"line_number":61,"context_line":"    if resource is None:"},{"line_number":62,"context_line":"        raise UnsupportedResourceType("},{"line_number":63,"context_line":"            _(\"unsupported resource type: {}\").format(object_type))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    return resource"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def _sync_resource_to_odl(context, row, operation_type, exists_on_odl):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_0748942a","line":65,"range":{"start_line":58,"start_character":0,"end_line":65,"end_character":19},"in_reply_to":"3f4b6375_86013109","updated":"2017-11-03 09:42:31.000000000","message":"Done","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        resource \u003d resource_syncer.get_resource(context, row)"},{"line_number":63,"context_line":"        if resource is None:"},{"line_number":64,"context_line":"            raise UnsupportedResourceType("},{"line_number":65,"context_line":"                _(\"unsupported resource type: {}\").format(object_type))"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    except nexc.NotFound:"},{"line_number":68,"context_line":"        if exists_on_odl:"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_e26f4390","line":65,"range":{"start_line":65,"start_character":50,"end_line":65,"end_character":70},"updated":"2017-11-09 16:16:02.000000000","message":"most of the places use the form\n\nstring % replace_variable\n\ninstead of `.format()`\n\nI don\u0027t think mixing them is good.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    object_type \u003d row.object_type"},{"line_number":61,"context_line":"    try:"},{"line_number":62,"context_line":"        resource \u003d resource_syncer.get_resource(context, row)"},{"line_number":63,"context_line":"        if resource is None:"},{"line_number":64,"context_line":"            raise UnsupportedResourceType(_("},{"line_number":65,"context_line":"                \"unsupported resource type: %s\") % object_type)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    except nexc.NotFound:"},{"line_number":68,"context_line":"        if exists_on_odl:"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_597218e5","line":65,"range":{"start_line":63,"start_character":8,"end_line":65,"end_character":63},"updated":"2017-11-15 11:07:11.000000000","message":"This is wrong, what if the return of the method itself was None?\n\nWhy not just throw the exception in resource_syncer.get_resource ?","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    except nexc.NotFound:"},{"line_number":68,"context_line":"        if exists_on_odl:"},{"line_number":69,"context_line":"            journal.record(context, object_type,"},{"line_number":70,"context_line":"                           row.object_uuid, odl_const.ODL_DELETE, [])"},{"line_number":71,"context_line":"    else:"},{"line_number":72,"context_line":"        journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":73,"context_line":"                       operation_type, resource)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    journal.entry_complete(context, row)"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_392f5ca2","line":73,"range":{"start_line":69,"start_character":0,"end_line":73,"end_character":48},"updated":"2017-11-15 11:07:11.000000000","message":"These changes were unnecessary, they also cause the code to be less consistent..","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"}],"networking_odl/journal/resource_syncer.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(plugin_type, resources, driver):"},{"line_number":27,"context_line":"    for resource in resources:"},{"line_number":28,"context_line":"        ALL_RESOURCES[resource] \u003d (plugin_type, driver, resources[resource])"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def get_resources_require_id(plugin, context, get_resources_for_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_f993835b","line":28,"range":{"start_line":28,"start_character":34,"end_line":28,"end_character":76},"updated":"2017-09-19 09:27:37.000000000","message":"perhaps another data structure fits better? custom class `Resource` perhaps?","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def register(plugin_type, resources, driver):"},{"line_number":27,"context_line":"    for resource in resources:"},{"line_number":28,"context_line":"        ALL_RESOURCES[resource] \u003d (plugin_type, driver, resources[resource])"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def get_resources_require_id(plugin, context, get_resources_for_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_54137167","line":28,"range":{"start_line":28,"start_character":34,"end_line":28,"end_character":76},"in_reply_to":"ff5d4b2f_f993835b","updated":"2017-10-23 10:02:58.000000000","message":"done, please verify class name","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"def get_resources_require_id(plugin, context, get_resources_for_id,"},{"line_number":32,"context_line":"                             method_name_for_resource):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    dep_id_resources \u003d get_resources_for_id(context)"},{"line_number":35,"context_line":"    resources \u003d []"},{"line_number":36,"context_line":"    for d_resource in dep_id_resources:"},{"line_number":37,"context_line":"        obj_getter \u003d getattr(plugin, method_name_for_resource)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_397d9b6e","line":34,"range":{"start_line":34,"start_character":4,"end_line":34,"end_character":52},"updated":"2017-09-19 08:13:12.000000000","message":"Seems to me you can just pass this value instead of a function reference","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":31,"context_line":"def get_resources_require_id(plugin, context, get_resources_for_id,"},{"line_number":32,"context_line":"                             method_name_for_resource):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    dep_id_resources \u003d get_resources_for_id(context)"},{"line_number":35,"context_line":"    resources \u003d []"},{"line_number":36,"context_line":"    for d_resource in dep_id_resources:"},{"line_number":37,"context_line":"        obj_getter \u003d getattr(plugin, method_name_for_resource)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_5c7dd9e5","line":34,"range":{"start_line":34,"start_character":4,"end_line":34,"end_character":52},"in_reply_to":"ff5d4b2f_397d9b6e","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    resources \u003d []"},{"line_number":36,"context_line":"    for d_resource in dep_id_resources:"},{"line_number":37,"context_line":"        obj_getter \u003d getattr(plugin, method_name_for_resource)"},{"line_number":38,"context_line":"        resource \u003d obj_getter(context, d_resource[\u0027id\u0027])"},{"line_number":39,"context_line":"        if resource:"},{"line_number":40,"context_line":"            resources.append(resource)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_df79bf2f","line":38,"range":{"start_line":38,"start_character":39,"end_line":38,"end_character":55},"updated":"2017-09-19 09:27:37.000000000","message":"are you sure they will have the index `\u0027id\u0027`?\n\nIf there is even a slight chance that they won\u0027t, then you should check for that and if not raise an exception.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    resources \u003d []"},{"line_number":36,"context_line":"    for d_resource in dep_id_resources:"},{"line_number":37,"context_line":"        obj_getter \u003d getattr(plugin, method_name_for_resource)"},{"line_number":38,"context_line":"        resource \u003d obj_getter(context, d_resource[\u0027id\u0027])"},{"line_number":39,"context_line":"        if resource:"},{"line_number":40,"context_line":"            resources.append(resource)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_9c4471b9","line":38,"range":{"start_line":38,"start_character":39,"end_line":38,"end_character":55},"in_reply_to":"ff5d4b2f_df79bf2f","updated":"2017-10-23 10:02:58.000000000","message":"Yes, ASAIK they will have ID.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    return resources"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def get_resources(context, plugin_type, resource_suffix):"},{"line_number":46,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":47,"context_line":"    obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_suffix)"},{"line_number":48,"context_line":"    return obj_getter(context)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_1eee3d88","line":45,"range":{"start_line":45,"start_character":4,"end_line":45,"end_character":17},"updated":"2017-09-19 08:13:12.000000000","message":"I\u0027d expect this to be called the same as the function you\u0027re looking for in the driver","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    return resources"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def get_resources(context, plugin_type, resource_suffix):"},{"line_number":46,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":47,"context_line":"    obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_suffix)"},{"line_number":48,"context_line":"    return obj_getter(context)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_79d1d357","line":45,"range":{"start_line":45,"start_character":40,"end_line":45,"end_character":55},"updated":"2017-09-19 08:13:12.000000000","message":"resource_type perhaps?","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def get_resources(context, plugin_type, resource_suffix):"},{"line_number":46,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":47,"context_line":"    obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_suffix)"},{"line_number":48,"context_line":"    return obj_getter(context)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_9e1d8dbf","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":46},"updated":"2017-09-19 08:13:12.000000000","message":"I\u0027d expect this to be passed as parameter instead of plugin_type, since this seems like something all these methods would do anyway..","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def get_resources(context, plugin_type, resource_suffix):"},{"line_number":46,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":47,"context_line":"    obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_suffix)"},{"line_number":48,"context_line":"    return obj_getter(context)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_bc34d5df","line":46,"range":{"start_line":46,"start_character":4,"end_line":46,"end_character":46},"in_reply_to":"ff5d4b2f_9e1d8dbf","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def get_nested_resource(context, plugin_type, nested_resource_id,"},{"line_number":52,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if method_name is None:"},{"line_number":55,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_5e7dd5e5","line":53,"range":{"start_line":53,"start_character":0,"end_line":53,"end_character":46},"updated":"2017-09-19 08:13:12.000000000","message":"Same as line 46","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def get_nested_resource(context, plugin_type, nested_resource_id,"},{"line_number":52,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if method_name is None:"},{"line_number":55,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    obj_getter \u003d getattr(plugin, method_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_5e35d5f6","line":54,"range":{"start_line":54,"start_character":0,"end_line":54,"end_character":27},"updated":"2017-09-19 08:13:12.000000000","message":"This makes no sense..\n\nAlso seems to me method_name shouldn\u0027t be optional anyway","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def get_nested_resource(context, plugin_type, nested_resource_id,"},{"line_number":52,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if method_name is None:"},{"line_number":55,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    obj_getter \u003d getattr(plugin, method_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_79dc3318","line":54,"range":{"start_line":54,"start_character":4,"end_line":54,"end_character":27},"updated":"2017-09-19 09:27:37.000000000","message":"`if not method_name`","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":51,"context_line":"def get_nested_resource(context, plugin_type, nested_resource_id,"},{"line_number":52,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if method_name is None:"},{"line_number":55,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    obj_getter \u003d getattr(plugin, method_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_5c64b9b9","line":54,"range":{"start_line":54,"start_character":4,"end_line":54,"end_character":27},"in_reply_to":"ff5d4b2f_79dc3318","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                        nesting_resource_id, method_name\u003dNone):"},{"line_number":53,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":54,"context_line":"    if method_name is None:"},{"line_number":55,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_name"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    obj_getter \u003d getattr(plugin, method_name)"},{"line_number":58,"context_line":"    return obj_getter(context, nested_resource_id, nesting_resource_id)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_5fbcafba","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":44},"updated":"2017-09-19 09:27:37.000000000","message":"if method name is None then this will end up being `\u0027get_None\u0027`\n\ndoesn\u0027t make any sense","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def get_resource_by_id(context, obj, plugin_type):"},{"line_number":62,"context_line":"    plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":63,"context_line":"    obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % obj.object_type)"},{"line_number":64,"context_line":"    return obj_getter(context, obj.object_uuid)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_1e875dda","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":46},"updated":"2017-09-19 08:13:12.000000000","message":"Same as line 46","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return obj_getter(context, obj.object_uuid)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_resource(context, obj):"},{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_bee3b1a4","line":67,"range":{"start_line":67,"start_character":4,"end_line":67,"end_character":16},"updated":"2017-09-19 08:13:12.000000000","message":"I\u0027d expect this to be called the same as the function you\u0027re looking for in the driver","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    return obj_getter(context, obj.object_uuid)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_resource(context, obj):"},{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_01cffe7f","line":67,"range":{"start_line":67,"start_character":4,"end_line":67,"end_character":16},"in_reply_to":"ff5d4b2f_bee3b1a4","updated":"2017-10-23 10:02:58.000000000","message":"With current implementation, it won\u0027t make much sense now. As we are in common send and making it _full_sync will give impression that this function is doing full sync rather it is just fetching resources.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_resource(context, obj):"},{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"},{"line_number":71,"context_line":"        handler \u003d getattr(driver, \u0027get_resource_for_recovery\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_5ecb951d","line":68,"range":{"start_line":68,"start_character":20,"end_line":68,"end_character":35},"updated":"2017-09-19 08:13:12.000000000","message":"This is unused, can be _","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"def get_resource(context, obj):"},{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"},{"line_number":71,"context_line":"        handler \u003d getattr(driver, \u0027get_resource_for_recovery\u0027)"},{"line_number":72,"context_line":"        handler \u003d handler or get_resource_by_id"},{"line_number":73,"context_line":"        return handler(context, obj, p_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_9ec58d5e","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":14},"updated":"2017-09-19 08:13:12.000000000","message":"Why would driver be none?\n\nI\u0027d expect it to always be available (you can check it on register, to make sure you can\u0027t register a None driver)","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":67,"context_line":"def get_resource(context, obj):"},{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"},{"line_number":71,"context_line":"        handler \u003d getattr(driver, \u0027get_resource_for_recovery\u0027)"},{"line_number":72,"context_line":"        handler \u003d handler or get_resource_by_id"},{"line_number":73,"context_line":"        return handler(context, obj, p_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_e73cf5c0","line":70,"range":{"start_line":70,"start_character":0,"end_line":70,"end_character":14},"in_reply_to":"ff5d4b2f_9ec58d5e","updated":"2017-10-23 10:02:58.000000000","message":"It is to handle the case, where driver is not registered but during full sync all resources are being checked. So if qos driver is not registered but during policies full sync it will return None object and we are using it to handle the case.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    p_type, driver, resource_suffix \u003d ALL_RESOURCES.get(obj.object_type,"},{"line_number":69,"context_line":"                                                        (None, None, None))"},{"line_number":70,"context_line":"    if driver:"},{"line_number":71,"context_line":"        handler \u003d getattr(driver, \u0027get_resource_for_recovery\u0027)"},{"line_number":72,"context_line":"        handler \u003d handler or get_resource_by_id"},{"line_number":73,"context_line":"        return handler(context, obj, p_type)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_d91d5f10","line":71,"range":{"start_line":71,"start_character":8,"end_line":71,"end_character":62},"updated":"2017-09-19 09:27:37.000000000","message":"More and more I fancy the idea of having __recovery__","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def sync_resources(context, object_type):"},{"line_number":77,"context_line":"    plugin_type, driver, resource_suffix \u003d ALL_RESOURCES.get("},{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_59d60f52","line":77,"range":{"start_line":77,"start_character":25,"end_line":77,"end_character":40},"updated":"2017-09-19 08:13:12.000000000","message":"resource_type perhaps?","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def sync_resources(context, object_type):"},{"line_number":77,"context_line":"    plugin_type, driver, resource_suffix \u003d ALL_RESOURCES.get("},{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_07126959","line":77,"range":{"start_line":77,"start_character":25,"end_line":77,"end_character":40},"in_reply_to":"ff5d4b2f_59d60f52","updated":"2017-10-23 10:02:58.000000000","message":"no, we have two types of constants defined for example, ODL_MEMBER and ODL_MEMBERS, here i have use ODL_MEMBER as object_type and ODL_MEMBERS as resource_suffix. Because this variable is used as suffix for method name to fetch resource during full sync.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    plugin_type, driver, resource_suffix \u003d ALL_RESOURCES.get("},{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"},{"line_number":81,"context_line":"        handler \u003d getattr(driver, \u0027get_resources_for_full_sync\u0027, None)"},{"line_number":82,"context_line":"        handler \u003d handler or get_resources"},{"line_number":83,"context_line":"        resources \u003d handler(context, plugin_type, resource_suffix)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_7ea099a6","line":80,"range":{"start_line":80,"start_character":0,"end_line":80,"end_character":14},"updated":"2017-09-19 08:13:12.000000000","message":"Same as line 70","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    plugin_type, driver, resource_suffix \u003d ALL_RESOURCES.get("},{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"},{"line_number":81,"context_line":"        handler \u003d getattr(driver, \u0027get_resources_for_full_sync\u0027, None)"},{"line_number":82,"context_line":"        handler \u003d handler or get_resources"},{"line_number":83,"context_line":"        resources \u003d handler(context, plugin_type, resource_suffix)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_8775399b","line":80,"range":{"start_line":80,"start_character":0,"end_line":80,"end_character":14},"in_reply_to":"ff5d4b2f_7ea099a6","updated":"2017-10-23 10:02:58.000000000","message":"same as line 70","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"},{"line_number":81,"context_line":"        handler \u003d getattr(driver, \u0027get_resources_for_full_sync\u0027, None)"},{"line_number":82,"context_line":"        handler \u003d handler or get_resources"},{"line_number":83,"context_line":"        resources \u003d handler(context, plugin_type, resource_suffix)"},{"line_number":84,"context_line":"        for resource in resources:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_9917e7ee","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":70},"updated":"2017-09-19 09:27:37.000000000","message":"More and more I fancy the idea of having __fullsync__","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        object_type, (None, None, None))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    if driver:"},{"line_number":81,"context_line":"        handler \u003d getattr(driver, \u0027get_resources_for_full_sync\u0027, None)"},{"line_number":82,"context_line":"        handler \u003d handler or get_resources"},{"line_number":83,"context_line":"        resources \u003d handler(context, plugin_type, resource_suffix)"},{"line_number":84,"context_line":"        for resource in resources:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_a78ddd7c","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":70},"in_reply_to":"ff5d4b2f_9917e7ee","updated":"2017-10-23 10:02:58.000000000","message":"After discussion using _full_sync.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        handler \u003d handler or get_resources"},{"line_number":83,"context_line":"        resources \u003d handler(context, plugin_type, resource_suffix)"},{"line_number":84,"context_line":"        for resource in resources:"},{"line_number":85,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":86,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_7f05337a","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":26},"updated":"2017-09-19 09:27:37.000000000","message":"take a look at https://review.openstack.org/#/c/500584/\n\nyou\u0027d probably want to do this retriable.\n\nThat would mean that you need to base your change in mine, though.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SyncResource(object):"},{"line_number":29,"context_line":"    def __init__(self, plugin_type, driver, resource_suffix):"},{"line_number":30,"context_line":"        self.__plugin_type \u003d plugin_type"},{"line_number":31,"context_line":"        self.__driver \u003d driver"},{"line_number":32,"context_line":"        self.__resource_suffix \u003d resource_suffix"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_84ec26f4","line":30,"range":{"start_line":30,"start_character":13,"end_line":30,"end_character":15},"updated":"2017-10-18 06:07:30.000000000","message":"Please use _(single underscore) instead of __(double underscore)","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        return self.__resource_suffix"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def register(plugin_type, resources, driver):"},{"line_number":48,"context_line":"    for resource in resources:"},{"line_number":49,"context_line":"        ALL_RESOURCES[resource] \u003d SyncResource(plugin_type, driver,"},{"line_number":50,"context_line":"                                               resources[resource])"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_0488361d","line":47,"range":{"start_line":47,"start_character":4,"end_line":47,"end_character":45},"updated":"2017-10-18 06:07:30.000000000","message":"register(plugin_type, resources, driver, full_sync\u003dNone, recovery\u003dNone)\nfull_sync and recovery method can be directly register here.\nso it can be avoided to require special naming.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_448e2e2f","line":100,"range":{"start_line":100,"start_character":4,"end_line":100,"end_character":62},"updated":"2017-10-18 06:07:30.000000000","message":"Instead of requiring naming convention,  simply bounded method can be passed to register method.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_44350ef7","line":100,"range":{"start_line":100,"start_character":57,"end_line":100,"end_character":61},"updated":"2017-10-18 06:07:30.000000000","message":"get_resource_by_id","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4b6132a9","line":100,"range":{"start_line":100,"start_character":4,"end_line":100,"end_character":62},"in_reply_to":"3f4b6375_2da43508","updated":"2017-10-23 10:02:58.000000000","message":"Agree with Michel.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_2da43508","line":100,"range":{"start_line":100,"start_character":4,"end_line":100,"end_character":62},"in_reply_to":"3f4b6375_448e2e2f","updated":"2017-10-18 08:08:58.000000000","message":"I think naming convention is a plus actually, it gives consistency throughout the code.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_441e2e71","line":101,"range":{"start_line":101,"start_character":25,"end_line":101,"end_character":43},"updated":"2017-10-18 06:07:30.000000000","message":"this value can be passed as default value for getattr()","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_8db44937","line":101,"range":{"start_line":101,"start_character":25,"end_line":101,"end_character":43},"in_reply_to":"3f4b6375_441e2e71","updated":"2017-10-18 08:08:58.000000000","message":"agree, this adds no value at all.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, None)"},{"line_number":101,"context_line":"    handler \u003d handler or get_resource_by_id"},{"line_number":102,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_eb2b3e2d","line":101,"range":{"start_line":101,"start_character":25,"end_line":101,"end_character":43},"in_reply_to":"3f4b6375_8db44937","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(object_type)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # NOTE: if resource is not registered but full sync tries to sync it"},{"line_number":109,"context_line":"    if sync_resource:"},{"line_number":110,"context_line":"        plugin \u003d sync_resource.plugin"},{"line_number":111,"context_line":"        if plugin is None:"},{"line_number":112,"context_line":"            # NOTE: This condition can occur due to misconfiguration"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_ad902597","line":109,"range":{"start_line":109,"start_character":4,"end_line":109,"end_character":21},"updated":"2017-10-18 08:08:58.000000000","message":"Instead of putting all inside the if make a\n\nif not sync_resource:\n  # log as Isaku asked\n  return\n\nOtherwise you are adding unnecessary indentation levels which leads to poor readability and coding style.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":105,"context_line":"def sync_resources(context, object_type):"},{"line_number":106,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(object_type)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # NOTE: if resource is not registered but full sync tries to sync it"},{"line_number":109,"context_line":"    if sync_resource:"},{"line_number":110,"context_line":"        plugin \u003d sync_resource.plugin"},{"line_number":111,"context_line":"        if plugin is None:"},{"line_number":112,"context_line":"            # NOTE: This condition can occur due to misconfiguration"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_64136aba","line":109,"range":{"start_line":108,"start_character":0,"end_line":109,"end_character":21},"updated":"2017-10-18 06:07:30.000000000","message":"Please log if not sync_resource","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":105,"context_line":"def sync_resources(context, object_type):"},{"line_number":106,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(object_type)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # NOTE: if resource is not registered but full sync tries to sync it"},{"line_number":109,"context_line":"    if sync_resource:"},{"line_number":110,"context_line":"        plugin \u003d sync_resource.plugin"},{"line_number":111,"context_line":"        if plugin is None:"},{"line_number":112,"context_line":"            # NOTE: This condition can occur due to misconfiguration"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_cbd08222","line":109,"range":{"start_line":108,"start_character":0,"end_line":109,"end_character":21},"in_reply_to":"3f4b6375_64136aba","updated":"2017-10-23 10:02:58.000000000","message":"it will produce logs for resources not enabled in environment. For example, sfc is not enabled even then it will produce logs for sfc, i think, it won\u0027t be a good idea.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(object_type)"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # NOTE: if resource is not registered but full sync tries to sync it"},{"line_number":109,"context_line":"    if sync_resource:"},{"line_number":110,"context_line":"        plugin \u003d sync_resource.plugin"},{"line_number":111,"context_line":"        if plugin is None:"},{"line_number":112,"context_line":"            # NOTE: This condition can occur due to misconfiguration"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_abcb0670","line":109,"range":{"start_line":109,"start_character":4,"end_line":109,"end_character":21},"in_reply_to":"3f4b6375_ad902597","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                      sync_resource.plugin, object_type)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # NOTE: Require conversion from ODL_BGPVPN_NETWORK_ASSOCIATION and"},{"line_number":118,"context_line":"        # ODL_BGPVPN_ROUTER_ASSOCIATION to ODL_BGPVPN update request."},{"line_number":119,"context_line":"        if object_type in [odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION,"},{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_8472e610","line":121,"range":{"start_line":117,"start_character":0,"end_line":121,"end_character":46},"updated":"2017-10-18 06:07:30.000000000","message":"This method is used for full sync. and it\u0027s known that ODL_BGPVPN case is called. So we can simply skip network/router_association.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                      sync_resource.plugin, object_type)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # NOTE: Require conversion from ODL_BGPVPN_NETWORK_ASSOCIATION and"},{"line_number":118,"context_line":"        # ODL_BGPVPN_ROUTER_ASSOCIATION to ODL_BGPVPN update request."},{"line_number":119,"context_line":"        if object_type in [odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION,"},{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_6bc50e5b","line":121,"range":{"start_line":117,"start_character":0,"end_line":121,"end_character":46},"in_reply_to":"3f4b6375_8472e610","updated":"2017-10-23 10:02:58.000000000","message":"+1 Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                      sync_resource.plugin, object_type)"},{"line_number":115,"context_line":"            return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # NOTE: Require conversion from ODL_BGPVPN_NETWORK_ASSOCIATION and"},{"line_number":118,"context_line":"        # ODL_BGPVPN_ROUTER_ASSOCIATION to ODL_BGPVPN update request."},{"line_number":119,"context_line":"        if object_type in [odl_const.ODL_BGPVPN_NETWORK_ASSOCIATION,"},{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_edadfdea","line":121,"range":{"start_line":117,"start_character":0,"end_line":121,"end_character":46},"in_reply_to":"3f4b6375_8472e610","updated":"2017-10-18 08:08:58.000000000","message":"You are coupling driver dependent code to a module that has a decoupled philosophy in the rest of the coding.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_a476023e","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":67},"updated":"2017-10-18 06:07:30.000000000","message":"full_sync method can be registered instead of requiring special naming.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_243a12e7","line":123,"range":{"start_line":123,"start_character":62,"end_line":123,"end_character":66},"updated":"2017-10-18 06:07:30.000000000","message":"get_resources","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                           odl_const.ODL_BGPVPN_ROUTER_ASSOCIATION]:"},{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_0dd05950","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":67},"in_reply_to":"3f4b6375_a476023e","updated":"2017-10-18 08:08:58.000000000","message":"ditto L100","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"},{"line_number":127,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_a42de2a9","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":42},"updated":"2017-10-18 06:07:30.000000000","message":"get_resurces can be passed as default value at line 123.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"},{"line_number":127,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_edc4dd94","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":42},"in_reply_to":"3f4b6375_a42de2a9","updated":"2017-10-18 08:08:58.000000000","message":"+1","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":121,"context_line":"            object_type \u003d odl_const.ODL_BGPVPN"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        handler \u003d getattr(sync_resource.driver, \u0027_full_sync\u0027, None)"},{"line_number":124,"context_line":"        handler \u003d handler or get_resources"},{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            resources \u003d handler(context, plugin, sync_resource.resource_suffix)"},{"line_number":127,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_0bac5a9e","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":42},"in_reply_to":"3f4b6375_edc4dd94","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for resource in resources:"},{"line_number":135,"context_line":"            # TODO(rajivk): To be fixed to allow retriable and rebase"},{"line_number":136,"context_line":"            # on  https://review.openstack.org/#/c/500584/"},{"line_number":137,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":138,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_44674e27","line":138,"range":{"start_line":137,"start_character":0,"end_line":138,"end_character":58},"updated":"2017-10-18 06:07:30.000000000","message":"this needs to be called within db transaction, though.\ndb-rework patch is needed. It\u0027s okay for now. Can you please TODO comment?","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        for resource in resources:"},{"line_number":135,"context_line":"            # TODO(rajivk): To be fixed to allow retriable and rebase"},{"line_number":136,"context_line":"            # on  https://review.openstack.org/#/c/500584/"},{"line_number":137,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":138,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_ed497d32","line":138,"range":{"start_line":137,"start_character":0,"end_line":138,"end_character":58},"in_reply_to":"3f4b6375_44674e27","updated":"2017-10-18 08:08:58.000000000","message":"Actually let\u0027s add this already here. db-rework patch is not needed to make it a transaction here.\n\nGood catch, Isaku.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SyncResource(object):"},{"line_number":29,"context_line":"    def __init__(self, plugin_type, driver, resource_suffix):"},{"line_number":30,"context_line":"        self.__plugin_type \u003d plugin_type"},{"line_number":31,"context_line":"        self.__driver \u003d driver"},{"line_number":32,"context_line":"        self.__resource_suffix \u003d resource_suffix"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_23996478","line":30,"range":{"start_line":30,"start_character":13,"end_line":30,"end_character":15},"updated":"2017-10-23 22:27:16.000000000","message":"_(sungle under score)","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SyncResource(object):"},{"line_number":29,"context_line":"    def __init__(self, plugin_type, driver, resource_suffix):"},{"line_number":30,"context_line":"        self.__plugin_type \u003d plugin_type"},{"line_number":31,"context_line":"        self.__driver \u003d driver"},{"line_number":32,"context_line":"        self.__resource_suffix \u003d resource_suffix"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_5eaaf270","line":30,"range":{"start_line":30,"start_character":13,"end_line":30,"end_character":15},"in_reply_to":"3f4b6375_23996478","updated":"2017-10-24 05:04:25.000000000","message":"__XXX will make sure these variables can not be used directly outside, to access them __CLASSNAME_XXXX is to be used. __XXXX make sure to property to be used for accessing them.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":47,"context_line":"def register(plugin_type, resources, driver):"},{"line_number":48,"context_line":"    for resource in resources:"},{"line_number":49,"context_line":"        ALL_RESOURCES[resource] \u003d SyncResource(plugin_type, driver,"},{"line_number":50,"context_line":"                                               resources[resource])"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def get_method(plugin, method_name\u003dNone, method_suffix\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_e3958c34","line":50,"range":{"start_line":50,"start_character":47,"end_line":50,"end_character":66},"updated":"2017-10-23 22:27:16.000000000","message":"resources.items() can be used.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"def register(plugin_type, resources, driver):"},{"line_number":48,"context_line":"    for resource in resources:"},{"line_number":49,"context_line":"        ALL_RESOURCES[resource] \u003d SyncResource(plugin_type, driver,"},{"line_number":50,"context_line":"                                               resources[resource])"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def get_method(plugin, method_name\u003dNone, method_suffix\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_5ed8b21c","line":50,"range":{"start_line":50,"start_character":47,"end_line":50,"end_character":66},"in_reply_to":"3f4b6375_e3958c34","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":101,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_63f87c7a","line":100,"range":{"start_line":100,"start_character":44,"end_line":100,"end_character":55},"updated":"2017-10-23 22:27:16.000000000","message":"As you two are fine with predefined name convension, please document it in code and also in documentation clearly.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":101,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_d13ed389","line":100,"range":{"start_line":100,"start_character":44,"end_line":100,"end_character":55},"in_reply_to":"3f4b6375_63f87c7a","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"83dc5eff06cc724fd211f971b2bf734343fbd203","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    # \"_recovery\" method is defined in driver class, if customized resource"},{"line_number":101,"context_line":"    # fetching mechanism is required for recovery. For examples"},{"line_number":102,"context_line":"    #"},{"line_number":103,"context_line":"    # L2 gateway driver needs to provide customized method name for fetching"},{"line_number":104,"context_line":"    # gateway connection information from database. Value for ODL URL of"},{"line_number":105,"context_line":"    # l2 gateway connection is \"l2gateway_connections\" but method is defined"},{"line_number":106,"context_line":"    # with \"l2_gateway_connection\" in database these, kind of inconsistency"},{"line_number":107,"context_line":"    # can be handled in \"_recovery\" method."},{"line_number":108,"context_line":"    #"},{"line_number":109,"context_line":"    # For lbaas, members in a pool exist, therefore both ids (pool, member)"},{"line_number":110,"context_line":"    # is required for fetching a member in the pool. Default recovery"},{"line_number":111,"context_line":"    # mechanism handles the case, where resources are fetched only by resource"},{"line_number":112,"context_line":"    # id."},{"line_number":113,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":114,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_4571fd0b","line":112,"range":{"start_line":100,"start_character":3,"end_line":112,"end_character":9},"updated":"2017-10-24 08:10:00.000000000","message":"This and the comment that follows in L131 are better put as docstrings together with documentation on what the function does, what do you think?","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"db7647d59342b77ac304054bb59871834098299a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    # \"_recovery\" method is defined in driver class, if customized resource"},{"line_number":101,"context_line":"    # fetching mechanism is required for recovery. For examples"},{"line_number":102,"context_line":"    #"},{"line_number":103,"context_line":"    # L2 gateway driver needs to provide customized method name for fetching"},{"line_number":104,"context_line":"    # gateway connection information from database. Value for ODL URL of"},{"line_number":105,"context_line":"    # l2 gateway connection is \"l2gateway_connections\" but method is defined"},{"line_number":106,"context_line":"    # with \"l2_gateway_connection\" in database these, kind of inconsistency"},{"line_number":107,"context_line":"    # can be handled in \"_recovery\" method."},{"line_number":108,"context_line":"    #"},{"line_number":109,"context_line":"    # For lbaas, members in a pool exist, therefore both ids (pool, member)"},{"line_number":110,"context_line":"    # is required for fetching a member in the pool. Default recovery"},{"line_number":111,"context_line":"    # mechanism handles the case, where resources are fetched only by resource"},{"line_number":112,"context_line":"    # id."},{"line_number":113,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":114,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_80a91c25","line":112,"range":{"start_line":100,"start_character":3,"end_line":112,"end_character":9},"in_reply_to":"3f4b6375_4571fd0b","updated":"2017-10-24 12:51:24.000000000","message":"I am really confused, where to put this comment. This is a generic comment regarding guideline to follow for a driver. Documentation is the best, it is already done.\n\nIt can not be put into all driver\u0027s \"_recovery\" method, it will be redundant. I can not put in default method because, it will be over looked. If someone, follow the procedure of full sync and recovery, he/she is bound to get here and read it. I can not put it into this method docstring because this comment does not describe, what this method does.\n\n\nIsaku provided a comment to put here, it seemed ok to me so, i put a comment here. What do you think?","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"c042b4cb141a57007021c1ff59e894e9e881259a","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def get_resource(context, obj):"},{"line_number":99,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":100,"context_line":"    # \"_recovery\" method is defined in driver class, if customized resource"},{"line_number":101,"context_line":"    # fetching mechanism is required for recovery. For examples"},{"line_number":102,"context_line":"    #"},{"line_number":103,"context_line":"    # L2 gateway driver needs to provide customized method name for fetching"},{"line_number":104,"context_line":"    # gateway connection information from database. Value for ODL URL of"},{"line_number":105,"context_line":"    # l2 gateway connection is \"l2gateway_connections\" but method is defined"},{"line_number":106,"context_line":"    # with \"l2_gateway_connection\" in database these, kind of inconsistency"},{"line_number":107,"context_line":"    # can be handled in \"_recovery\" method."},{"line_number":108,"context_line":"    #"},{"line_number":109,"context_line":"    # For lbaas, members in a pool exist, therefore both ids (pool, member)"},{"line_number":110,"context_line":"    # is required for fetching a member in the pool. Default recovery"},{"line_number":111,"context_line":"    # mechanism handles the case, where resources are fetched only by resource"},{"line_number":112,"context_line":"    # id."},{"line_number":113,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":114,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_3ffdd46d","line":112,"range":{"start_line":100,"start_character":3,"end_line":112,"end_character":9},"in_reply_to":"3f4b6375_80a91c25","updated":"2017-10-24 23:57:59.000000000","message":"In this case docstring is better than comment. so that pydoc or other tools can show it.\n\nIf we don\u0027t like to put those comment under specific method, we can put this docustring under this module. not specific method.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"83dc5eff06cc724fd211f971b2bf734343fbd203","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    for resource in resources:"},{"line_number":154,"context_line":"        # TODO(rajivk): To be fixed to allow retriable and rebase"},{"line_number":155,"context_line":"        # on  https://review.openstack.org/#/c/500584/"},{"line_number":156,"context_line":"        journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":157,"context_line":"                       odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_e5b5897f","line":157,"range":{"start_line":156,"start_character":7,"end_line":157,"end_character":54},"updated":"2017-10-24 08:10:00.000000000","message":"Needs to be called in a transaction still, even if you put a todo.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34a14a6820343fc3f1d161ddd30b2936fc20b2e7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#  License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#  under the License."},{"line_number":15,"context_line":"#"},{"line_number":16,"context_line":"\"\"\""},{"line_number":17,"context_line":"*get_resource* method is defined in the *resource_syncer* module, which fetch"},{"line_number":18,"context_line":"the resource for recovery based on resource type and it\u0027s id. To override"},{"line_number":19,"context_line":"default behaviour of *get_resource*, for providing customization(pre/post"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_d30b50d3","line":16,"updated":"2017-10-25 09:19:42.000000000","message":"Perhaps add sections to each paragraph to easier identification of what is recovery and what fullsync?","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34a14a6820343fc3f1d161ddd30b2936fc20b2e7","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    for resource in resources:"},{"line_number":163,"context_line":"        # TODO(rajivk): To be fixed to allow retriable and rebase"},{"line_number":164,"context_line":"        # on  https://review.openstack.org/#/c/500584/"},{"line_number":165,"context_line":"        with context.session.begin():"},{"line_number":166,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":167,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_f32f6c3c","line":165,"range":{"start_line":165,"start_character":13,"end_line":165,"end_character":36},"updated":"2017-10-25 09:19:42.000000000","message":"I would recommend doing db_api.autonested_transaction(context.session)","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class SyncResource(object):"},{"line_number":63,"context_line":"    def __init__(self, plugin_type, driver, resource_suffix):"},{"line_number":64,"context_line":"        self.__plugin_type \u003d plugin_type"},{"line_number":65,"context_line":"        self.__driver \u003d driver"},{"line_number":66,"context_line":"        self.__resource_suffix \u003d resource_suffix"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_211f075c","line":64,"range":{"start_line":64,"start_character":13,"end_line":64,"end_character":15},"updated":"2017-11-02 19:46:24.000000000","message":"why do you want double underscore?\nFor private member, single underscore is normal practice.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class SyncResource(object):"},{"line_number":63,"context_line":"    def __init__(self, plugin_type, driver, resource_suffix):"},{"line_number":64,"context_line":"        self.__plugin_type \u003d plugin_type"},{"line_number":65,"context_line":"        self.__driver \u003d driver"},{"line_number":66,"context_line":"        self.__resource_suffix \u003d resource_suffix"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_675628d1","line":64,"range":{"start_line":64,"start_character":13,"end_line":64,"end_character":15},"in_reply_to":"3f4b6375_211f075c","updated":"2017-11-03 09:42:31.000000000","message":"Done","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a0b3b1947afc456bd3387cb159a1f7c5821dd3c9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    def plugin(self):"},{"line_number":70,"context_line":"        return directory.get_plugin(self._plugin_type)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @property"},{"line_number":73,"context_line":"    def driver(self):"},{"line_number":74,"context_line":"        return self._driver"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @property"},{"line_number":77,"context_line":"    def resource_suffix(self):"},{"line_number":78,"context_line":"        return self._resource_suffix"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def register(plugin_type, resources, driver):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_dbfa09b8","line":78,"range":{"start_line":72,"start_character":0,"end_line":78,"end_character":36},"updated":"2017-11-07 17:39:18.000000000","message":"minor: There is no point to use property.\nwe can simply use, self.driver \u003d driver and self.resource_suffix \u003d resource_suffix.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    def plugin(self):"},{"line_number":70,"context_line":"        return directory.get_plugin(self._plugin_type)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @property"},{"line_number":73,"context_line":"    def driver(self):"},{"line_number":74,"context_line":"        return self._driver"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @property"},{"line_number":77,"context_line":"    def resource_suffix(self):"},{"line_number":78,"context_line":"        return self._resource_suffix"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def register(plugin_type, resources, driver):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1f485f77_0f0de83d","line":78,"range":{"start_line":72,"start_character":0,"end_line":78,"end_character":36},"in_reply_to":"3f4b6375_dbfa09b8","updated":"2017-11-09 16:16:02.000000000","message":"it\u0027s true, I think he intended it to be read-only though. And that\u0027s why he did it like this.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"1f485f77_e2c18382","updated":"2017-11-09 16:16:02.000000000","message":"Should this actually be inside the journal module? It\u0027s not really related to the journal itself...","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # If an error occured while processing full sync skip this entry"},{"line_number":149,"context_line":"        # but proceed to next entry. It can be caused due to some error"},{"line_number":150,"context_line":"        # specific to a resource at ODL side."},{"line_number":151,"context_line":"        LOG.error(\"Error in processing %s\", object_type)"},{"line_number":152,"context_line":"        return"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for resource in resources:"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_c201e7b1","line":151,"range":{"start_line":151,"start_character":8,"end_line":151,"end_character":56},"updated":"2017-11-09 16:16:02.000000000","message":"since you are catching ALL exceptions, I think you should consider also including the traceback in the logging.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        return"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    for resource in resources:"},{"line_number":155,"context_line":"        # TODO(rajivk): To be fixed to allow retriable and rebase"},{"line_number":156,"context_line":"        # on  https://review.openstack.org/#/c/500584/"},{"line_number":157,"context_line":"        with context.session.begin():"},{"line_number":158,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":159,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_42273766","line":156,"range":{"start_line":155,"start_character":7,"end_line":156,"end_character":54},"updated":"2017-11-09 16:16:02.000000000","message":"Since it was merged already, it needs to be done now.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                               resource_suffix)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_method(plugin, method_name\u003dNone, method_suffix\u003dNone):"},{"line_number":81,"context_line":"    if method_name is None:"},{"line_number":82,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_suffix"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_b9b22ce5","line":80,"range":{"start_line":80,"start_character":4,"end_line":80,"end_character":14},"updated":"2017-11-15 11:07:11.000000000","message":"Should be at least _get_method as it\u0027s not used outside this module","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                               resource_suffix)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_method(plugin, method_name\u003dNone, method_suffix\u003dNone):"},{"line_number":81,"context_line":"    if method_name is None:"},{"line_number":82,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_suffix"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    obj_getter \u003d getattr(plugin, method_name, None)"},{"line_number":85,"context_line":"    if obj_getter is None:"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_f9dd4414","line":82,"range":{"start_line":80,"start_character":23,"end_line":82,"end_character":46},"updated":"2017-11-15 11:07:11.000000000","message":"This logic should be extracted to some other method to calculate the method name from suffix when necessary.\n\nmethod_name would then be mandatory\n\nOtherwise it\u0027s confusing since you can call the function with just plugin and it would obviously fail though its \"valid\" code.","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def get_resource(context, obj):"},{"line_number":126,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(obj.object_type)"},{"line_number":127,"context_line":"    handler \u003d getattr(sync_resource.driver, \u0027_recovery\u0027, get_resource_by_id)"},{"line_number":128,"context_line":"    return handler(context, obj, sync_resource.plugin)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_34e76343","line":127,"range":{"start_line":127,"start_character":57,"end_line":127,"end_character":76},"updated":"2017-11-15 11:07:11.000000000","message":"This is counter-intuitive.\n\nAfter some more thought I think it would be easier to have a \"base driver\" class that defines the default behavior, and the different drivers can inherit from that and either provide their own implementation or get the inherited one.\n\nThis will make the code cleaner and more intuitive, and also easier to maintain.","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":132,"context_line":"def sync_resources(context, object_type):"},{"line_number":133,"context_line":"    sync_resource \u003d ALL_RESOURCES.get(object_type)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    # NOTE: if resource is not registered no need to full sync"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_79d154fb","line":132,"range":{"start_line":132,"start_character":4,"end_line":132,"end_character":18},"updated":"2017-11-15 11:07:11.000000000","message":"Should be get_resources or something (see comment on L156)","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"31d58cbe4cb4fa2a3693b35aa4e12b08b1ce29d9","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        LOG.error(\"Error in processing %s\", object_type, exc_info\u003dTrue)"},{"line_number":154,"context_line":"        return"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    with db_api.autonested_transaction(context.session):"},{"line_number":157,"context_line":"        for resource in resources:"},{"line_number":158,"context_line":"            journal.record(context, object_type, resource[\u0027id\u0027],"},{"line_number":159,"context_line":"                           odl_const.ODL_CREATE, resource)"}],"source_content_type":"text/x-python","patch_set":31,"id":"1f485f77_d9a4c8bb","line":159,"range":{"start_line":156,"start_character":4,"end_line":159,"end_character":58},"updated":"2017-11-15 11:07:11.000000000","message":"This part shouldn\u0027t be moved here, it doesn\u0027t belong to this method and instead makes more sense to keep in full_sync module itself as it\u0027s part of it\u0027s core logic.","commit_id":"53347185fd5d7d08d862abead76e453044ed9410"}],"networking_odl/l2gateway/driver_v2.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                       l2_gateway_id)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @staticmethod"},{"line_number":96,"context_line":"    def update_odl_gateway(l2_gateway_connection):"},{"line_number":97,"context_line":"        odl_l2_gateway_connection \u003d copy.deepcopy(l2_gateway_connection)"},{"line_number":98,"context_line":"        odl_l2_gateway_connection[\u0027gateway_id\u0027] \u003d ("},{"line_number":99,"context_line":"            l2_gateway_connection[\u0027l2_gateway_id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4751900e","line":96,"range":{"start_line":96,"start_character":8,"end_line":96,"end_character":14},"updated":"2017-10-18 06:07:30.000000000","message":"\"update\" is a bit poor naming.\nCan you please invent one?\ne.g. filter, mangle ...","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                       l2_gateway_id)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @staticmethod"},{"line_number":96,"context_line":"    def update_odl_gateway(l2_gateway_connection):"},{"line_number":97,"context_line":"        odl_l2_gateway_connection \u003d copy.deepcopy(l2_gateway_connection)"},{"line_number":98,"context_line":"        odl_l2_gateway_connection[\u0027gateway_id\u0027] \u003d ("},{"line_number":99,"context_line":"            l2_gateway_connection[\u0027l2_gateway_id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_8bfe0a35","line":96,"range":{"start_line":96,"start_character":8,"end_line":96,"end_character":14},"in_reply_to":"3f4b6375_4751900e","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"5cac42f7cce78b0b246e5aad74b3a3ef1fb0ee9a","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @staticmethod"},{"line_number":96,"context_line":"    def update_odl_gateway(l2_gateway_connection):"},{"line_number":97,"context_line":"        odl_l2_gateway_connection \u003d copy.deepcopy(l2_gateway_connection)"},{"line_number":98,"context_line":"        odl_l2_gateway_connection[\u0027gateway_id\u0027] \u003d ("},{"line_number":99,"context_line":"            l2_gateway_connection[\u0027l2_gateway_id\u0027])"},{"line_number":100,"context_line":"        odl_l2_gateway_connection.pop(\u0027l2_gateway_id\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_6d046dc7","line":97,"range":{"start_line":97,"start_character":36,"end_line":97,"end_character":72},"updated":"2017-10-18 08:08:58.000000000","message":"Like Isaku said, it\u0027s not updating anything.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @staticmethod"},{"line_number":96,"context_line":"    def update_odl_gateway(l2_gateway_connection):"},{"line_number":97,"context_line":"        odl_l2_gateway_connection \u003d copy.deepcopy(l2_gateway_connection)"},{"line_number":98,"context_line":"        odl_l2_gateway_connection[\u0027gateway_id\u0027] \u003d ("},{"line_number":99,"context_line":"            l2_gateway_connection[\u0027l2_gateway_id\u0027])"},{"line_number":100,"context_line":"        odl_l2_gateway_connection.pop(\u0027l2_gateway_id\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4b96d2f2","line":97,"range":{"start_line":97,"start_character":36,"end_line":97,"end_character":72},"in_reply_to":"3f4b6375_6d046dc7","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"2c343f08c624eff712dbbc86444a3a66b01bafde","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def _recovery(context, obj, plugin):"},{"line_number":67,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"},{"line_number":68,"context_line":"            return resource_syncer.get_resource_by_method_name("},{"line_number":69,"context_line":"                context, obj, plugin, \u0027l2_gateway_connection\u0027)"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        return resource_syncer.get_resource_by_id(context, obj, plugin)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"1f485f77_f1a2269a","line":69,"range":{"start_line":69,"start_character":38,"end_line":69,"end_character":61},"updated":"2017-11-14 05:57:08.000000000","message":"networking_l2g2.services.l2gateway.common.constatnts.CONNECTION_RESOURCE_NAME","commit_id":"33bccadf6e56c3bfb7c52d337d8d4a90a6f3eb2e"}],"networking_odl/lbaas/lbaasv2_driver_v2.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.journal.set_sync_event()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @staticmethod"},{"line_number":77,"context_line":"    def get_resources(context, resource_type, nested_resource_id\u003dNone,"},{"line_number":78,"context_line":"                      nesting_resource_id\u003dNone, is_full_sync\u003dTrue):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if resource_type \u003d\u003d odl_const.ODL_MEMBER:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_091ca668","line":77,"updated":"2017-09-11 07:17:41.000000000","message":"It\u0027s not very nice to have a mixed logic for two different processes. Adds complexity and is less easy to read. \n\nI was thinking, perhaps we can add magic methods like\n\n__fullsync__(...)\n__recovery__(...) \n\nBy doing this we are separating two parts that are usually needed and avoids the registration of a method through register()\n\nIt\u0027s a radical idea, so perhaps we want other\u0027s people opinions as well. What do you think though?","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.journal.set_sync_event()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @staticmethod"},{"line_number":77,"context_line":"    def get_resources(context, resource_type, nested_resource_id\u003dNone,"},{"line_number":78,"context_line":"                      nesting_resource_id\u003dNone, is_full_sync\u003dTrue):"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if resource_type \u003d\u003d odl_const.ODL_MEMBER:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_dd84ee60","line":77,"in_reply_to":"5f2577a7_091ca668","updated":"2017-10-23 10:02:58.000000000","message":"I agree, different methods should be used here. But i am not sure about magical methods here. These are usually used by python for its internal implementation. and new such method might be added in the future and may collide with these. So taking different approach.\n\nBTW any specific usage to define magic methods here?","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"87db5f6756b11776f28344201de020165d842594","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.journal.set_sync_event()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @staticmethod"},{"line_number":77,"context_line":"    def get_resources_for_full_sync(context, resource_type):"},{"line_number":78,"context_line":"        plugin \u003d directory.get_plugin(nlib_const.LOADBALANCERV2)"},{"line_number":79,"context_line":"        if resource_type \u003d\u003d odl_const.ODL_MEMBER:"},{"line_number":80,"context_line":"            return common.get_resources_require_id(plugin, context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_bd46ab20","line":77,"range":{"start_line":77,"start_character":8,"end_line":77,"end_character":35},"updated":"2017-09-13 14:27:55.000000000","message":"_get...","commit_id":"f60551ecb574fe1812417989e93561f29742197e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"87db5f6756b11776f28344201de020165d842594","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return obj_getter(context)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    @staticmethod"},{"line_number":88,"context_line":"    def get_resources_for_recovery(context, resource_type,"},{"line_number":89,"context_line":"                                   nested_resource_id\u003dNone,"},{"line_number":90,"context_line":"                                   nesting_resource_id\u003dNone):"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_5d6107a9","line":88,"range":{"start_line":88,"start_character":8,"end_line":88,"end_character":34},"updated":"2017-09-13 14:27:55.000000000","message":"_get...","commit_id":"f60551ecb574fe1812417989e93561f29742197e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"87db5f6756b11776f28344201de020165d842594","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    @classmethod"},{"line_number":104,"context_line":"    def get_resources(cls, context, resource_type, nested_resource_id\u003dNone,"},{"line_number":105,"context_line":"                      nesting_resource_id\u003dNone, is_full_sync\u003dTrue):"},{"line_number":106,"context_line":"        if is_full_sync:"},{"line_number":107,"context_line":"            return cls.get_resources_for_full_sync(context, resource_type)"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f2577a7_5dd46720","line":105,"range":{"start_line":105,"start_character":48,"end_line":105,"end_character":65},"updated":"2017-09-13 14:27:55.000000000","message":"you implement this here but not on other similar methods? I can see as a huge headache in the future. (look comment that says HERE)","commit_id":"f60551ecb574fe1812417989e93561f29742197e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        journal.record(context, obj_type, obj_id, operation, obj)"},{"line_number":74,"context_line":"        self.journal.set_sync_event()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # NOTE(rajivk): plugin_type don\u0027t need to be passed, as we know"},{"line_number":77,"context_line":"    # plugin type in driver, it is passed to be consisten with generic"},{"line_number":78,"context_line":"    # method defined in resource syncer"},{"line_number":79,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_1f399740","line":76,"range":{"start_line":76,"start_character":32,"end_line":76,"end_character":37},"updated":"2017-09-19 09:27:37.000000000","message":"typo: doesn\u0027t","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        journal.record(context, obj_type, obj_id, operation, obj)"},{"line_number":74,"context_line":"        self.journal.set_sync_event()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # NOTE(rajivk): plugin_type don\u0027t need to be passed, as we know"},{"line_number":77,"context_line":"    # plugin type in driver, it is passed to be consisten with generic"},{"line_number":78,"context_line":"    # method defined in resource syncer"},{"line_number":79,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_107d051c","line":76,"range":{"start_line":76,"start_character":32,"end_line":76,"end_character":37},"in_reply_to":"ff5d4b2f_1f399740","updated":"2017-10-23 10:02:58.000000000","message":"done","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                                                            plugin.get_pools,"},{"line_number":85,"context_line":"                                                            \u0027get_pool_members\u0027)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        obj_getter \u003d getattr(plugin, \u0027get_%s\u0027 % resource_suffix)"},{"line_number":88,"context_line":"        return obj_getter(context)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    @staticmethod"},{"line_number":91,"context_line":"    def get_resource_for_recovery(context, obj, plugin_type):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_79a0b3a6","line":88,"range":{"start_line":87,"start_character":8,"end_line":88,"end_character":34},"updated":"2017-09-19 08:13:12.000000000","message":"Replace with:\n\n  return resource_syncer.get_resources(..)","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"eac70561b8b25f10886f24bdce3a174a8ec5a38e","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                nesting_resource_id\u003dobj.pool_id,"},{"line_number":98,"context_line":"                method_name\u003d\u0027get_pool_member\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        return resource_syncer.get_resource(context, obj)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @log_helpers.log_method_call"},{"line_number":103,"context_line":"    @driver_base.driver_op"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_be76113e","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":30},"updated":"2017-09-19 08:13:12.000000000","message":"Wouldn\u0027t this result in an endless recursion?","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f4fc97bc6879df8412e96b0ee0549d876430a685","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                nesting_resource_id\u003dobj.pool_id,"},{"line_number":98,"context_line":"                method_name\u003d\u0027get_pool_member\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        return resource_syncer.get_resource(context, obj)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @log_helpers.log_method_call"},{"line_number":103,"context_line":"    @driver_base.driver_op"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f5c4f37_f0c71145","line":100,"range":{"start_line":100,"start_character":15,"end_line":100,"end_character":30},"in_reply_to":"ff5d4b2f_be76113e","updated":"2017-10-23 10:02:58.000000000","message":"Done","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    # method defined in resource syncer"},{"line_number":55,"context_line":"    @staticmethod"},{"line_number":56,"context_line":"    def _full_sync(context, plugin, resource_suffix):"},{"line_number":57,"context_line":"        if resource_suffix \u003d\u003d odl_const.ODL_MEMBERS:"},{"line_number":58,"context_line":"            ids \u003d plugin.get_pools(context)"},{"line_number":59,"context_line":"            return resource_syncer.get_resources_require_id(plugin,"},{"line_number":60,"context_line":"                                                            context, ids,"},{"line_number":61,"context_line":"                                                            \u0027get_pool_members\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        return resource_syncer.get_resources(context, plugin, resource_suffix)"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_c7aa20d1","line":61,"range":{"start_line":57,"start_character":0,"end_line":61,"end_character":79},"updated":"2017-10-18 06:07:30.000000000","message":"This logic can be moved into ODLMemberManager.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    @staticmethod"},{"line_number":66,"context_line":"    def _recovery(context, obj, plugin):"},{"line_number":67,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_MEMBER:"},{"line_number":68,"context_line":"            return resource_syncer.get_nested_resource("},{"line_number":69,"context_line":"                context, plugin,"},{"line_number":70,"context_line":"                nested_resource_id\u003dobj.object_uuid,"},{"line_number":71,"context_line":"                nesting_resource_id\u003dobj.data[\u0027pool_id\u0027],"},{"line_number":72,"context_line":"                method_name\u003d\u0027get_pool_member\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        return resource_syncer.get_resource_by_id(context, obj,"},{"line_number":75,"context_line":"                                                  plugin)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_87b42837","line":72,"range":{"start_line":67,"start_character":0,"end_line":72,"end_character":46},"updated":"2017-10-18 06:07:30.000000000","message":"ditto.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        for resource in LBAAS_RESOURCES:"},{"line_number":95,"context_line":"            # NOTE(rajivk): ODL_MEMBER has defined, its own method for"},{"line_number":96,"context_line":"            # url building."},{"line_number":97,"context_line":"            if resource !\u003d odl_const.ODL_MEMBER:"},{"line_number":98,"context_line":"                journal.register_url_builder(resource,"},{"line_number":99,"context_line":"                                             self.lbaas_member_url_builder)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_87fe68ac","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":48},"updated":"2017-10-18 06:07:30.000000000","message":"self.\u003cstaticmethod\u003e points to actual class\u0027s method.\nSo we can simply register unconditionally.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.journal.set_sync_event()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def lbaas_member_url_builder(row):"},{"line_number":107,"context_line":"        return (\"lbaas/%s\" % journal._make_url(row))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    # NOTE(rajivk): plugin_type doesn\u0027t need to be passed, as we know"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_270e94e5","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":20},"updated":"2017-10-18 06:07:30.000000000","message":"This method name isn\u0027t appropriate.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def lbaas_member_url_builder(row):"},{"line_number":107,"context_line":"        return (\"lbaas/%s\" % journal._make_url(row))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    # NOTE(rajivk): plugin_type doesn\u0027t need to be passed, as we know"},{"line_number":110,"context_line":"    # plugin type in driver, it is passed to be consisten with generic"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_4732b0a9","line":107,"range":{"start_line":107,"start_character":15,"end_line":107,"end_character":16},"updated":"2017-10-18 06:07:30.000000000","message":"paren isn\u0027t needed.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    # method defined in resource syncer"},{"line_number":112,"context_line":"    @staticmethod"},{"line_number":113,"context_line":"    def _full_sync(context, plugin, resource_suffix):"},{"line_number":114,"context_line":"        if resource_suffix \u003d\u003d odl_const.ODL_MEMBERS:"},{"line_number":115,"context_line":"            ids \u003d plugin.get_pools(context)"},{"line_number":116,"context_line":"            return resource_syncer.get_resources_require_id(plugin,"},{"line_number":117,"context_line":"                                                            context, ids,"},{"line_number":118,"context_line":"                                                            \u0027get_pool_members\u0027)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        return resource_syncer.get_resources(context, plugin, resource_suffix)"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_c7d8e080","line":118,"range":{"start_line":114,"start_character":0,"end_line":118,"end_character":79},"updated":"2017-10-18 06:07:30.000000000","message":"this can be defined in ODLMemberManager.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"bb8b7cfdbe3a218f32ed6cc5e77346a344028a59","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @staticmethod"},{"line_number":123,"context_line":"    def _recovery(context, obj, plugin):"},{"line_number":124,"context_line":"        if obj.object_type \u003d\u003d odl_const.ODL_MEMBER:"},{"line_number":125,"context_line":"            return resource_syncer.get_nested_resource("},{"line_number":126,"context_line":"                context, plugin,"},{"line_number":127,"context_line":"                nested_resource_id\u003dobj.object_id,"},{"line_number":128,"context_line":"                nesting_resource_id\u003dobj.pool_id,"},{"line_number":129,"context_line":"                method_name\u003d\u0027get_pool_member\u0027)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        return resource_syncer.get_resource_by_id(context, obj,"},{"line_number":132,"context_line":"                                                  plugin)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3f4b6375_a7e5e43a","line":129,"range":{"start_line":124,"start_character":0,"end_line":129,"end_character":46},"updated":"2017-10-18 06:07:30.000000000","message":"ditto.","commit_id":"35020720049fcd6da8977e5bffa78a16d40dda69"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        for resource in LBAAS_RESOURCES:"},{"line_number":95,"context_line":"            # NOTE(rajivk): ODL_MEMBER has defined, its own method for"},{"line_number":96,"context_line":"            # url building."},{"line_number":97,"context_line":"            if resource !\u003d odl_const.ODL_MEMBER:"},{"line_number":98,"context_line":"                journal.register_url_builder(resource,"},{"line_number":99,"context_line":"                                             self.lbaas_member_url_builder)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_c3e4d0e2","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":48},"updated":"2017-10-23 22:27:16.000000000","message":"same comment in ps18.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        for resource in LBAAS_RESOURCES:"},{"line_number":95,"context_line":"            # NOTE(rajivk): ODL_MEMBER has defined, its own method for"},{"line_number":96,"context_line":"            # url building."},{"line_number":97,"context_line":"            if resource !\u003d odl_const.ODL_MEMBER:"},{"line_number":98,"context_line":"                journal.register_url_builder(resource,"},{"line_number":99,"context_line":"                                             self.lbaas_member_url_builder)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_b12a3729","line":97,"range":{"start_line":97,"start_character":12,"end_line":97,"end_character":48},"in_reply_to":"3f4b6375_c3e4d0e2","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"6f889ec8448ad9ccebe11872ecc8ed3cd21beb79","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.journal.set_sync_event()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def lbaas_member_url_builder(row):"},{"line_number":107,"context_line":"        return (\"lbaas/%s\" % journal._make_url(row))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_83d258ff","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":33},"updated":"2017-10-23 22:27:16.000000000","message":"ditto.","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"74ea69a65a66a7e886695f1fcf01e4128030a36a","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self.journal.set_sync_event()"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def lbaas_member_url_builder(row):"},{"line_number":107,"context_line":"        return (\"lbaas/%s\" % journal._make_url(row))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":19,"id":"3f4b6375_71203f49","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":33},"in_reply_to":"3f4b6375_83d258ff","updated":"2017-10-24 05:04:25.000000000","message":"Done","commit_id":"49f5566cd88f1d1bed289fea45117e6636e91562"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"0a60cd01bee8d70280133ae805777963ba69285d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        resource_syncer.register(nlib_const.LOADBALANCERV2,"},{"line_number":92,"context_line":"                                 LBAAS_RESOURCES, driver)"},{"line_number":93,"context_line":"        self.driver \u003d driver"},{"line_number":94,"context_line":"        for resource in LBAAS_RESOURCES:"},{"line_number":95,"context_line":"            journal.register_url_builder(resource, self.url_builder)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _journal_record(self, context, obj_type, obj_id, operation, obj):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_3f59548d","line":94,"range":{"start_line":94,"start_character":7,"end_line":94,"end_character":40},"updated":"2017-10-25 00:07:57.000000000","message":"As each subclass calls this constructor,just\nregister_url_builder(obj_type, self.url_builder) works.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"83dc5eff06cc724fd211f971b2bf734343fbd203","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.journal.set_sync_event()"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    @staticmethod"},{"line_number":102,"context_line":"    def url_builder(row):"},{"line_number":103,"context_line":"        return \"lbaas/%s\" % journal._make_url(row)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    @log_helpers.log_method_call"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_45545d21","line":102,"range":{"start_line":102,"start_character":8,"end_line":102,"end_character":19},"updated":"2017-10-24 08:10:00.000000000","message":"The naming convention is not coincidental with L183","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"0a60cd01bee8d70280133ae805777963ba69285d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        super(ODLMemberManager, self).__init__("},{"line_number":177,"context_line":"            driver, odl_const.ODL_MEMBER)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        journal.register_url_builder(odl_const.ODL_MEMBER,"},{"line_number":180,"context_line":"                                     self.lbaas_member_url_builder)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    @staticmethod"},{"line_number":183,"context_line":"    def lbaas_member_url_builder(row):"}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_5fcd302f","line":180,"range":{"start_line":179,"start_character":0,"end_line":180,"end_character":67},"updated":"2017-10-25 00:07:57.000000000","message":"this can be done by super class constructor.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                nesting_resource_id\u003dobj.data[\u0027pool_id\u0027],"},{"line_number":72,"context_line":"                method_name\u003d\u0027get_pool_member\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        return resource_syncer.get_resource_by_id(context, obj,"},{"line_number":75,"context_line":"                                                  plugin)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"class OpenDaylightManager(driver_mixins.BaseManagerMixin):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_c1a03393","line":75,"range":{"start_line":74,"start_character":50,"end_line":75,"end_character":57},"updated":"2017-11-02 19:46:24.000000000","message":"nitpick: this can be made into one line.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @staticmethod"},{"line_number":179,"context_line":"    def url_builder(row):"},{"line_number":180,"context_line":"        return \"lbaas/pools/%s/members\" % row.data[\u0027pool_id\u0027]"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"class ODLHealthMonitorManager(OpenDaylightManager,"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_a1c65767","line":180,"range":{"start_line":180,"start_character":37,"end_line":180,"end_character":38},"updated":"2017-11-02 19:46:24.000000000","message":"is this a existing bug?\n\nlbaas isn\u0027t tested well....","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    @staticmethod"},{"line_number":179,"context_line":"    def url_builder(row):"},{"line_number":180,"context_line":"        return \"lbaas/pools/%s/members\" % row.data[\u0027pool_id\u0027]"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"class ODLHealthMonitorManager(OpenDaylightManager,"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_670bc8d4","line":180,"range":{"start_line":180,"start_character":37,"end_line":180,"end_character":38},"in_reply_to":"3f4b6375_a1c65767","updated":"2017-11-03 09:42:31.000000000","message":"yes, it is existing bug, there are some issues with lbaasv2, which needs to be fixed. As lbaas v2 is not supported by odl therefor it is taken as low priority.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @staticmethod"},{"line_number":100,"context_line":"    def url_builder(row):"},{"line_number":101,"context_line":"        return \"lbaas/%s\" % journal._make_url(row)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    @log_helpers.log_method_call"},{"line_number":104,"context_line":"    @driver_base.driver_op"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_a2170bee","line":101,"range":{"start_line":101,"start_character":15,"end_line":101,"end_character":25},"updated":"2017-11-09 16:16:02.000000000","message":"I\u0027d prefer to see this in a constant.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    @staticmethod"},{"line_number":178,"context_line":"    def url_builder(row):"},{"line_number":179,"context_line":"        return \"lbaas/pools/%s/members\" % row.data[\u0027pool_id\u0027]"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"class ODLHealthMonitorManager(OpenDaylightManager,"}],"source_content_type":"text/x-python","patch_set":29,"id":"1f485f77_62d7d325","line":179,"range":{"start_line":179,"start_character":15,"end_line":179,"end_character":39},"updated":"2017-11-09 16:16:02.000000000","message":"I\u0027d prefer to see this in a constant.","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"}],"networking_odl/tests/unit/journal/base.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from networking_odl.trunk import trunk_driver_v2 as trunk_driver"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def process_return_value(func):"},{"line_number":40,"context_line":"    def processor(context, id\u003dNone, id2\u003dNone):"},{"line_number":41,"context_line":"        values \u003d func()"},{"line_number":42,"context_line":"        if id is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_c94c5e78","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":31},"updated":"2017-09-11 07:17:41.000000000","message":"when doing decorators is good practice to add a wrapped flag. The best way to do it py2 and py3 compatible is with six.wraps(func)\n\nAlso, func is commonly named f in a decorator.","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def process_return_value(func):"},{"line_number":40,"context_line":"    def processor(context, id\u003dNone, id2\u003dNone):"},{"line_number":41,"context_line":"        values \u003d func()"},{"line_number":42,"context_line":"        if id is not None:"},{"line_number":43,"context_line":"            values[0][\u0027id\u0027] \u003d id"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_c927beb6","line":40,"range":{"start_line":40,"start_character":36,"end_line":40,"end_character":44},"updated":"2017-09-11 07:17:41.000000000","message":"this is never used","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":39,"context_line":"def process_return_value(func):"},{"line_number":40,"context_line":"    def processor(context, id\u003dNone, id2\u003dNone):"},{"line_number":41,"context_line":"        values \u003d func()"},{"line_number":42,"context_line":"        if id is not None:"},{"line_number":43,"context_line":"            values[0][\u0027id\u0027] \u003d id"},{"line_number":44,"context_line":"            values \u003d values[0]"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_69268aba","line":42,"range":{"start_line":42,"start_character":11,"end_line":42,"end_character":25},"updated":"2017-09-11 07:17:41.000000000","message":"`not id` is the pythonic way","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"}],"networking_odl/tests/unit/journal/common.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"ff5d4b2f_1fd517ba","updated":"2017-09-19 09:27:37.000000000","message":"adjust the filename to whatever the module ends up being called","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"}],"networking_odl/tests/unit/journal/mock_journal.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"1f485f77_22bafbdd","updated":"2017-11-09 16:16:02.000000000","message":"more than mock is more like helpers or something like that, right?","commit_id":"0236d22b15aa8f69f18e887a6c4a6a543c69f19e"}],"networking_odl/tests/unit/journal/test_full_sync.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.addCleanup(self._clean_registered_plugins)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def _clean_registered_plugins(self):"},{"line_number":47,"context_line":"        for plugin_type in test_journal_common.get_all_plugins().keys():"},{"line_number":48,"context_line":"            directory.add_plugin(plugin_type, None)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def test_no_full_sync_when_canary_exists(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_7fbd3367","line":47,"range":{"start_line":47,"start_character":64,"end_line":47,"end_character":71},"updated":"2017-09-19 09:27:37.000000000","message":"the use of `keys()` is discouraged since it\u0027s basically the same to do a `for k in dict()`","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_suffix"},{"line_number":160,"context_line":"        registered_plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":161,"context_line":"        getattr(registered_plugin, method_name).assert_called()"},{"line_number":162,"context_line":"        nargs_obj \u003d inspect.getargspec(getattr(base_plugin, method_name))"},{"line_number":163,"context_line":"        # NOTE(rajivk), if arguments are accepted through keywords then we are"},{"line_number":164,"context_line":"        # not sure how many argument is necessary. It is the case with trunk"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_9f558720","line":161,"range":{"start_line":161,"start_character":8,"end_line":161,"end_character":47},"updated":"2017-09-19 09:27:37.000000000","message":"this could raise AttributeError if no default -in which you probably want to issue self.fail instead of raising that. Probably best to put a default and a check after.\n\nTherefore better to do it in two steps to have better assert reporting.","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"0b7fb6f47efc64211e5a2a76d2f400ac500591af","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        method_name \u003d \u0027get_%s\u0027 % method_suffix"},{"line_number":160,"context_line":"        registered_plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":161,"context_line":"        getattr(registered_plugin, method_name).assert_called()"},{"line_number":162,"context_line":"        nargs_obj \u003d inspect.getargspec(getattr(base_plugin, method_name))"},{"line_number":163,"context_line":"        # NOTE(rajivk), if arguments are accepted through keywords then we are"},{"line_number":164,"context_line":"        # not sure how many argument is necessary. It is the case with trunk"},{"line_number":165,"context_line":"        # driver therefore signature check for that plugin will be skipped."}],"source_content_type":"text/x-python","patch_set":9,"id":"ff5d4b2f_9f7c67b6","line":162,"range":{"start_line":162,"start_character":28,"end_line":162,"end_character":38},"updated":"2017-09-19 09:27:37.000000000","message":"this is deprecated in Py3","commit_id":"a781925160d95c8ea3b78b6f688735553668bda3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34a14a6820343fc3f1d161ddd30b2936fc20b2e7","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._test_full_sync_resources({})"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal, \u0027record\u0027)"},{"line_number":176,"context_line":"    def _test_sync_resources(self, object_type, plugin_type, base_plugin,"},{"line_number":177,"context_line":"                             mocked_record):"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        args \u003d [mock.Mock()]"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_535e4044","line":176,"updated":"2017-10-25 09:19:42.000000000","message":"More tests are better, than only one test that encompasses all.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"08110df677a7cb0e2f05d0e1000992aa43847cf4","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._test_full_sync_resources({})"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal, \u0027record\u0027)"},{"line_number":176,"context_line":"    def _test_sync_resources(self, object_type, plugin_type, base_plugin,"},{"line_number":177,"context_line":"                             mocked_record):"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        args \u003d [mock.Mock()]"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_98049716","line":176,"in_reply_to":"3f4b6375_535e4044","updated":"2017-10-31 04:08:52.000000000","message":"I think, atleast this test needs to be here to identify the issues with complete sync process.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"b356661a8bc7f3f0795cb4b59ecfb7a6cece4f92","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._test_full_sync_resources({})"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal, \u0027record\u0027)"},{"line_number":176,"context_line":"    def _test_sync_resources(self, object_type, plugin_type, base_plugin,"},{"line_number":177,"context_line":"                             mocked_record):"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        args \u003d [mock.Mock()]"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_9a22d600","line":176,"in_reply_to":"3f4b6375_98049716","updated":"2017-11-01 11:42:17.000000000","message":"Then it\u0027s a functional test, not a unit one.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._test_full_sync_resources({})"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal, \u0027record\u0027)"},{"line_number":176,"context_line":"    def _test_sync_resources(self, object_type, plugin_type, base_plugin,"},{"line_number":177,"context_line":"                             mocked_record):"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        args \u003d [mock.Mock()]"}],"source_content_type":"text/x-python","patch_set":22,"id":"1f485f77_62935351","line":176,"in_reply_to":"3f4b6375_9a22d600","updated":"2017-11-09 16:16:02.000000000","message":"ack?","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34a14a6820343fc3f1d161ddd30b2936fc20b2e7","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                          get_name_of_method)(mock.Mock())[0][\u0027id\u0027]"},{"line_number":196,"context_line":"            resources[0][\u0027id\u0027] \u003d id_"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        def context_manager_method(*args, **kwargs):"},{"line_number":199,"context_line":"            pass"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        context \u003d mock.Mock()"},{"line_number":202,"context_line":"        sess_ctxt \u003d mock.Mock(__enter__\u003dcontext_manager_method,"},{"line_number":203,"context_line":"                              __exit__\u003dcontext_manager_method)"},{"line_number":204,"context_line":"        context.session.begin.return_value \u003d sess_ctxt"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        resource_syncer.sync_resources(context, object_type)"},{"line_number":207,"context_line":"        if object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_73781cc3","line":204,"range":{"start_line":198,"start_character":0,"end_line":204,"end_character":54},"updated":"2017-10-25 09:19:42.000000000","message":"this is a bad test. You need to test behavior, not that something was called specifically.\n\nSo you need to test that when a call to the database is made, you are actually in a transaction.\n\nWith your test if someone wants to start the transaction differently (ie: through db_api.autonested_transaction), then it would fail.\n\nThe way I see it, you need to either (a) test you are inside a transaction (and you can\u0027t use `session.is_active` for this) or (b) find the SQLAlchemy top level function that starts a transaction and which will always be called no matter how you initiate a transaction and patch that instead.\n\nthe option (a) is better IMHO.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"b356661a8bc7f3f0795cb4b59ecfb7a6cece4f92","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                          get_name_of_method)(mock.Mock())[0][\u0027id\u0027]"},{"line_number":196,"context_line":"            resources[0][\u0027id\u0027] \u003d id_"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        def context_manager_method(*args, **kwargs):"},{"line_number":199,"context_line":"            pass"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        context \u003d mock.Mock()"},{"line_number":202,"context_line":"        sess_ctxt \u003d mock.Mock(__enter__\u003dcontext_manager_method,"},{"line_number":203,"context_line":"                              __exit__\u003dcontext_manager_method)"},{"line_number":204,"context_line":"        context.session.begin.return_value \u003d sess_ctxt"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        resource_syncer.sync_resources(context, object_type)"},{"line_number":207,"context_line":"        if object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_5a4a1eac","line":204,"range":{"start_line":198,"start_character":0,"end_line":204,"end_character":54},"in_reply_to":"3f4b6375_58a61f11","updated":"2017-11-01 11:42:17.000000000","message":"db_api is tested in their own project already you don\u0027t need to replicate testing. Again, what you need to do in UT is to define required behavior and test for that. Then you modify the code to make the test pass.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                          get_name_of_method)(mock.Mock())[0][\u0027id\u0027]"},{"line_number":196,"context_line":"            resources[0][\u0027id\u0027] \u003d id_"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        def context_manager_method(*args, **kwargs):"},{"line_number":199,"context_line":"            pass"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        context \u003d mock.Mock()"},{"line_number":202,"context_line":"        sess_ctxt \u003d mock.Mock(__enter__\u003dcontext_manager_method,"},{"line_number":203,"context_line":"                              __exit__\u003dcontext_manager_method)"},{"line_number":204,"context_line":"        context.session.begin.return_value \u003d sess_ctxt"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        resource_syncer.sync_resources(context, object_type)"},{"line_number":207,"context_line":"        if object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"}],"source_content_type":"text/x-python","patch_set":22,"id":"1f485f77_42985769","line":204,"range":{"start_line":198,"start_character":0,"end_line":204,"end_character":54},"in_reply_to":"3f4b6375_5a4a1eac","updated":"2017-11-09 16:16:02.000000000","message":"ack?","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"08110df677a7cb0e2f05d0e1000992aa43847cf4","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                          get_name_of_method)(mock.Mock())[0][\u0027id\u0027]"},{"line_number":196,"context_line":"            resources[0][\u0027id\u0027] \u003d id_"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        def context_manager_method(*args, **kwargs):"},{"line_number":199,"context_line":"            pass"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        context \u003d mock.Mock()"},{"line_number":202,"context_line":"        sess_ctxt \u003d mock.Mock(__enter__\u003dcontext_manager_method,"},{"line_number":203,"context_line":"                              __exit__\u003dcontext_manager_method)"},{"line_number":204,"context_line":"        context.session.begin.return_value \u003d sess_ctxt"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        resource_syncer.sync_resources(context, object_type)"},{"line_number":207,"context_line":"        if object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_58a61f11","line":204,"range":{"start_line":198,"start_character":0,"end_line":204,"end_character":54},"in_reply_to":"3f4b6375_73781cc3","updated":"2017-10-31 04:08:52.000000000","message":"I think, it is more of like testing neutron db_api, whether it actually create transaction or not therefor removing assert on context.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e6647f480db2982659fe3599139e1dc4f2f58f41","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        self._test_full_sync_resources({})"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @mock.patch.object(journal, \u0027record\u0027)"},{"line_number":176,"context_line":"    def _test_sync_resources(self, object_type, plugin_type, base_plugin,"},{"line_number":177,"context_line":"                             mocked_record):"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"        args \u003d [mock.Mock()]"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_f1a52148","line":176,"updated":"2017-10-25 12:19:21.000000000","message":"did you see the comment of this in PS22?","commit_id":"31fda661700cc6de6d199d2d05d8be0bf4d270f2"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e6647f480db2982659fe3599139e1dc4f2f58f41","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                          get_name_of_method)(mock.Mock())[0][\u0027id\u0027]"},{"line_number":196,"context_line":"            resources[0][\u0027id\u0027] \u003d id_"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        def context_manager_method(*args, **kwargs):"},{"line_number":199,"context_line":"            pass"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        context \u003d mock.Mock()"},{"line_number":202,"context_line":"        sess_ctxt \u003d mock.Mock(__enter__\u003dcontext_manager_method,"},{"line_number":203,"context_line":"                              __exit__\u003dcontext_manager_method)"},{"line_number":204,"context_line":"        context.session.begin.return_value \u003d sess_ctxt"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        resource_syncer.sync_resources(context, object_type)"},{"line_number":207,"context_line":"        if object_type \u003d\u003d odl_const.ODL_L2GATEWAY_CONNECTION:"}],"source_content_type":"text/x-python","patch_set":24,"id":"3f4b6375_71ba516e","line":204,"range":{"start_line":198,"start_character":7,"end_line":204,"end_character":54},"updated":"2017-10-25 12:19:21.000000000","message":"did you see the comment of this in PS22?","commit_id":"31fda661700cc6de6d199d2d05d8be0bf4d270f2"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a0b3b1947afc456bd3387cb159a1f7c5821dd3c9","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        method_suffix \u003d test_resource_syncer.get_mocked_method_suffix("},{"line_number":188,"context_line":"            object_type)"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"        get_name_of_method \u003d (\"get_mocked_%s\" % method_suffix)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        resources \u003d getattr(test_resource_syncer, get_name_of_method)(*args)"},{"line_number":193,"context_line":"        if flag:"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_5b84d90a","line":190,"range":{"start_line":190,"start_character":29,"end_line":190,"end_character":30},"updated":"2017-11-07 17:39:18.000000000","message":"nitpick: no paren.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a0b3b1947afc456bd3387cb159a1f7c5821dd3c9","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"            resources \u003d temp_resources"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        method_name \u003d (\"get_%s\" % method_suffix)"},{"line_number":217,"context_line":"        self.assertTrue(test_resource_syncer.is_signature_correct("},{"line_number":218,"context_line":"            object_type, plugin_type,"},{"line_number":219,"context_line":"            base_plugin, method_name))"}],"source_content_type":"text/x-python","patch_set":28,"id":"3f4b6375_1b7ae122","line":216,"range":{"start_line":216,"start_character":22,"end_line":216,"end_character":23},"updated":"2017-11-07 17:39:18.000000000","message":"nitpick: no paren.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"}],"networking_odl/tests/unit/journal/test_recovery.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":23,"context_line":"from networking_odl.db import db"},{"line_number":24,"context_line":"from networking_odl.journal import base as j_base"},{"line_number":25,"context_line":"from networking_odl.journal import recovery"},{"line_number":26,"context_line":"from networking_odl.tests import base"},{"line_number":27,"context_line":"from networking_odl.tests.unit.journal import base as journal_base"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_89409609","line":24,"range":{"start_line":24,"start_character":43,"end_line":24,"end_character":49},"updated":"2017-09-11 07:17:41.000000000","message":"maintain coherence. In the full sync test it was named journal_base.","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"aba5fd1060dedf6da587dde7c4348cbdd44b58c5","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from networking_odl.journal import base as j_base"},{"line_number":25,"context_line":"from networking_odl.journal import recovery"},{"line_number":26,"context_line":"from networking_odl.tests import base"},{"line_number":27,"context_line":"from networking_odl.tests.unit.journal import base as journal_base"},{"line_number":28,"context_line":"from networking_odl.tests.unit import test_base_db"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f2577a7_494aae27","line":27,"range":{"start_line":27,"start_character":54,"end_line":27,"end_character":66},"updated":"2017-09-11 07:17:41.000000000","message":"maintain coherence. In the full sync test it was named test_journal_base.","commit_id":"adbf80d9c5280c255452e41e171eea28ab460c33"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"02dd2304d64aeb50d349a5abd4356f11e26f1b32","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            base.OpenDaylightRestClientGlobalFixture(recovery._CLIENT))"},{"line_number":37,"context_line":"        super(RecoveryTestCase, self).setUp()"},{"line_number":38,"context_line":"        self._CLIENT \u003d recovery._CLIENT.get_client()"},{"line_number":39,"context_line":"        resource_syncer.ALL_RESOURCES.clear()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _mock_resource(self, plugin, resource_type):"},{"line_number":42,"context_line":"        mock_resource \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_e13faf22","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":45},"updated":"2017-11-02 19:46:24.000000000","message":"addCleanup()","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            base.OpenDaylightRestClientGlobalFixture(recovery._CLIENT))"},{"line_number":37,"context_line":"        super(RecoveryTestCase, self).setUp()"},{"line_number":38,"context_line":"        self._CLIENT \u003d recovery._CLIENT.get_client()"},{"line_number":39,"context_line":"        resource_syncer.ALL_RESOURCES.clear()"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _mock_resource(self, plugin, resource_type):"},{"line_number":42,"context_line":"        mock_resource \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_071f7408","line":39,"range":{"start_line":39,"start_character":8,"end_line":39,"end_character":45},"in_reply_to":"3f4b6375_e13faf22","updated":"2017-11-03 09:42:31.000000000","message":"Done","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e1f45a261533fda676fc3cd9c89a57f11803fb13","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return created_row"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _disable_retention(self):"},{"line_number":86,"context_line":"        cfg.CONF.set_override(\u0027completed_rows_retention\u0027, 0, \u0027ml2_odl\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_journal_recovery_handles_failure_quietly(self):"},{"line_number":89,"context_line":"        class TestException(Exception):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_9df8d37c","line":86,"range":{"start_line":86,"start_character":17,"end_line":86,"end_character":29},"updated":"2017-10-30 13:00:16.000000000","message":"IMHO we should use `conf`, why you think we should use `set_override`?","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"e57ac9995de90f205e951897df07f00e46216766","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return created_row"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _disable_retention(self):"},{"line_number":86,"context_line":"        cfg.CONF.set_override(\u0027completed_rows_retention\u0027, 0, \u0027ml2_odl\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_journal_recovery_handles_failure_quietly(self):"},{"line_number":89,"context_line":"        class TestException(Exception):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_bb386d9f","line":86,"range":{"start_line":86,"start_character":17,"end_line":86,"end_character":29},"in_reply_to":"3f4b6375_47de8c3e","updated":"2017-11-07 17:21:26.000000000","message":"As this patch has been under review for long time, I\u0027d like not to hold this patch for this reason.\nLet\u0027s address it with another patch.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"f9283f10b04916c3cf31cc470b61e6b4321b605a","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return created_row"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _disable_retention(self):"},{"line_number":86,"context_line":"        cfg.CONF.set_override(\u0027completed_rows_retention\u0027, 0, \u0027ml2_odl\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_journal_recovery_handles_failure_quietly(self):"},{"line_number":89,"context_line":"        class TestException(Exception):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f4b6375_47de8c3e","line":86,"range":{"start_line":86,"start_character":17,"end_line":86,"end_character":29},"in_reply_to":"3f4b6375_9df8d37c","updated":"2017-11-03 09:42:31.000000000","message":"not related to this change.","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"e92a8133b590576724df87c588df9eab8deb8c41","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return created_row"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def _disable_retention(self):"},{"line_number":86,"context_line":"        cfg.CONF.set_override(\u0027completed_rows_retention\u0027, 0, \u0027ml2_odl\u0027)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_journal_recovery_handles_failure_quietly(self):"},{"line_number":89,"context_line":"        class TestException(Exception):"}],"source_content_type":"text/x-python","patch_set":27,"id":"1f485f77_a2a82b77","line":86,"range":{"start_line":86,"start_character":17,"end_line":86,"end_character":29},"in_reply_to":"3f4b6375_bb386d9f","updated":"2017-11-09 16:16:02.000000000","message":"Sure","commit_id":"fe24c967c2d4aaa6f572045c268e46c893488b8a"}],"networking_odl/tests/unit/journal/test_resource_syncer.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34a14a6820343fc3f1d161ddd30b2936fc20b2e7","unresolved":false,"context_lines":[{"line_number":354,"context_line":"def is_signature_correct(object_type, plugin_type, base_plugin, method_name):"},{"line_number":355,"context_line":"        registered_plugin \u003d directory.get_plugin(plugin_type)"},{"line_number":356,"context_line":"        getattr(registered_plugin, method_name).assert_called()"},{"line_number":357,"context_line":"        nargs_obj \u003d inspect.getargspec(getattr(base_plugin, method_name))"},{"line_number":358,"context_line":"        # NOTE(rajivk), if arguments are accepted through keywords then we are"},{"line_number":359,"context_line":"        # not sure how many argument is necessary. It is the case with trunk"},{"line_number":360,"context_line":"        # driver therefore signature check for that plugin will be skipped."}],"source_content_type":"text/x-python","patch_set":22,"id":"3f4b6375_5323e0bd","line":357,"range":{"start_line":357,"start_character":20,"end_line":357,"end_character":38},"updated":"2017-10-25 09:19:42.000000000","message":"if a function is decorated this fails miserably, that\u0027s why `pecan` is used in `neutron_lib` instead.\n\nThis is a comment, more than a request to change something.","commit_id":"1e9e7b7ee45e85861fcae2ca0b6452cb1abce5ff"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a0b3b1947afc456bd3387cb159a1f7c5821dd3c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"3f4b6375_bbde2d0e","updated":"2017-11-07 17:39:18.000000000","message":"This file doesn\u0027t include any test cases, but includes helper methods, right?\nFile name should not be test_xxx which is expected to have test cases.","commit_id":"83fcce4a93b77e132eabee243e0584c922bb28d5"}],"networking_odl/tests/unit/lbaas/test_lbaasv2_odl_v2.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"83dc5eff06cc724fd211f971b2bf734343fbd203","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            # FIXME(rajivk), object dictionary has to be received but object"},{"line_number":68,"context_line":"            # is being passed. Which will need fix and rework on lbaas UT."},{"line_number":69,"context_line":"            # self.assertEqual(journal.MAKE_URL[obj_type](row),"},{"line_number":70,"context_line":"            #                 (\"lbaas/pools/%s/members\" % obj.pool.id))"},{"line_number":71,"context_line":"            pass"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_c5160d56","line":70,"range":{"start_line":70,"start_character":32,"end_line":70,"end_character":54},"updated":"2017-10-24 08:10:00.000000000","message":"since you were using the same string in the lbaas, I think you should make it a constant","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"db7647d59342b77ac304054bb59871834098299a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            # FIXME(rajivk), object dictionary has to be received but object"},{"line_number":68,"context_line":"            # is being passed. Which will need fix and rework on lbaas UT."},{"line_number":69,"context_line":"            # self.assertEqual(journal.MAKE_URL[obj_type](row),"},{"line_number":70,"context_line":"            #                 (\"lbaas/pools/%s/members\" % obj.pool.id))"},{"line_number":71,"context_line":"            pass"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"3f4b6375_a97c0b1f","line":70,"range":{"start_line":70,"start_character":32,"end_line":70,"end_character":54},"in_reply_to":"3f4b6375_c5160d56","updated":"2017-10-24 12:51:24.000000000","message":"yes, i was using the same string, because these are test cases, if i use that constants here and by mistake someone changed that constant then these test cases will pass. But keeping them separate make sure that this test will catch that un-intentional changes.","commit_id":"1ba9f33cd465733014fad48776a438c9d682d2c8"}]}
