)]}'
{"dragonflow/common/periodic_tasks.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class PeriodicTasks(object):"},{"line_number":25,"context_line":"    def __init__(self, callback, args_generator, interval):"},{"line_number":26,"context_line":"        self.callback \u003d callback"},{"line_number":27,"context_line":"        self.args_generator \u003d args_generator"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_bfdec70e","line":24,"updated":"2017-01-05 14:00:25.000000000","message":"Isn\u0027t this just oslo\u0027s loopingcall ( http://docs.openstack.org/developer/oslo.service/api/loopingcall.html#oslo_service.loopingcall.FixedIntervalLoopingCall )?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            except Exception:"},{"line_number":44,"context_line":"                # FIXME(Rajiv): Log the periodic task identity to make"},{"line_number":45,"context_line":"                # debugging easier."},{"line_number":46,"context_line":"                LOG.exception(_LE(\"Failed to perform periodic task for ****\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_5fd07bf6","line":46,"range":{"start_line":46,"start_character":71,"end_line":46,"end_character":78},"updated":"2017-01-05 14:00:25.000000000","message":"I think this can be fixed in this patch - maybe pass an optional name to the constructor (defaulted to e.g. \u0027\u003cunknown\u003e\u0027) and then print it here?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"}],"dragonflow/common/report_status.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f02de09eb596ef49fdbdf748cc9c937404566f0a","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def run_status_reporter(status_update_callback, host, binary):"},{"line_number":37,"context_line":"    loopingcall.FixedIntervalLoopingCall("},{"line_number":38,"context_line":"        report_status,"},{"line_number":39,"context_line":"        initial_delay\u003dcfg.CONF.df.report_interval)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_2d0b2a2d","line":38,"range":{"start_line":38,"start_character":8,"end_line":38,"end_character":21},"updated":"2017-01-09 13:43:50.000000000","message":"I think you need to pass status_update_callback, host, binary, as args as well.","commit_id":"8024b62bcec0647deacdf086e6ac38da33f7f08d"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        try:"},{"line_number":29,"context_line":"            callback(host, binary)"},{"line_number":30,"context_line":"        except Exception:"},{"line_number":31,"context_line":"            LOG.exception(_LE(\"Failed to report status of %(host)s on\""},{"line_number":32,"context_line":"               \" %(binary)s\"), {\u0027host\u0027: host, \u0027binary\u0027: binary})"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        return True"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_954df6c6","line":32,"range":{"start_line":31,"start_character":58,"end_line":32,"end_character":28},"updated":"2017-01-25 02:28:34.000000000","message":"I would imagine \"status of binary on host\"","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"            LOG.exception(_LE(\"Failed to report status of %(host)s on\""},{"line_number":32,"context_line":"               \" %(binary)s\"), {\u0027host\u0027: host, \u0027binary\u0027: binary})"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        return True"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    timer \u003d loopingcall.FixedIntervalLoopingCall(report_status)"},{"line_number":37,"context_line":"    timer.start(interval\u003dcfg.CONF.df.report_interval)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_d5105eae","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":19},"updated":"2017-01-25 02:28:34.000000000","message":"What is this for?","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"6ec2b5454cf329be31a17504820e24a489c7a7cf","unresolved":false,"context_lines":[{"line_number":31,"context_line":"            LOG.exception(_LE(\"Failed to report status of %(host)s on\""},{"line_number":32,"context_line":"               \" %(binary)s\"), {\u0027host\u0027: host, \u0027binary\u0027: binary})"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        return True"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    timer \u003d loopingcall.FixedIntervalLoopingCall(report_status)"},{"line_number":37,"context_line":"    timer.start(interval\u003dcfg.CONF.df.report_interval)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_3f4816cc","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":19},"in_reply_to":"5a3905b3_d5105eae","updated":"2017-01-30 08:33:59.000000000","message":"True has to be returned if there is no error. I refered http://docs.openstack.org/developer/oslo.service/api/loopingcall.html","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"53479da1ccb6ed5935da64eaee288bf765a31e06","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"import logging"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_service import loopingcall"}],"source_content_type":"text/x-python","patch_set":18,"id":"bff0334d_f3a4f64c","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":14},"updated":"2017-04-12 10:30:01.000000000","message":"why not oslo_log?","commit_id":"3e077212c56a4c93adfb6815b8011d84b24eca31"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"305768fbc5d31550d9f60e7514a262d14279e9f0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"import logging"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_config import cfg"},{"line_number":17,"context_line":"from oslo_service import loopingcall"}],"source_content_type":"text/x-python","patch_set":18,"id":"7ffa3b31_fd92f14a","line":14,"range":{"start_line":14,"start_character":7,"end_line":14,"end_character":14},"in_reply_to":"bff0334d_f3a4f64c","updated":"2017-04-19 09:59:18.000000000","message":"Will fix.","commit_id":"3e077212c56a4c93adfb6815b8011d84b24eca31"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e4e203e91b2fa1136cce9b734012b4a270508e8a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def run_status_reporter(callback):"},{"line_number":23,"context_line":"    def report_status():"},{"line_number":24,"context_line":"        try:"},{"line_number":25,"context_line":"            callback()"}],"source_content_type":"text/x-python","patch_set":22,"id":"1f013ff3_60776ca2","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":34},"updated":"2017-05-17 09:21:22.000000000","message":"could this just be inside dragonflow.controller.service?","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a5bee5def8772713eeebf521fe0a5bbdb0ea4d9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def run_status_reporter(callback):"},{"line_number":23,"context_line":"    def report_status():"},{"line_number":24,"context_line":"        try:"},{"line_number":25,"context_line":"            callback()"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff0f0b1f_1dee3788","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":34},"in_reply_to":"1f013ff3_60776ca2","updated":"2017-05-17 12:05:10.000000000","message":"Sure. Will move.","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"}],"dragonflow/common/utils.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return False"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def generate_uuid(*args):"},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    Generate a non-random uuid based on the fully provided arguments."},{"line_number":64,"context_line":"    This UUID is supposed to remain the same, if the same arguments"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_62e68616","line":61,"updated":"2017-01-05 14:00:25.000000000","message":"This function is also used here:\nhttps://github.com/openstack/dragonflow/blob/8e92e8db0812a85056a5e2a8ad6d178c972863a9/dragonflow/db/pub_sub_api.py#L60\n\nMaybe move it to utils in a different patch?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"ca2bb6458e90313f3297cdfa8a7b6ac74910f941","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return False"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def generate_uuid(*args):"},{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    Generate a non-random uuid based on the fully provided arguments."},{"line_number":64,"context_line":"    This UUID is supposed to remain the same, if the same arguments"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_a67bc9f3","line":61,"in_reply_to":"ba5201f7_62e68616","updated":"2017-01-09 13:20:40.000000000","message":"I will do it in other patch. As i have to change interface of the mentioned function and the code calling it, which is not related to this patch.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"\"\""},{"line_number":63,"context_line":"    Generate a non-random uuid based on the fully provided arguments."},{"line_number":64,"context_line":"    This UUID is supposed to remain the same, if the same arguments"},{"line_number":65,"context_line":"    are passed ."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    return str(uuid.uuid5(uuid.NAMESPACE_OID, \u0027\u0027.join(args)))"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_55daaeea","line":65,"range":{"start_line":65,"start_character":14,"end_line":65,"end_character":15},"updated":"2017-01-25 02:28:34.000000000","message":"extra space","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"}],"dragonflow/conf/df_common_params.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fcf63b24c79cf28169b3fe02ed1051a44a0ef6ee","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    cfg.IntOpt("},{"line_number":163,"context_line":"        \u0027service_down_time\u0027,"},{"line_number":164,"context_line":"        default\u003d80,"},{"line_number":165,"context_line":"        help\u003d_(\u0027Time period after which service will be considered down\u0027)"},{"line_number":166,"context_line":"    ),"},{"line_number":167,"context_line":"    cfg.IntOpt("},{"line_number":168,"context_line":"        \u0027report_interval\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_522b2294","line":165,"range":{"start_line":165,"start_character":16,"end_line":165,"end_character":71},"updated":"2017-01-05 03:43:00.000000000","message":"Should inform that \"should be at least twice report_interval, to be sure the service is down for good.\" and the unit is seconds.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cfg.IntOpt("},{"line_number":166,"context_line":"        \u0027service_down_time\u0027,"},{"line_number":167,"context_line":"        default\u003d80,"},{"line_number":168,"context_line":"        help\u003d_(\u0027This time(in seconds) should be at least thrice of \u0027"},{"line_number":169,"context_line":"               \u0027report_interval, to be sure the service is really down.\u0027)"},{"line_number":170,"context_line":"    ),"},{"line_number":171,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_5588eec6","line":168,"range":{"start_line":168,"start_character":48,"end_line":168,"end_character":67},"updated":"2017-01-25 02:28:34.000000000","message":"The openstack service usually use twice of report_interval as down_time. Why should we be different?","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"6ec2b5454cf329be31a17504820e24a489c7a7cf","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cfg.IntOpt("},{"line_number":166,"context_line":"        \u0027service_down_time\u0027,"},{"line_number":167,"context_line":"        default\u003d80,"},{"line_number":168,"context_line":"        help\u003d_(\u0027This time(in seconds) should be at least thrice of \u0027"},{"line_number":169,"context_line":"               \u0027report_interval, to be sure the service is really down.\u0027)"},{"line_number":170,"context_line":"    ),"},{"line_number":171,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_3f92d6f6","line":168,"range":{"start_line":168,"start_character":48,"end_line":168,"end_character":67},"in_reply_to":"5a3905b3_5588eec6","updated":"2017-01-30 08:33:59.000000000","message":"I am talking with reference to following link http://docs.openstack.org/newton/config-reference/compute/config-options.html\n\nMay be we can follow the same approach of 10s and 60s, if everyone agrees. If it puts a lot of loads on services then we can extend it. What do you think?","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"53479da1ccb6ed5935da64eaee288bf765a31e06","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cfg.IntOpt("},{"line_number":166,"context_line":"        \u0027service_down_time\u0027,"},{"line_number":167,"context_line":"        default\u003d80,"},{"line_number":168,"context_line":"        help\u003d_(\u0027This time(in seconds) should be at least thrice of \u0027"},{"line_number":169,"context_line":"               \u0027report_interval, to be sure the service is really down.\u0027)"},{"line_number":170,"context_line":"    ),"},{"line_number":171,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":18,"id":"bff0334d_f37996c4","line":168,"range":{"start_line":168,"start_character":57,"end_line":168,"end_character":63},"updated":"2017-04-12 10:30:01.000000000","message":"what does it mean?","commit_id":"3e077212c56a4c93adfb6815b8011d84b24eca31"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"305768fbc5d31550d9f60e7514a262d14279e9f0","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    cfg.IntOpt("},{"line_number":166,"context_line":"        \u0027service_down_time\u0027,"},{"line_number":167,"context_line":"        default\u003d80,"},{"line_number":168,"context_line":"        help\u003d_(\u0027This time(in seconds) should be at least thrice of \u0027"},{"line_number":169,"context_line":"               \u0027report_interval, to be sure the service is really down.\u0027)"},{"line_number":170,"context_line":"    ),"},{"line_number":171,"context_line":"    cfg.IntOpt("}],"source_content_type":"text/x-python","patch_set":18,"id":"7ffa3b31_3d73b94f","line":168,"range":{"start_line":168,"start_character":57,"end_line":168,"end_character":63},"in_reply_to":"bff0334d_f37996c4","updated":"2017-04-19 09:59:18.000000000","message":"thrice \u003d three times","commit_id":"3e077212c56a4c93adfb6815b8011d84b24eca31"}],"dragonflow/controller/df_local_controller.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f02de09eb596ef49fdbdf748cc9c937404566f0a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            self.tunnel_types \u003d [cfg.CONF.df.tunnel_type]"},{"line_number":59,"context_line":"        self.sync_finished \u003d False"},{"line_number":60,"context_line":"        self.port_status_notifier \u003d None"},{"line_number":61,"context_line":"\u003c\u003c\u003c\u003c\u003c\u003c\u003c HEAD"},{"line_number":62,"context_line":"        nb_driver \u003d df_utils.load_driver("},{"line_number":63,"context_line":"            cfg.CONF.df.nb_db_class,"},{"line_number":64,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":65,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":66,"context_line":"            nb_driver,"},{"line_number":67,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":68,"context_line":"        self.vswitch_api \u003d vswitch_impl.OvsApi(self.mgt_ip)"},{"line_number":69,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":70,"context_line":"        self.vswitch_api \u003d vswitch_impl.OvsApi(self.ip)"},{"line_number":71,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e 71aa4be... Added support for service status reporting"},{"line_number":72,"context_line":"        if cfg.CONF.df.enable_port_status_notifier:"},{"line_number":73,"context_line":"            self.port_status_notifier \u003d df_utils.load_driver("},{"line_number":74,"context_line":"                     cfg.CONF.df.port_status_notifier,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_503d61ba","line":71,"range":{"start_line":61,"start_character":0,"end_line":71,"end_character":61},"updated":"2017-01-09 13:43:50.000000000","message":"This is a merge/rebase conflict that has to be resolved.","commit_id":"8024b62bcec0647deacdf086e6ac38da33f7f08d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7fd05022959f0cb17f0474d58af4bb93486475d8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"from dragonflow import conf as cfg"},{"line_number":30,"context_line":"from dragonflow.controller import df_db_objects_refresh"},{"line_number":31,"context_line":"from dragonflow.controller import ryu_base_app"},{"line_number":32,"context_line":"from dragonflow.controller.service import Service"},{"line_number":33,"context_line":"from dragonflow.controller import topology"},{"line_number":34,"context_line":"from dragonflow.db import db_consistent"},{"line_number":35,"context_line":"from dragonflow.db import db_store"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_a1c0bd7d","line":32,"range":{"start_line":32,"start_character":42,"end_line":32,"end_character":49},"updated":"2017-01-15 09:47:54.000000000","message":"Please import modules, not calsses. (Sorry I missed this before)","commit_id":"c66905b52b8360d296bb3326686f89874502bee0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            self.tunnel_types \u003d [cfg.CONF.df.tunnel_type]"},{"line_number":59,"context_line":"        self.sync_finished \u003d False"},{"line_number":60,"context_line":"        self.port_status_notifier \u003d None"},{"line_number":61,"context_line":"        self.vswitch_api \u003d vswitch_impl.OvsApi(self.ip)"},{"line_number":62,"context_line":"        if cfg.CONF.df.enable_port_status_notifier:"},{"line_number":63,"context_line":"            self.port_status_notifier \u003d df_utils.load_driver("},{"line_number":64,"context_line":"                     cfg.CONF.df.port_status_notifier,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_d5613e13","line":61,"range":{"start_line":61,"start_character":47,"end_line":61,"end_character":54},"updated":"2017-01-25 02:28:34.000000000","message":"it looks like you are reverting some unrelated code.","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"71266797356e5e1db36206740b2d6e5a63b9ae90","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"SERVICE_NAME \u003d \u0027df-local-controller\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class DfLocalController(service.Service):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_01d4efbb","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":36},"updated":"2017-04-05 02:33:55.000000000","message":"maybe we can make it as a class attribute,(it looks like a class attribute to me) so we don\u0027t need to pass it as a parameter.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f2aaffae5b24141c3ad5f52f18f3183384405b20","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"SERVICE_NAME \u003d \u0027df-local-controller\u0027"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class DfLocalController(service.Service):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_2d480185","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":36},"in_reply_to":"dfeb2761_01d4efbb","updated":"2017-04-05 06:39:04.000000000","message":"Done","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"}],"dragonflow/controller/df_publisher_service.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7fd05022959f0cb17f0474d58af4bb93486475d8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from dragonflow.common import exceptions"},{"line_number":26,"context_line":"from dragonflow.common import utils as df_utils"},{"line_number":27,"context_line":"from dragonflow import conf as cfg"},{"line_number":28,"context_line":"from dragonflow.controller.service import Service"},{"line_number":29,"context_line":"from dragonflow.db import db_common"},{"line_number":30,"context_line":"from dragonflow.db import models"},{"line_number":31,"context_line":"from dragonflow.db import pub_sub_api"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_a147dd1b","line":28,"range":{"start_line":28,"start_character":42,"end_line":28,"end_character":49},"updated":"2017-01-15 09:47:54.000000000","message":"Same here re: import classes (Again, sorry :( )","commit_id":"c66905b52b8360d296bb3326686f89874502bee0"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"32b5db36e45da37e05bfa57fab7c257ebe69f9ec","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def run(self):"},{"line_number":78,"context_line":"        if self.multiproc_subscriber:"},{"line_number":79,"context_line":"            self.multiproc_subscriber.daemonize()"},{"line_number":80,"context_line":"        self.db.initialize("},{"line_number":81,"context_line":"            db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":82,"context_line":"            db_port\u003dcfg.CONF.df.remote_db_port,"},{"line_number":83,"context_line":"            config\u003dcfg.CONF.df"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":"        self._register_as_publisher()"},{"line_number":86,"context_line":"        self._start_db_table_monitors()"},{"line_number":87,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7ffa3b31_ea7ae2b7","line":84,"range":{"start_line":80,"start_character":8,"end_line":84,"end_character":9},"updated":"2017-04-21 01:45:06.000000000","message":"This service is failed because the db object is removed in this commit.","commit_id":"71708e5a00fdec17dfb2275b51713a2cf739f5a4"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"8cdcd035defc879fb60b963a266f477c64b0045a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    def run(self):"},{"line_number":78,"context_line":"        if self.multiproc_subscriber:"},{"line_number":79,"context_line":"            self.multiproc_subscriber.daemonize()"},{"line_number":80,"context_line":"        self.db.initialize("},{"line_number":81,"context_line":"            db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":82,"context_line":"            db_port\u003dcfg.CONF.df.remote_db_port,"},{"line_number":83,"context_line":"            config\u003dcfg.CONF.df"},{"line_number":84,"context_line":"        )"},{"line_number":85,"context_line":"        self._register_as_publisher()"},{"line_number":86,"context_line":"        self._start_db_table_monitors()"},{"line_number":87,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":19,"id":"5ff73747_1fb17e90","line":84,"range":{"start_line":80,"start_character":8,"end_line":84,"end_character":9},"in_reply_to":"7ffa3b31_ea7ae2b7","updated":"2017-04-23 13:21:12.000000000","message":"Will fix. I think it can be removed since this is done in service.Service.","commit_id":"71708e5a00fdec17dfb2275b51713a2cf739f5a4"}],"dragonflow/controller/metadata_service_app.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fcf63b24c79cf28169b3fe02ed1051a44a0ef6ee","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":491,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":492,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":493,"context_line":"        chassis \u003d socket.gethostname()"},{"line_number":494,"context_line":"        self.nb_api.create_service(chassis, SERVICE_NAME)"},{"line_number":495,"context_line":"        report_status.run_status_reporter(self.nb_api.report_up,"},{"line_number":496,"context_line":"                                          self.nb_api,"},{"line_number":497,"context_line":"                                          chassis,"},{"line_number":498,"context_line":"                                          SERVICE_NAME)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _get_ovsdb_connection_string(self):"},{"line_number":501,"context_line":"        return \u0027tcp:{}:6640\u0027.format(cfg.CONF.df.local_ip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_554a2cad","line":498,"range":{"start_line":493,"start_character":0,"end_line":498,"end_character":55},"updated":"2017-01-05 03:43:00.000000000","message":"The code looks similar in any of the service. Maybe you can define a mixin for all the service and just extend the service class with that mixin.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":491,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":492,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":493,"context_line":"        chassis \u003d socket.gethostname()"},{"line_number":494,"context_line":"        self.nb_api.create_service(chassis, SERVICE_NAME)"},{"line_number":495,"context_line":"        report_status.run_status_reporter(self.nb_api.report_up,"},{"line_number":496,"context_line":"                                          self.nb_api,"},{"line_number":497,"context_line":"                                          chassis,"},{"line_number":498,"context_line":"                                          SERVICE_NAME)"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def _get_ovsdb_connection_string(self):"},{"line_number":501,"context_line":"        return \u0027tcp:{}:6640\u0027.format(cfg.CONF.df.local_ip)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_2201de6a","line":498,"range":{"start_line":493,"start_character":0,"end_line":498,"end_character":55},"in_reply_to":"ba5201f7_554a2cad","updated":"2017-01-05 14:00:25.000000000","message":"+1","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7fd05022959f0cb17f0474d58af4bb93486475d8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from dragonflow.controller.common import arp_responder"},{"line_number":31,"context_line":"from dragonflow.controller.common import constants as const"},{"line_number":32,"context_line":"from dragonflow.controller import df_base_app"},{"line_number":33,"context_line":"from dragonflow.controller.service import Service"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"from ryu.lib.packet import arp"},{"line_number":36,"context_line":"from ryu.lib.packet import ethernet"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_4110f901","line":33,"range":{"start_line":33,"start_character":42,"end_line":33,"end_character":49},"updated":"2017-01-15 09:47:54.000000000","message":"Same here","commit_id":"c66905b52b8360d296bb3326686f89874502bee0"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"5f2fed10c3144d9070cb7e2feaf381a13ec21260","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"class BaseMetadataProxyHandler(service.Service):"},{"line_number":407,"context_line":"    def __init__(self):"},{"line_number":408,"context_line":"        super(BaseMetadataProxyHandler, self).__init__()"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":411,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_fcce4958","line":408,"range":{"start_line":407,"start_character":0,"end_line":408,"end_character":56},"updated":"2017-04-05 08:31:45.000000000","message":"These two lines are not necessary.","commit_id":"2504a1498290ff0d6c9d7b1874152bc15a768cdd"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"9add9381b1a561821d0213061524dbf482b23d29","unresolved":false,"context_lines":[{"line_number":404,"context_line":""},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"class BaseMetadataProxyHandler(service.Service):"},{"line_number":407,"context_line":"    def __init__(self):"},{"line_number":408,"context_line":"        super(BaseMetadataProxyHandler, self).__init__()"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":411,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":17,"id":"dfeb2761_e510e550","line":408,"range":{"start_line":407,"start_character":0,"end_line":408,"end_character":56},"in_reply_to":"dfeb2761_fcce4958","updated":"2017-04-05 11:11:02.000000000","message":"Done","commit_id":"2504a1498290ff0d6c9d7b1874152bc15a768cdd"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"32b5db36e45da37e05bfa57fab7c257ebe69f9ec","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":491,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":492,"context_line":"            nb_driver,"},{"line_number":493,"context_line":"            use_pubsub\u003dFalse)"},{"line_number":494,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":495,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7ffa3b31_8ab59e80","side":"PARENT","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":28},"updated":"2017-04-21 01:45:06.000000000","message":"The reason that this class doesn\u0027t take advantage of nb_api.get_instance() is because it has to disable pubsub. It was a fast fix. But when you change the behavior, it will fail when enabling zmq pubsub driver. In order to make it work, the nb_api.get_instance() needs to expose use_pubsub as its argument. By default, it could be set to True, but in this class it needs to be explicitly set to False.","commit_id":"c5a96739a832d8d48f01d31bb73d2416b955738c"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"a475e26ca016006c9c4ca67d36446869ca457683","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":491,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":492,"context_line":"            nb_driver,"},{"line_number":493,"context_line":"            use_pubsub\u003dFalse)"},{"line_number":494,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":495,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5ff73747_0de06b25","side":"PARENT","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":28},"in_reply_to":"5ff73747_3fbc3a68","updated":"2017-04-29 04:00:55.000000000","message":"https://review.openstack.org/#/c/451408/9/dragonflow/controller/df_bgp_service.py\n\nit can be achieved by cfg.CONF.set_override.","commit_id":"c5a96739a832d8d48f01d31bb73d2416b955738c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"8cdcd035defc879fb60b963a266f477c64b0045a","unresolved":false,"context_lines":[{"line_number":490,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":491,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":492,"context_line":"            nb_driver,"},{"line_number":493,"context_line":"            use_pubsub\u003dFalse)"},{"line_number":494,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":495,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"5ff73747_3fbc3a68","side":"PARENT","line":493,"range":{"start_line":493,"start_character":12,"end_line":493,"end_character":28},"in_reply_to":"7ffa3b31_8ab59e80","updated":"2017-04-23 13:21:12.000000000","message":"Will add","commit_id":"c5a96739a832d8d48f01d31bb73d2416b955738c"}],"dragonflow/controller/service.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"b3ce92b08f27c01f22dfe0eacd434c785536359a","unresolved":false,"context_lines":[{"line_number":30,"context_line":"            nb_driver,"},{"line_number":31,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":34,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        chassis \u003d socket.gethostname()"},{"line_number":37,"context_line":"        self.nb_api.create_service(chassis, binary)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_952ed6a3","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":66},"updated":"2017-01-25 02:28:34.000000000","message":"So you are moving initialization of nb_api from method initialize to __init__, is it required to this patch?","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"9b2c358b9c1a5db511b42d65d4baa6159bac2bc8","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        nb_driver \u003d df_utils.load_driver("},{"line_number":27,"context_line":"            cfg.CONF.df.nb_db_class,"},{"line_number":28,"context_line":"            df_utils.DF_NB_DB_DRIVER_NAMESPACE)"},{"line_number":29,"context_line":"        self.nb_api \u003d api_nb.NbApi("},{"line_number":30,"context_line":"            nb_driver,"},{"line_number":31,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":34,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        chassis \u003d socket.gethostname()"},{"line_number":37,"context_line":"        self.nb_api.create_service(chassis, binary)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a3905b3_4a05cd43","line":34,"range":{"start_line":26,"start_character":0,"end_line":34,"end_character":66},"updated":"2017-01-24 13:50:47.000000000","message":"This is done by NbApi.get_instance, also calling it creates a global instance so other can retrive it using get_instance as we..","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"fad30be68e80af3a45d25df05bf7b3bb5cf55ec5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"            nb_driver,"},{"line_number":31,"context_line":"            use_pubsub\u003dcfg.CONF.df.enable_df_pub_sub)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        self.nb_api.initialize(db_ip\u003dcfg.CONF.df.remote_db_ip,"},{"line_number":34,"context_line":"                               db_port\u003dcfg.CONF.df.remote_db_port)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        chassis \u003d socket.gethostname()"},{"line_number":37,"context_line":"        self.nb_api.create_service(chassis, binary)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_4b9e0c64","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":66},"in_reply_to":"5a3905b3_952ed6a3","updated":"2017-01-30 04:02:06.000000000","message":"I think this is needed, since the Service class uses the nb_api. But I think it should be used with get_instance.","commit_id":"ecc980b4c0bbdcba147354776f8fdc8a8701561c"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_42ae0799","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":53},"updated":"2017-03-30 12:50:42.000000000","message":"Do we plan to create Service for mech_driver side?","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"fc14dd66a41f29a772f98baa7baec89b0ee670d2","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfeb2761_76e75114","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":53},"in_reply_to":"dfeb2761_b6571903","updated":"2017-04-03 07:02:01.000000000","message":"Sure","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_f6171a45","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":53},"in_reply_to":"ffe62b97_42ae0799","updated":"2017-03-30 14:40:49.000000000","message":"I\u0027ll pass it to the constructor.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"b96934ee8e10962abbcfe5cab6b39ec17f0a8a1c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfeb2761_b6571903","line":26,"range":{"start_line":26,"start_character":48,"end_line":26,"end_character":53},"in_reply_to":"ffe62b97_f6171a45","updated":"2017-04-03 06:41:15.000000000","message":"I reviewed the code. Currently it should always be false. Since this pattern is planned to be changed anyway, I\u0027d rather make the modification there rather than here.\n\nIs that acceptable?","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"},{"line_number":30,"context_line":"                                     self.nb_api, chassis_id, binary)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_828d2f33","line":27,"range":{"start_line":27,"start_character":30,"end_line":27,"end_character":34},"updated":"2017-03-30 12:50:42.000000000","message":"Don\u0027t we take this from gethostname()?","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":28,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary))"},{"line_number":29,"context_line":"        callback \u003d functools.partial(service.Service.update_last_seen,"},{"line_number":30,"context_line":"                                     self.nb_api, chassis_id, binary)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_d62656bb","line":27,"range":{"start_line":27,"start_character":30,"end_line":27,"end_character":34},"in_reply_to":"ffe62b97_828d2f33","updated":"2017-03-30 14:40:49.000000000","message":"That\u0027s the default, but it can be overridden.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"71266797356e5e1db36206740b2d6e5a63b9ae90","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_210c9392","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":42},"updated":"2017-04-05 02:33:55.000000000","message":"This should be updated or removed.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f2aaffae5b24141c3ad5f52f18f3183384405b20","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_ad53f138","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":42},"in_reply_to":"dfeb2761_210c9392","updated":"2017-04-05 06:39:04.000000000","message":"Done","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"71266797356e5e1db36206740b2d6e5a63b9ae90","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from dragonflow.db.models import service"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_5c01be04","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":22},"updated":"2017-04-05 02:33:55.000000000","message":"Is it better to change it to a subclass of oslo_service.service.Service? It might involve more code change, and I think it makes sense to be a separate change.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f2aaffae5b24141c3ad5f52f18f3183384405b20","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from dragonflow.db.models import service"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class Service(object):"},{"line_number":25,"context_line":"    def __init__(self, binary):"},{"line_number":26,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":27,"context_line":"        chassis_id \u003d cfg.CONF.host"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_ed2219b9","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":22},"in_reply_to":"dfeb2761_5c01be04","updated":"2017-04-05 06:39:04.000000000","message":"I\u0027d prefer not to add it in this patch oslo\u0027s service has features such as running in a threadgroup, start, reset, stop and wait functionality, all of which we don\u0027t have (start is automatic. stop is ctrl-C, and not exactly graceful).","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"32b5db36e45da37e05bfa57fab7c257ebe69f9ec","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Service(object):"},{"line_number":22,"context_line":"    def __init__(self):"},{"line_number":23,"context_line":"        binary \u003d self.service_name"},{"line_number":24,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":25,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":26,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary),"}],"source_content_type":"text/x-python","patch_set":19,"id":"7ffa3b31_ca63a641","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":14},"updated":"2017-04-21 01:45:06.000000000","message":"suggest make it as an internal attribute, self.binary, so we can take advantage of it later.","commit_id":"71708e5a00fdec17dfb2275b51713a2cf739f5a4"},{"author":{"_account_id":7805,"name":"Li Ma","email":"skywalker.nick@gmail.com","username":"Nick"},"change_message_id":"a475e26ca016006c9c4ca67d36446869ca457683","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Service(object):"},{"line_number":22,"context_line":"    def __init__(self):"},{"line_number":23,"context_line":"        binary \u003d self.service_name"},{"line_number":24,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":25,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":26,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary),"}],"source_content_type":"text/x-python","patch_set":19,"id":"5ff73747_6ddfef68","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":14},"in_reply_to":"5ff73747_5fb70688","updated":"2017-04-29 04:00:55.000000000","message":"oops, that\u0027s enough.","commit_id":"71708e5a00fdec17dfb2275b51713a2cf739f5a4"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"8cdcd035defc879fb60b963a266f477c64b0045a","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Service(object):"},{"line_number":22,"context_line":"    def __init__(self):"},{"line_number":23,"context_line":"        binary \u003d self.service_name"},{"line_number":24,"context_line":"        self.nb_api \u003d api_nb.NbApi.get_instance(False)"},{"line_number":25,"context_line":"        chassis_id \u003d cfg.CONF.host"},{"line_number":26,"context_line":"        self.nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dbinary),"}],"source_content_type":"text/x-python","patch_set":19,"id":"5ff73747_5fb70688","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":14},"in_reply_to":"7ffa3b31_ca63a641","updated":"2017-04-23 13:21:12.000000000","message":"We can take advantage of it using self.service_name. Is that enough?","commit_id":"71708e5a00fdec17dfb2275b51713a2cf739f5a4"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e4e203e91b2fa1136cce9b734012b4a270508e8a","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def register_service(service_name, nb_api, instance\u003dNone):"},{"line_number":24,"context_line":"    if instance:"},{"line_number":25,"context_line":"        service_names[id(instance)] \u003d service_name"},{"line_number":26,"context_line":"    chassis_id \u003d cfg.CONF.host"},{"line_number":27,"context_line":"    nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dservice_name),"},{"line_number":28,"context_line":"                  skip_send_event\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":22,"id":"1f013ff3_6029ac88","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":50},"updated":"2017-05-17 09:21:22.000000000","message":"why do you cache the binary name?","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a5bee5def8772713eeebf521fe0a5bbdb0ea4d9","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def register_service(service_name, nb_api, instance\u003dNone):"},{"line_number":24,"context_line":"    if instance:"},{"line_number":25,"context_line":"        service_names[id(instance)] \u003d service_name"},{"line_number":26,"context_line":"    chassis_id \u003d cfg.CONF.host"},{"line_number":27,"context_line":"    nb_api.create(service.Service(chassis\u003dchassis_id, binary\u003dservice_name),"},{"line_number":28,"context_line":"                  skip_send_event\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff0f0b1f_dd843fb4","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":50},"in_reply_to":"1f013ff3_6029ac88","updated":"2017-05-17 12:05:10.000000000","message":"In case we want to retrieve later (for logs, or something).\n\nSee nick-ma\u0027s comment from PS19. I didn\u0027t want it as an internal attribute anymore, since everything else is external to the instance, but I did want the information to remain available.","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"}],"dragonflow/db/api_nb.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":884,"context_line":"                active_port_json))"},{"line_number":885,"context_line":"        return res"},{"line_number":886,"context_line":""},{"line_number":887,"context_line":"    def _get_chassis_service_json(self, chassis):"},{"line_number":888,"context_line":"        services \u003d self.driver.get_key(db_models.Service.table_name, chassis)"},{"line_number":889,"context_line":"        return jsonutils.loads(services)"},{"line_number":890,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_c5273cb4","line":887,"range":{"start_line":887,"start_character":29,"end_line":887,"end_character":33},"updated":"2017-01-05 14:00:25.000000000","message":"These methods return dict, not json. Maybe rename to _\u003cmethod\u003e_chassis_service_dict ?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                res.append(db_models.Service(service))"},{"line_number":922,"context_line":"        return res"},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"    def _does_service_exist(self, chassis, binary, uuid):"},{"line_number":925,"context_line":"        service \u003d self.get_service(chassis, binary)"},{"line_number":926,"context_line":"        if service and service.get_id() \u003d\u003d uuid:"},{"line_number":927,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_620be62a","line":924,"range":{"start_line":924,"start_character":8,"end_line":924,"end_character":27},"updated":"2017-01-05 14:00:25.000000000","message":"Won\u0027t this method raise DBKeyNOtFound when it should return false?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"ca2bb6458e90313f3297cdfa8a7b6ac74910f941","unresolved":false,"context_lines":[{"line_number":921,"context_line":"                res.append(db_models.Service(service))"},{"line_number":922,"context_line":"        return res"},{"line_number":923,"context_line":""},{"line_number":924,"context_line":"    def _does_service_exist(self, chassis, binary, uuid):"},{"line_number":925,"context_line":"        service \u003d self.get_service(chassis, binary)"},{"line_number":926,"context_line":"        if service and service.get_id() \u003d\u003d uuid:"},{"line_number":927,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_81c22f51","line":924,"range":{"start_line":924,"start_character":8,"end_line":924,"end_character":27},"in_reply_to":"ba5201f7_620be62a","updated":"2017-01-09 13:20:40.000000000","message":"You are right, i have handled this exception.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fcf63b24c79cf28169b3fe02ed1051a44a0ef6ee","unresolved":false,"context_lines":[{"line_number":938,"context_line":"            \u0027id\u0027: df_utils.generate_uuid(chassis, binary),"},{"line_number":939,"context_line":"            \u0027chassis\u0027: chassis,"},{"line_number":940,"context_line":"            \u0027binary\u0027: binary,"},{"line_number":941,"context_line":"            \u0027last_seen_up\u0027: time.time(),"},{"line_number":942,"context_line":"            \u0027disable\u0027: False,"},{"line_number":943,"context_line":"            \u0027disabled_reason\u0027: \u0027\u0027"},{"line_number":944,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_95dad44a","line":941,"range":{"start_line":941,"start_character":28,"end_line":941,"end_character":39},"updated":"2017-01-05 03:43:00.000000000","message":"why not use oslo_utils.timeutils","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":943,"context_line":"            \u0027disabled_reason\u0027: \u0027\u0027"},{"line_number":944,"context_line":"        }"},{"line_number":945,"context_line":""},{"line_number":946,"context_line":"        if self._does_service_exist(chassis, binary, service[\u0027id\u0027]):"},{"line_number":947,"context_line":"            return"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        chassis_services[binary] \u003d service"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_a2014e08","line":946,"range":{"start_line":946,"start_character":16,"end_line":946,"end_character":35},"updated":"2017-01-05 14:00:25.000000000","message":"Can\u0027t you just check if the exception in 934 was raised?","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fcf63b24c79cf28169b3fe02ed1051a44a0ef6ee","unresolved":false,"context_lines":[{"line_number":947,"context_line":"            return"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        chassis_services[binary] \u003d service"},{"line_number":950,"context_line":"        self._put_chassis_service_json(chassis_services, chassis)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def delete_service(self, chassis, binary):"},{"line_number":953,"context_line":"        chassis_services \u003d self._get_chassis_service_json(chassis)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_b50a7877","line":950,"range":{"start_line":950,"start_character":0,"end_line":950,"end_character":65},"updated":"2017-01-05 03:43:00.000000000","message":"multiple processes will update this key here, you should consider add lock for each other.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7fd05022959f0cb17f0474d58af4bb93486475d8","unresolved":false,"context_lines":[{"line_number":898,"context_line":""},{"line_number":899,"context_line":"    def get_service(self, chassis, binary):"},{"line_number":900,"context_line":"        try:"},{"line_number":901,"context_line":"            chassis_services \u003d self._get_chassis_service_dict(chassis)"},{"line_number":902,"context_line":"            json_service \u003d jsonutils.dumps(chassis_services[binary])"},{"line_number":903,"context_line":"            return db_models.Service(json_service)"},{"line_number":904,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a3c09a3_612a552e","line":901,"range":{"start_line":901,"start_character":36,"end_line":901,"end_character":61},"updated":"2017-01-15 09:47:54.000000000","message":"nit: This code comes out a bit funny: In the callee you transform json-\u003edict, and here you transform it back.\n\nHowever, I can\u0027t think of a more elegant way to do this at the moment, so it\u0027s only a nit.","commit_id":"c66905b52b8360d296bb3326686f89874502bee0"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from oslo_utils import excutils"},{"line_number":24,"context_line":"from oslo_utils import timeutils"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from dragonflow.common import exceptions"},{"line_number":27,"context_line":"from dragonflow.common import utils as df_utils"},{"line_number":28,"context_line":"from dragonflow.db import db_common"},{"line_number":29,"context_line":"from dragonflow.db import model_framework as mf"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_02791f2e","line":26,"range":{"start_line":26,"start_character":30,"end_line":26,"end_character":40},"updated":"2017-03-30 12:50:42.000000000","message":"unrelated-ish","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from oslo_utils import excutils"},{"line_number":24,"context_line":"from oslo_utils import timeutils"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from dragonflow.common import exceptions"},{"line_number":27,"context_line":"from dragonflow.common import utils as df_utils"},{"line_number":28,"context_line":"from dragonflow.db import db_common"},{"line_number":29,"context_line":"from dragonflow.db import model_framework as mf"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_f6303aeb","line":26,"range":{"start_line":26,"start_character":30,"end_line":26,"end_character":40},"in_reply_to":"ffe62b97_02791f2e","updated":"2017-03-30 14:40:49.000000000","message":"True. Thought it was added by this change. Will revert.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"}],"dragonflow/db/field_types.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"71266797356e5e1db36206740b2d6e5a63b9ae90","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            return str(obj)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"TimestampField \u003d fields.FloatField"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class EnumField(fields.StringField):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_5cf2de71","line":156,"range":{"start_line":156,"start_character":24,"end_line":156,"end_character":34},"updated":"2017-04-05 02:33:55.000000000","message":"Though time.time() returns a float number. float number doesn\u0027t add value here, maybe just a int is enough.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f2aaffae5b24141c3ad5f52f18f3183384405b20","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            return str(obj)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"TimestampField \u003d fields.FloatField"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"class EnumField(fields.StringField):"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_70a142f8","line":156,"range":{"start_line":156,"start_character":24,"end_line":156,"end_character":34},"in_reply_to":"dfeb2761_5cf2de71","updated":"2017-04-05 06:39:04.000000000","message":"I\u0027d rather keep it as float for a few reasons:\n* Native value returned by python\n* Using int, we either compromise on 1-second precision (even if we can do better), or scale the float first (complicates the code)\n* With the two points above, if we leave float, we may want to use something smarter, e.g. datetime. I wanted to avoid this since I don\u0027t want small conversions here and there.\n* By setting an alias, we can change the implementation from float to something else later without a lot more work than writing the field\u0027s implementation.\n\nWith the points above, I\u0027d prefer to stick with float.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"}],"dragonflow/db/models.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"7ab0c3c8c676aafbf09494d7900da4d116b21042","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import netaddr"},{"line_number":14,"context_line":"from oslo_serialization import jsonutils"},{"line_number":15,"context_line":"import time"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"UNIQUE_KEY \u003d \u0027unique_key\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_332b6b84","line":15,"updated":"2017-01-01 17:39:24.000000000","message":"It is not being used in this file.","commit_id":"11d4b6b632ad11427e1282d3e5c11bf9ce35d186"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"7ab0c3c8c676aafbf09494d7900da4d116b21042","unresolved":false,"context_lines":[{"line_number":489,"context_line":"    def get_chassis(self):"},{"line_number":490,"context_line":"        return self.inner_obj.get(\u0027chassis\u0027)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def get_host(binary):"},{"line_number":493,"context_line":"        return self.inner_obj.get(\u0027binary\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_9313375c","line":492,"updated":"2017-01-01 17:39:24.000000000","message":"Correction required. self is missing therefore binary will get object. Method name should be corrected. It should be changed to following\n\ndef get_binary(self):\n  return self.inner_obj.get(\u0027binary\u0027)","commit_id":"11d4b6b632ad11427e1282d3e5c11bf9ce35d186"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"7ab0c3c8c676aafbf09494d7900da4d116b21042","unresolved":false,"context_lines":[{"line_number":490,"context_line":"        return self.inner_obj.get(\u0027chassis\u0027)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"    def get_host(binary):"},{"line_number":493,"context_line":"        return self.inner_obj.get(\u0027binary\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba5201f7_d31dbf67","line":493,"updated":"2017-01-01 17:39:24.000000000","message":"Other method should be provided for fetching chassis name etc.","commit_id":"11d4b6b632ad11427e1282d3e5c11bf9ce35d186"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"fcf63b24c79cf28169b3fe02ed1051a44a0ef6ee","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        return str(self.ovs_port)"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"@register_model_class"},{"line_number":484,"context_line":"class Service(NbDbObject):"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    table_name \u003d \"service\""},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_f56fa028","line":484,"range":{"start_line":483,"start_character":0,"end_line":484,"end_character":26},"updated":"2017-01-05 03:43:00.000000000","message":"Does this need to be a separate db model, or it can just reside in the chassis db model.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"7a8de31e7c840b077f819b649da9ca46fd2e951f","unresolved":false,"context_lines":[{"line_number":480,"context_line":"        return str(self.ovs_port)"},{"line_number":481,"context_line":""},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"@register_model_class"},{"line_number":484,"context_line":"class Service(NbDbObject):"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"    table_name \u003d \"service\""},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_656770e9","line":484,"range":{"start_line":483,"start_character":0,"end_line":484,"end_character":26},"in_reply_to":"ba5201f7_f56fa028","updated":"2017-01-05 14:00:25.000000000","message":"I think this is a separate model. That is how it was described in the spec.","commit_id":"bed3c0d1c9e590c7421a5cbb99fbf094cd8e4dc8"}],"dragonflow/db/models/legacy.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    def __str__(self):"},{"line_number":460,"context_line":"        return str(self.ovs_port)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"@register_model_class"},{"line_number":464,"context_line":"class Service(NbDbObject):"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    table_name \u003d \"service\""},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def get_chassis(self):"},{"line_number":469,"context_line":"        return self.inner_obj.get(\u0027chassis\u0027)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def get_binary(self):"},{"line_number":472,"context_line":"        return self.inner_obj.get(\u0027binary\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_029ebf53","line":472,"range":{"start_line":462,"start_character":0,"end_line":472,"end_character":43},"updated":"2017-03-30 12:50:42.000000000","message":"Not needed anymore","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":459,"context_line":"    def __str__(self):"},{"line_number":460,"context_line":"        return str(self.ovs_port)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":""},{"line_number":463,"context_line":"@register_model_class"},{"line_number":464,"context_line":"class Service(NbDbObject):"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    table_name \u003d \"service\""},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"    def get_chassis(self):"},{"line_number":469,"context_line":"        return self.inner_obj.get(\u0027chassis\u0027)"},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"    def get_binary(self):"},{"line_number":472,"context_line":"        return self.inner_obj.get(\u0027binary\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_363c62be","line":472,"range":{"start_line":462,"start_character":0,"end_line":472,"end_character":43},"in_reply_to":"ffe62b97_029ebf53","updated":"2017-03-30 14:40:49.000000000","message":"Will fix","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"}],"dragonflow/db/models/service.py":[{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        :param nb_api:  NB dataabse API"},{"line_number":60,"context_line":"        :type nb_api:   api_nb.NbApi"},{"line_number":61,"context_line":"        :param chassis: The chassis on which the service runs"},{"line_number":62,"context_line":"        :type chassis:  string or core.Chassis"},{"line_number":63,"context_line":"        :param binary:  The name of the service on the chassis"},{"line_number":64,"context_line":"        :type binary:   String"},{"line_number":65,"context_line":"        :return:        service instance"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_62cfcb29","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":46},"updated":"2017-03-30 12:50:42.000000000","message":"I think accepting only one types make the code nicer.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        :param nb_api:  NB dataabse API"},{"line_number":60,"context_line":"        :type nb_api:   api_nb.NbApi"},{"line_number":61,"context_line":"        :param chassis: The chassis on which the service runs"},{"line_number":62,"context_line":"        :type chassis:  string or core.Chassis"},{"line_number":63,"context_line":"        :param binary:  The name of the service on the chassis"},{"line_number":64,"context_line":"        :type binary:   String"},{"line_number":65,"context_line":"        :return:        service instance"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_16627ed9","line":62,"range":{"start_line":62,"start_character":24,"end_line":62,"end_character":46},"in_reply_to":"ffe62b97_62cfcb29","updated":"2017-03-30 14:40:49.000000000","message":"It adds two lines. I don\u0027t think it\u0027s a problem.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":23766,"name":"Dima Kuznetsov","email":"dima.kuznetsov@toganetworks.com","username":"dimak"},"change_message_id":"8510bc1171bda7b93e82ee8200189fdb750d79f9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        nb_api.update(instance)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @classmethod"},{"line_number":92,"context_line":"    def is_alive(cls, nb_api, chassis, binary):"},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        Read the service for the given binary on the given chassis from the"},{"line_number":95,"context_line":"        given nb database. Returns true if the service is alive (as defined"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_822e4ff8","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":28},"updated":"2017-03-30 12:50:42.000000000","message":"If we\u0027re creating a singleton nb-api we don\u0027t really need to pass it around.","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"115606469f3934a51231a9b8f75f86303687570e","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        nb_api.update(instance)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @classmethod"},{"line_number":92,"context_line":"    def is_alive(cls, nb_api, chassis, binary):"},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        Read the service for the given binary on the given chassis from the"},{"line_number":95,"context_line":"        given nb database. Returns true if the service is alive (as defined"}],"source_content_type":"text/x-python","patch_set":8,"id":"ffe62b97_56db667c","line":92,"range":{"start_line":92,"start_character":22,"end_line":92,"end_character":28},"in_reply_to":"ffe62b97_822e4ff8","updated":"2017-03-30 14:40:49.000000000","message":"True, but I don\u0027t want to call get_instance and have to guess if it\u0027s compute-node side or neutron-server side.\n\nWe could change that once the nb_api usage change is complete (bp pub-sub-v2).","commit_id":"3cefc1c4a3fdb7ae1320ffa920861764e8cd41b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"71266797356e5e1db36206740b2d6e5a63b9ae90","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        report_time_diff \u003d time.time() - last_seen_up"},{"line_number":64,"context_line":"        return (report_time_diff \u003c\u003d cfg.CONF.df.service_down_time)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_SERVICE_STATUS)"},{"line_number":68,"context_line":"    def _update_last_seen(cls, nb_api, service_id):"},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        Read the service for the given binary on the given chassis from the"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_3c6a7aed","line":67,"range":{"start_line":66,"start_character":0,"end_line":67,"end_character":58},"updated":"2017-04-05 02:33:55.000000000","message":"Since service is stored in keys based on chassis and binary, we can think that only one process will update the certain service object in nb db. So I think the lock can be removed from here.","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f2aaffae5b24141c3ad5f52f18f3183384405b20","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        report_time_diff \u003d time.time() - last_seen_up"},{"line_number":64,"context_line":"        return (report_time_diff \u003c\u003d cfg.CONF.df.service_down_time)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    @classmethod"},{"line_number":67,"context_line":"    @lock_db.wrap_db_lock(lock_db.RESOURCE_SERVICE_STATUS)"},{"line_number":68,"context_line":"    def _update_last_seen(cls, nb_api, service_id):"},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        Read the service for the given binary on the given chassis from the"}],"source_content_type":"text/x-python","patch_set":15,"id":"dfeb2761_30a73a0e","line":67,"range":{"start_line":66,"start_character":0,"end_line":67,"end_character":58},"in_reply_to":"dfeb2761_3c6a7aed","updated":"2017-04-05 06:39:04.000000000","message":"Done","commit_id":"8f8a67dc842351f642237e43112540b4cef61b59"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e4e203e91b2fa1136cce9b734012b4a270508e8a","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def on_create_pre(self):"},{"line_number":47,"context_line":"        self.id \u003d generate_service_id(self.chassis, self.binary)"},{"line_number":48,"context_line":"        # TODO(oanson) Verify it doesn\u0027t exist"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def refresh_last_seen(self):"},{"line_number":51,"context_line":"        \"\"\"Refresh the timestamp in the last_seen_up field to now\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"1f013ff3_20f4c4f1","line":48,"range":{"start_line":48,"start_character":33,"end_line":48,"end_character":40},"updated":"2017-05-17 09:21:22.000000000","message":"Is it possible that this TODO goes inside this patch?","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a5bee5def8772713eeebf521fe0a5bbdb0ea4d9","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def on_create_pre(self):"},{"line_number":47,"context_line":"        self.id \u003d generate_service_id(self.chassis, self.binary)"},{"line_number":48,"context_line":"        # TODO(oanson) Verify it doesn\u0027t exist"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def refresh_last_seen(self):"},{"line_number":51,"context_line":"        \"\"\"Refresh the timestamp in the last_seen_up field to now\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ff0f0b1f_fd5ee343","line":48,"range":{"start_line":48,"start_character":33,"end_line":48,"end_character":40},"in_reply_to":"1f013ff3_20f4c4f1","updated":"2017-05-17 12:05:10.000000000","message":"I think the TODO can be removed. Verifying that the service runs only once should be done externally (and now with systemd, it really shouldn\u0027t be a problem). It definitely shouldn\u0027t be done from within the model code.","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e4e203e91b2fa1136cce9b734012b4a270508e8a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.id \u003d generate_service_id(self.chassis, self.binary)"},{"line_number":48,"context_line":"        # TODO(oanson) Verify it doesn\u0027t exist"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def refresh_last_seen(self):"},{"line_number":51,"context_line":"        \"\"\"Refresh the timestamp in the last_seen_up field to now\"\"\""},{"line_number":52,"context_line":"        self.last_seen_up \u003d time.time()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def alive(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1f013ff3_bd5b5b52","line":52,"range":{"start_line":50,"start_character":0,"end_line":52,"end_character":39},"updated":"2017-05-17 09:21:22.000000000","message":"Have it been used elsewhere? If not, why not put this one line statement to line 79?","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"3a5bee5def8772713eeebf521fe0a5bbdb0ea4d9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        self.id \u003d generate_service_id(self.chassis, self.binary)"},{"line_number":48,"context_line":"        # TODO(oanson) Verify it doesn\u0027t exist"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def refresh_last_seen(self):"},{"line_number":51,"context_line":"        \"\"\"Refresh the timestamp in the last_seen_up field to now\"\"\""},{"line_number":52,"context_line":"        self.last_seen_up \u003d time.time()"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def alive(self):"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff0f0b1f_6088e670","line":52,"range":{"start_line":50,"start_character":0,"end_line":52,"end_character":39},"in_reply_to":"1f013ff3_bd5b5b52","updated":"2017-05-17 12:05:10.000000000","message":"Separating it into its own function has its advantages, e.g. separation of responsibilities. The action itself is an action on the instance. The class methods are more like helper methods, where this is the main action. If we want to change the implementation later, we have a single well defined location where it can be done, rather than reading through code that also extracts the model from the DB.\n\nI would like to keep it this way. Is this explanation convincing?","commit_id":"08b746f5103fa82b192aea3a0aa86599037f1d44"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"65f612a70836fd8dbf47419c13ca6e8defd80417","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def refresh_last_seen(self):"},{"line_number":50,"context_line":"        \"\"\"Refresh the timestamp in the last_seen_up field to now\"\"\""},{"line_number":51,"context_line":"        self.last_seen_up \u003d time.time()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @property"},{"line_number":54,"context_line":"    def alive(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ff0f0b1f_9c2fd7f5","line":51,"updated":"2017-05-17 20:51:10.000000000","message":"good enough","commit_id":"07c98d4fe4784cc015cc26cb4da4d35f5ead4c4a"}],"dragonflow/db/neutron/lockedobjects_db.py":[{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f02de09eb596ef49fdbdf748cc9c937404566f0a","unresolved":false,"context_lines":[{"line_number":48,"context_line":"RESOURCE_FIP_UPDATE_OR_DELETE \u003d 7"},{"line_number":49,"context_line":"RESOURCE_ROUTER_UPDATE_OR_DELETE \u003d 8"},{"line_number":50,"context_line":"RESOURCE_QOS \u003d 9"},{"line_number":51,"context_line":"SERVICE_STATUS \u003d 10"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_70198522","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":14},"updated":"2017-01-09 13:43:50.000000000","message":"Please rename to RESOURCE_SERVICE_STATUS, so it will look the same as the other constants.","commit_id":"8024b62bcec0647deacdf086e6ac38da33f7f08d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"f02de09eb596ef49fdbdf748cc9c937404566f0a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    elif RESOURCE_ML2_SECURITY_GROUP_RULE_DELETE \u003d\u003d resource_type:"},{"line_number":118,"context_line":"        lock_id \u003d args[1][\u0027security_group_id\u0027]"},{"line_number":119,"context_line":"    elif RESOURCE_QOS \u003d\u003d resource_type:"},{"line_number":120,"context_line":"        lock_id \u003d args[0][2][\u0027id\u0027]"},{"line_number":121,"context_line":"    else:"},{"line_number":122,"context_line":"        raise df_exc.UnknownResourceException(resource_type\u003dresource_type)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_50f561c9","line":120,"updated":"2017-01-09 13:43:50.000000000","message":"I think you need to add a case for SERVICE_STATUS here:\nelif SERVICE_STATUS \u003d\u003d resource_type:\n    lock_id \u003d ...","commit_id":"8024b62bcec0647deacdf086e6ac38da33f7f08d"},{"author":{"_account_id":20229,"name":"Omer Anson","email":"omer.anson@toganetworks.com","username":"oanson"},"change_message_id":"126c0b88582f1ce87f2d46d760d0bb796d35bf69","unresolved":false,"context_lines":[{"line_number":119,"context_line":"    elif RESOURCE_QOS \u003d\u003d resource_type:"},{"line_number":120,"context_line":"        lock_id \u003d args[0][2][\u0027id\u0027]"},{"line_number":121,"context_line":"    elif RESOURCE_SERVICE_STATUS \u003d\u003d resource_type:"},{"line_number":122,"context_line":"        lock_id \u003d args[0][1]"},{"line_number":123,"context_line":"    else:"},{"line_number":124,"context_line":"        raise df_exc.UnknownResourceException(resource_type\u003dresource_type)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a461143_3d01db06","line":122,"updated":"2017-01-31 04:15:16.000000000","message":"Maybe here use: uuid.uuid5(uuid.NAMESPACE_DNS, args[0][1]) to make sure the object has the correct length/structure?","commit_id":"7afec0f8c8c38721c4449c1342e58b4551058d14"}]}
