)]}'
{"dragonflow/conf/df_bgp.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f572aed6dcf4bd62c671d2f70a29f6fc18161100","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        \u0027pulse_interval\u0027,"},{"line_number":21,"context_line":"        default\u003d5,"},{"line_number":22,"context_line":"        help\u003d_(\u0027The interval of BGP service to get data updates and advertise \u0027"},{"line_number":23,"context_line":"               \u0027BGP routes\u0027))"},{"line_number":24,"context_line":"]"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_3d1739f0","line":23,"updated":"2017-04-19 10:06:26.000000000","message":"nit: What unit? Seconds?","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4087711c739186e8dab0ae9b119813bd63e475e8","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        \u0027pulse_interval\u0027,"},{"line_number":21,"context_line":"        default\u003d5,"},{"line_number":22,"context_line":"        help\u003d_(\u0027The interval of BGP service to get data updates and advertise \u0027"},{"line_number":23,"context_line":"               \u0027BGP routes\u0027))"},{"line_number":24,"context_line":"]"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_c5429e3e","line":23,"in_reply_to":"7ffa3b31_3d1739f0","updated":"2017-04-20 02:49:06.000000000","message":"Done","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"}],"dragonflow/controller/df_bgp_service.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f572aed6dcf4bd62c671d2f70a29f6fc18161100","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        super(BGPService, self).__init__()"},{"line_number":32,"context_line":"        self.db_store \u003d db_store2.get_instance()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        nb_driver \u003d df_utils.load_driver("},{"line_number":35,"context_line":"            cfg.CONF.df.nb_db_class,"},{"line_number":36,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":37,"context_line":"        # BGP dynamic route is not a service that needs real time response."},{"line_number":38,"context_line":"        # So disable pubsub here and use period task to do BGP job."},{"line_number":39,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":40,"context_line":"            nb_driver,"},{"line_number":41,"context_line":"            use_pubsub\u003dFalse)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.bgp_pulse \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":44,"context_line":"            self.sync_data_from_nb_db)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_bdea29a9","line":41,"range":{"start_line":34,"start_character":0,"end_line":41,"end_character":29},"updated":"2017-04-19 10:06:26.000000000","message":"Why not use nb_api.get_instance(False)? You can override the config to disable pubsub.","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4087711c739186e8dab0ae9b119813bd63e475e8","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        super(BGPService, self).__init__()"},{"line_number":32,"context_line":"        self.db_store \u003d db_store2.get_instance()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        nb_driver \u003d df_utils.load_driver("},{"line_number":35,"context_line":"            cfg.CONF.df.nb_db_class,"},{"line_number":36,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":37,"context_line":"        # BGP dynamic route is not a service that needs real time response."},{"line_number":38,"context_line":"        # So disable pubsub here and use period task to do BGP job."},{"line_number":39,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":40,"context_line":"            nb_driver,"},{"line_number":41,"context_line":"            use_pubsub\u003dFalse)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.bgp_pulse \u003d loopingcall.FixedIntervalLoopingCall("},{"line_number":44,"context_line":"            self.sync_data_from_nb_db)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_45d44e48","line":41,"range":{"start_line":34,"start_character":0,"end_line":41,"end_character":29},"in_reply_to":"7ffa3b31_bdea29a9","updated":"2017-04-20 02:49:06.000000000","message":"Done","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f572aed6dcf4bd62c671d2f70a29f6fc18161100","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.db_store.update(obj)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def delete_model_object(self, model, obj_id):"},{"line_number":77,"context_line":"        self.db_store2.delete(model(id\u003dobj_id))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_fd1791a2","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":22},"updated":"2017-04-19 10:06:26.000000000","message":"Type? self.db_store2 -\u003e self.db_store?","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4087711c739186e8dab0ae9b119813bd63e475e8","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        self.db_store.update(obj)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def delete_model_object(self, model, obj_id):"},{"line_number":77,"context_line":"        self.db_store2.delete(model(id\u003dobj_id))"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":7,"id":"7ffa3b31_05cac69f","line":77,"range":{"start_line":77,"start_character":21,"end_line":77,"end_character":22},"in_reply_to":"7ffa3b31_fd1791a2","updated":"2017-04-20 02:49:06.000000000","message":"Done","commit_id":"59804131dff6e916a5db1b859c42ea43c757d45d"}],"dragonflow/db/models/bgp.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"79d8c341fc61e79c0977f5862655413a9c7a153c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# NOTE(xiaohui):"},{"line_number":29,"context_line":"# 1) As both BGPSpeaker and BGPPeer from neutron don\u0027t have revision_num now,"},{"line_number":30,"context_line":"# skip adding version to db modles."},{"line_number":31,"context_line":"# 2) BGP data models are only used in BGP service, don\u0027t register it to"},{"line_number":32,"context_line":"# model_framework."},{"line_number":33,"context_line":"@mf.construct_nb_db_model"},{"line_number":34,"context_line":"class BGPPeer(mf.ModelBase, mixins.Topic,"},{"line_number":35,"context_line":"              mixins.Name, mixins.BasicEvents):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_bd74d89d","line":32,"range":{"start_line":31,"start_character":0,"end_line":32,"end_character":18},"updated":"2017-03-30 12:57:17.000000000","message":"I think its best to register them as well. If no application uses them, they won\u0027t get imported and won\u0027t be loaded, yet when df_db imports dragonflow.db.models.all (which should import this), it will have the models and will create/drop the needed tables.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"8add63641f883e47029d61c68b111edbc065671d","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# NOTE(xiaohui):"},{"line_number":29,"context_line":"# 1) As both BGPSpeaker and BGPPeer from neutron don\u0027t have revision_num now,"},{"line_number":30,"context_line":"# skip adding version to db modles."},{"line_number":31,"context_line":"# 2) BGP data models are only used in BGP service, don\u0027t register it to"},{"line_number":32,"context_line":"# model_framework."},{"line_number":33,"context_line":"@mf.construct_nb_db_model"},{"line_number":34,"context_line":"class BGPPeer(mf.ModelBase, mixins.Topic,"},{"line_number":35,"context_line":"              mixins.Name, mixins.BasicEvents):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_7605ba10","line":32,"range":{"start_line":31,"start_character":0,"end_line":32,"end_character":18},"in_reply_to":"dfeb2761_13056046","updated":"2017-04-05 07:25:32.000000000","message":"yeah, you are right! Will update","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"9d51e8d2bc9a8fcbc660d8c0fe3c0b18e5f4bcbb","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# NOTE(xiaohui):"},{"line_number":29,"context_line":"# 1) As both BGPSpeaker and BGPPeer from neutron don\u0027t have revision_num now,"},{"line_number":30,"context_line":"# skip adding version to db modles."},{"line_number":31,"context_line":"# 2) BGP data models are only used in BGP service, don\u0027t register it to"},{"line_number":32,"context_line":"# model_framework."},{"line_number":33,"context_line":"@mf.construct_nb_db_model"},{"line_number":34,"context_line":"class BGPPeer(mf.ModelBase, mixins.Topic,"},{"line_number":35,"context_line":"              mixins.Name, mixins.BasicEvents):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_13056046","line":32,"range":{"start_line":31,"start_character":0,"end_line":32,"end_character":18},"in_reply_to":"dfeb2761_cfe0fc99","updated":"2017-04-05 07:19:19.000000000","message":"It won\u0027t pollute df-local-controller, because it will not import this module.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfc184c4b6650bea5a759a9537550575293bb0f1","unresolved":false,"context_lines":[{"line_number":28,"context_line":"# NOTE(xiaohui):"},{"line_number":29,"context_line":"# 1) As both BGPSpeaker and BGPPeer from neutron don\u0027t have revision_num now,"},{"line_number":30,"context_line":"# skip adding version to db modles."},{"line_number":31,"context_line":"# 2) BGP data models are only used in BGP service, don\u0027t register it to"},{"line_number":32,"context_line":"# model_framework."},{"line_number":33,"context_line":"@mf.construct_nb_db_model"},{"line_number":34,"context_line":"class BGPPeer(mf.ModelBase, mixins.Topic,"},{"line_number":35,"context_line":"              mixins.Name, mixins.BasicEvents):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_cfe0fc99","line":32,"range":{"start_line":31,"start_character":0,"end_line":32,"end_character":18},"in_reply_to":"ffe62b97_bd74d89d","updated":"2017-03-31 02:23:06.000000000","message":"registering models here will pollute the df-local-controller with unnecessary bgp data(db object refresher and db store).\n\nAnd yes, not registering them will make the df-db not work with them, automatically.\n\nI had this thought of adding \"namespace\" concept in register_model. So different dragonflow services can use different sets of db models. But that is still some thoughts in mind. What do you think? I may bring it out in next irc meeting.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"}],"dragonflow/tests/unit/test_df_bgp_service.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfc184c4b6650bea5a759a9537550575293bb0f1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                                       ip_version\u003d\"4\")]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.nb_api.get_all.side_effect \u003d get_all_side_effect"},{"line_number":47,"context_line":"        self.bgp.start()"},{"line_number":48,"context_line":"        # Give fixed interval a chance to run."},{"line_number":49,"context_line":"        eventlet.sleep(0)"},{"line_number":50,"context_line":"        self.assertTrue(self.bgp.db_store.get_one(bgp.BGPPeer(id\u003d\"peer1\")))"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_8f99d420","line":47,"range":{"start_line":47,"start_character":0,"end_line":47,"end_character":24},"updated":"2017-03-31 02:23:06.000000000","message":"I should add self.bgp.stop() in cleanUp, will change it in next respin.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"79d8c341fc61e79c0977f5862655413a9c7a153c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.bgp.start()"},{"line_number":48,"context_line":"        # Give fixed interval a chance to run."},{"line_number":49,"context_line":"        eventlet.sleep(0)"},{"line_number":50,"context_line":"        self.assertTrue(self.bgp.db_store.get_one(bgp.BGPPeer(id\u003d\"peer1\")))"},{"line_number":51,"context_line":"        self.assertTrue("},{"line_number":52,"context_line":"            self.bgp.db_store.get_one(bgp.BGPSpeaker(id\u003d\"speaker1\")))"}],"source_content_type":"text/x-python","patch_set":3,"id":"ffe62b97_5d44ac1b","line":50,"range":{"start_line":50,"start_character":13,"end_line":50,"end_character":23},"updated":"2017-03-30 12:57:17.000000000","message":"nit: You can also do the following if you like think it looks nicer.\n\nself.assertIn(bgp.BGPPeer(id\u003d\u0027peer1\u0027), self.bgp.db_store)","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"9d51e8d2bc9a8fcbc660d8c0fe3c0b18e5f4bcbb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.bgp.start()"},{"line_number":48,"context_line":"        # Give fixed interval a chance to run."},{"line_number":49,"context_line":"        eventlet.sleep(0)"},{"line_number":50,"context_line":"        self.assertTrue(self.bgp.db_store.get_one(bgp.BGPPeer(id\u003d\"peer1\")))"},{"line_number":51,"context_line":"        self.assertTrue("},{"line_number":52,"context_line":"            self.bgp.db_store.get_one(bgp.BGPSpeaker(id\u003d\"speaker1\")))"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_73f6ec65","line":50,"range":{"start_line":50,"start_character":13,"end_line":50,"end_character":23},"in_reply_to":"dfeb2761_2d518637","updated":"2017-04-05 07:19:19.000000000","message":"Oh, sorry, you\u0027re correct.\n__contains__ returns true only if you pass it the original object.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"85b20ddbc40ca87e7fe6738fed981b44ffcaca27","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.bgp.start()"},{"line_number":48,"context_line":"        # Give fixed interval a chance to run."},{"line_number":49,"context_line":"        eventlet.sleep(0)"},{"line_number":50,"context_line":"        self.assertTrue(self.bgp.db_store.get_one(bgp.BGPPeer(id\u003d\"peer1\")))"},{"line_number":51,"context_line":"        self.assertTrue("},{"line_number":52,"context_line":"            self.bgp.db_store.get_one(bgp.BGPSpeaker(id\u003d\"speaker1\")))"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_2d518637","line":50,"range":{"start_line":50,"start_character":13,"end_line":50,"end_character":23},"in_reply_to":"dfeb2761_effce03f","updated":"2017-04-01 13:47:24.000000000","message":"I tried and found assertIn will not work, because\nBGPPeer(id\u003d\u0027peer1\u0027) !\u003d BGPPeer(id\u003d\u0027peer1\u0027, name\u003d\u0027peer1\u0027, peer_ip\u003dIPAddress(\u0027172.24.4.88\u0027), remote_as\u003d4321, topic\u003d\u0027topic1\u0027)","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"cfc184c4b6650bea5a759a9537550575293bb0f1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.bgp.start()"},{"line_number":48,"context_line":"        # Give fixed interval a chance to run."},{"line_number":49,"context_line":"        eventlet.sleep(0)"},{"line_number":50,"context_line":"        self.assertTrue(self.bgp.db_store.get_one(bgp.BGPPeer(id\u003d\"peer1\")))"},{"line_number":51,"context_line":"        self.assertTrue("},{"line_number":52,"context_line":"            self.bgp.db_store.get_one(bgp.BGPSpeaker(id\u003d\"speaker1\")))"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfeb2761_effce03f","line":50,"range":{"start_line":50,"start_character":13,"end_line":50,"end_character":23},"in_reply_to":"ffe62b97_5d44ac1b","updated":"2017-03-31 02:23:06.000000000","message":"Will change in next respin.","commit_id":"945c107528dc33abcc46a1796466b814f38f6651"}]}
