)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":22998,"name":"XueFengLiu","email":"liu.xuefeng1@zte.com.cn","username":"sgfeng"},"change_message_id":"8cee2d2d68890c4dece493b7949eb1df21ea6f8a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a prep work needed for Id99948aec64656a0532afc68e146f0610bff1378"},{"line_number":10,"context_line":"which comes to Fix the amphora-agent support for RH based Linux flavors."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This is a pure refactor. functions were gathered under classes (making"},{"line_number":13,"context_line":"them methods) so state, such as the operating system flavor, can be preserved"},{"line_number":14,"context_line":"throughout the entire amphora agent process lifecycle."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3ac371cc_61ef11b1","line":12,"range":{"start_line":12,"start_character":23,"end_line":12,"end_character":24},"updated":"2016-08-14 15:49:57.000000000","message":"extra dot?","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"ddefde5ef007a59a519171d24122faa3707a729a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a prep work needed for Id99948aec64656a0532afc68e146f0610bff1378"},{"line_number":10,"context_line":"which comes to Fix the amphora-agent support for RH based Linux flavors."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This is a pure refactor. functions were gathered under classes (making"},{"line_number":13,"context_line":"them methods) so state, such as the operating system flavor, can be preserved"},{"line_number":14,"context_line":"throughout the entire amphora agent process lifecycle."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3ac371cc_522e8fa5","line":12,"range":{"start_line":12,"start_character":23,"end_line":12,"end_character":24},"in_reply_to":"3ac371cc_61ef11b1","updated":"2016-08-17 13:01:47.000000000","message":"Nop.","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"}],"octavia/amphorae/backends/agent/api_server/listener.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"a551639f5846d7942f2e566f024655659ae0fffc","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def get_haproxy_config(self, listener_id):"},{"line_number":74,"context_line":"        \"\"\"Gets the haproxy config"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        :param listenerid: the id of the listener"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        self._check_listener_exists(listener_id)"},{"line_number":79,"context_line":"        with open(util.config_path(listener_id), \u0027r\u0027) as file:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_8ace6781","line":76,"updated":"2016-08-03 14:00:19.000000000","message":"listener_id","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"32f0792599446dea10d9d24f29a9281f2020cc03","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def get_haproxy_config(self, listener_id):"},{"line_number":74,"context_line":"        \"\"\"Gets the haproxy config"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        :param listenerid: the id of the listener"},{"line_number":77,"context_line":"        \"\"\""},{"line_number":78,"context_line":"        self._check_listener_exists(listener_id)"},{"line_number":79,"context_line":"        with open(util.config_path(listener_id), \u0027r\u0027) as file:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_feb022ff","line":76,"in_reply_to":"bacf61ea_8ace6781","updated":"2016-08-05 07:10:42.000000000","message":"Done, good catch!","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"a551639f5846d7942f2e566f024655659ae0fffc","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if not os.path.exists(util.haproxy_dir(listener_id)):"},{"line_number":96,"context_line":"            os.makedirs(util.haproxy_dir(listener_id))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        name \u003d os.path.join(util.haproxy_dir(listener_id), \u0027haproxy.cfg.new\u0027)"},{"line_number":99,"context_line":"        flags \u003d os.O_WRONLY | os.O_CREAT | os.O_TRUNC"},{"line_number":100,"context_line":"        # mode 00600"},{"line_number":101,"context_line":"        mode \u003d stat.S_IRUSR | stat.S_IWUSR"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_6ac97379","line":98,"updated":"2016-08-03 14:00:19.000000000","message":"Better is to use temp file to that","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"32f0792599446dea10d9d24f29a9281f2020cc03","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        if not os.path.exists(util.haproxy_dir(listener_id)):"},{"line_number":96,"context_line":"            os.makedirs(util.haproxy_dir(listener_id))"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        name \u003d os.path.join(util.haproxy_dir(listener_id), \u0027haproxy.cfg.new\u0027)"},{"line_number":99,"context_line":"        flags \u003d os.O_WRONLY | os.O_CREAT | os.O_TRUNC"},{"line_number":100,"context_line":"        # mode 00600"},{"line_number":101,"context_line":"        mode \u003d stat.S_IRUSR | stat.S_IWUSR"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_bea18aab","line":98,"in_reply_to":"bacf61ea_6ac97379","updated":"2016-08-05 07:10:42.000000000","message":"Hey Lubosz,\nThe patch is a pure refactor to classes.\nAside from that, the code looks exactly is it is in master currently.\n\nAny other change is out of scope for this patch.","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"a551639f5846d7942f2e566f024655659ae0fffc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"},{"line_number":183,"context_line":"        except subprocess.CalledProcessError as e:"},{"line_number":184,"context_line":"            if \u0027Job is already running\u0027 not in e.output:"},{"line_number":185,"context_line":"                LOG.debug(\"Failed to %(action)s HAProxy service: %(err)s\","},{"line_number":186,"context_line":"                          {\u0027action\u0027: action, \u0027err\u0027: e})"},{"line_number":187,"context_line":"                return flask.make_response(flask.jsonify(dict("}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_cac85f77","line":184,"updated":"2016-08-03 14:00:19.000000000","message":"What if I\u0027m gonna install OS with LANG not english?","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"32f0792599446dea10d9d24f29a9281f2020cc03","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        try:"},{"line_number":182,"context_line":"            subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"},{"line_number":183,"context_line":"        except subprocess.CalledProcessError as e:"},{"line_number":184,"context_line":"            if \u0027Job is already running\u0027 not in e.output:"},{"line_number":185,"context_line":"                LOG.debug(\"Failed to %(action)s HAProxy service: %(err)s\","},{"line_number":186,"context_line":"                          {\u0027action\u0027: action, \u0027err\u0027: e})"},{"line_number":187,"context_line":"                return flask.make_response(flask.jsonify(dict("}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_fe95c231","line":184,"in_reply_to":"bacf61ea_cac85f77","updated":"2016-08-05 07:10:42.000000000","message":"ditto","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"a551639f5846d7942f2e566f024655659ae0fffc","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # check if that haproxy is still running and if stop it"},{"line_number":208,"context_line":"        if os.path.exists(util.pid_path(listener_id)) and os.path.exists("},{"line_number":209,"context_line":"                os.path.join(\u0027/proc\u0027, util.get_haproxy_pid(listener_id))):"},{"line_number":210,"context_line":"            cmd \u003d \"/usr/sbin/service haproxy-{0} stop\".format(listener_id)"},{"line_number":211,"context_line":"            try:"},{"line_number":212,"context_line":"                subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_aac36b56","line":209,"updated":"2016-08-03 14:00:19.000000000","message":"assign to variables - will be easier to read","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"32f0792599446dea10d9d24f29a9281f2020cc03","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"        # check if that haproxy is still running and if stop it"},{"line_number":208,"context_line":"        if os.path.exists(util.pid_path(listener_id)) and os.path.exists("},{"line_number":209,"context_line":"                os.path.join(\u0027/proc\u0027, util.get_haproxy_pid(listener_id))):"},{"line_number":210,"context_line":"            cmd \u003d \"/usr/sbin/service haproxy-{0} stop\".format(listener_id)"},{"line_number":211,"context_line":"            try:"},{"line_number":212,"context_line":"                subprocess.check_output(cmd.split(), stderr\u003dsubprocess.STDOUT)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_de9a7e61","line":209,"in_reply_to":"bacf61ea_aac36b56","updated":"2016-08-05 07:10:42.000000000","message":"ditto","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":22998,"name":"XueFengLiu","email":"liu.xuefeng1@zte.com.cn","username":"sgfeng"},"change_message_id":"8cee2d2d68890c4dece493b7949eb1df21ea6f8a","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        res.headers[\u0027ETag\u0027] \u003d stream.get_md5()"},{"line_number":161,"context_line":"        return res"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def start_stop_listener(self, listener_id, action):"},{"line_number":164,"context_line":"        action \u003d action.lower()"},{"line_number":165,"context_line":"        if action not in [\u0027start\u0027, \u0027stop\u0027, \u0027reload\u0027]:"},{"line_number":166,"context_line":"            return flask.make_response(flask.jsonify(dict("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_21ceb95a","line":163,"range":{"start_line":163,"start_character":34,"end_line":163,"end_character":53},"updated":"2016-08-14 15:49:57.000000000","message":"Add parameter specification?","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"ddefde5ef007a59a519171d24122faa3707a729a","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        res.headers[\u0027ETag\u0027] \u003d stream.get_md5()"},{"line_number":161,"context_line":"        return res"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def start_stop_listener(self, listener_id, action):"},{"line_number":164,"context_line":"        action \u003d action.lower()"},{"line_number":165,"context_line":"        if action not in [\u0027start\u0027, \u0027stop\u0027, \u0027reload\u0027]:"},{"line_number":166,"context_line":"            return flask.make_response(flask.jsonify(dict("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_d8758198","line":163,"range":{"start_line":163,"start_character":34,"end_line":163,"end_character":53},"in_reply_to":"3ac371cc_21ceb95a","updated":"2016-08-17 13:01:47.000000000","message":"Not sure i\u0027m following.\nThis function didn\u0027t change from how it looks in master[1], aside from what needed for it to become a class method.\n\nhttps://github.com/openstack/octavia/blob/b89abe18718964f53b463a723551ce73673ee135/octavia/amphorae/backends/agent/api_server/listener.py#L164","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":22998,"name":"XueFengLiu","email":"liu.xuefeng1@zte.com.cn","username":"sgfeng"},"change_message_id":"ed003962e5c946e7d98db5d97b47e33703db6da0","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        res.headers[\u0027ETag\u0027] \u003d stream.get_md5()"},{"line_number":161,"context_line":"        return res"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def start_stop_listener(self, listener_id, action):"},{"line_number":164,"context_line":"        action \u003d action.lower()"},{"line_number":165,"context_line":"        if action not in [\u0027start\u0027, \u0027stop\u0027, \u0027reload\u0027]:"},{"line_number":166,"context_line":"            return flask.make_response(flask.jsonify(dict("}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_6cd3ef04","line":163,"range":{"start_line":163,"start_character":34,"end_line":163,"end_character":53},"in_reply_to":"3ac371cc_d8758198","updated":"2016-08-17 14:00:00.000000000","message":"OK","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"}],"octavia/amphorae/backends/agent/api_server/plug.py":[{"author":{"_account_id":14591,"name":"Lubosz Kosnik (diltram)","email":"lubosz.kosnik@intel.com","username":"diltram"},"change_message_id":"a551639f5846d7942f2e566f024655659ae0fffc","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            # 1 means just loopback, but we should already have a VIP. This"},{"line_number":134,"context_line":"            # works for the add/delete/add case as we don\u0027t delete interfaces"},{"line_number":135,"context_line":"            # Note, eth0 is skipped because that is the VIP interface"},{"line_number":136,"context_line":"            netns_interface \u003d \u0027eth{0}\u0027.format(len(netns.get_links()))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        LOG.info(_LI(\u0027Plugged interface {0} will become {1} in the \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_2ab77bf6","line":135,"updated":"2016-08-03 14:00:19.000000000","message":"this is","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"32f0792599446dea10d9d24f29a9281f2020cc03","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            # 1 means just loopback, but we should already have a VIP. This"},{"line_number":134,"context_line":"            # works for the add/delete/add case as we don\u0027t delete interfaces"},{"line_number":135,"context_line":"            # Note, eth0 is skipped because that is the VIP interface"},{"line_number":136,"context_line":"            netns_interface \u003d \u0027eth{0}\u0027.format(len(netns.get_links()))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        LOG.info(_LI(\u0027Plugged interface {0} will become {1} in the \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bacf61ea_dedefe3c","line":135,"in_reply_to":"bacf61ea_2ab77bf6","updated":"2016-08-05 07:10:42.000000000","message":"\"this is works\" ?","commit_id":"8a4903e297e470f06b2f01d7d7667f2dd0131256"}],"octavia/amphorae/backends/agent/api_server/server.py":[{"author":{"_account_id":22998,"name":"XueFengLiu","email":"liu.xuefeng1@zte.com.cn","username":"sgfeng"},"change_message_id":"8cee2d2d68890c4dece493b7949eb1df21ea6f8a","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        register_app_error_handler(self.app)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app.add_url_rule(rule\u003d\u0027/\u0027 + api_server.VERSION +"},{"line_number":51,"context_line":"                              \u0027/listeners/\u003camphora_id\u003e/\u003clistener_id\u003e/haproxy\u0027,"},{"line_number":52,"context_line":"                              view_func\u003dself.upload_haproxy_config,"},{"line_number":53,"context_line":"                              methods\u003d[\u0027PUT\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_811a0d16","line":50,"range":{"start_line":50,"start_character":35,"end_line":50,"end_character":59},"updated":"2016-08-14 15:49:57.000000000","message":"Maybe \"\u0027/\u0027 + api_server.VERSION\" can use a variable here, such as path_prefix","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"ddefde5ef007a59a519171d24122faa3707a729a","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        register_app_error_handler(self.app)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app.add_url_rule(rule\u003d\u0027/\u0027 + api_server.VERSION +"},{"line_number":51,"context_line":"                              \u0027/listeners/\u003camphora_id\u003e/\u003clistener_id\u003e/haproxy\u0027,"},{"line_number":52,"context_line":"                              view_func\u003dself.upload_haproxy_config,"},{"line_number":53,"context_line":"                              methods\u003d[\u0027PUT\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_98c66966","line":50,"range":{"start_line":50,"start_character":35,"end_line":50,"end_character":59},"in_reply_to":"3ac371cc_811a0d16","updated":"2016-08-17 13:01:47.000000000","message":"Done","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":22998,"name":"XueFengLiu","email":"liu.xuefeng1@zte.com.cn","username":"sgfeng"},"change_message_id":"ed003962e5c946e7d98db5d97b47e33703db6da0","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        register_app_error_handler(self.app)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app.add_url_rule(rule\u003d\u0027/\u0027 + api_server.VERSION +"},{"line_number":51,"context_line":"                              \u0027/listeners/\u003camphora_id\u003e/\u003clistener_id\u003e/haproxy\u0027,"},{"line_number":52,"context_line":"                              view_func\u003dself.upload_haproxy_config,"},{"line_number":53,"context_line":"                              methods\u003d[\u0027PUT\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"3ac371cc_4c255307","line":50,"range":{"start_line":50,"start_character":35,"end_line":50,"end_character":59},"in_reply_to":"3ac371cc_98c66966","updated":"2016-08-17 14:00:00.000000000","message":"ok","commit_id":"378bac1bd8517793527fe3de1fcf7819101bb7cd"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"410a3309ff92cb915388f42203fb767570a37e36","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.app \u003d flask.Flask(__name__)"},{"line_number":46,"context_line":"        self._keepalived \u003d keepalived.Keepalived()"},{"line_number":47,"context_line":"        self._listener \u003d listener.Listener()"},{"line_number":48,"context_line":"        self._plug \u003d plug.Plug()"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        register_app_error_handler(self.app)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a95cdbc_cb2fb33c","line":48,"updated":"2016-10-05 22:45:45.000000000","message":"I think we should do amphora_info as well.  It has packages as part of it\u0027s specification, so we already have platform specific code in there (dpgk).\nAn argument could be made for util as well since it has the \".cfg\" issue in it.  Though this could be handled in other ways.","commit_id":"12d2a0f01b2dfb16ed919d41c7b2fa41a32e0259"},{"author":{"_account_id":6579,"name":"Nir Magnezi","email":"nmagnezi@redhat.com","username":"nmagnezi"},"change_message_id":"c55d81d00f81f346cae8ff7b34eceede7e12d286","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        self.app \u003d flask.Flask(__name__)"},{"line_number":46,"context_line":"        self._keepalived \u003d keepalived.Keepalived()"},{"line_number":47,"context_line":"        self._listener \u003d listener.Listener()"},{"line_number":48,"context_line":"        self._plug \u003d plug.Plug()"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        register_app_error_handler(self.app)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a95cdbc_99d24ad1","line":48,"in_reply_to":"1a95cdbc_cb2fb33c","updated":"2016-10-06 13:05:50.000000000","message":"Valid point, but wouldn\u0027t it be out of scope for this patch?\nI\u0027ll explain.\nFor simplicity, started this patch as a pure prep refactor, while making \"real\" changes in https://review.openstack.org/#/c/331841/\n\nThat is for:\n1. Reviewers to be able to follow up on this change more easily.\n2. For me not to have too much changes in one patch that i need to rebase twice a week (due to other changes to the project) until it get merged.\n\nBTW I\u0027ll move forward with https://review.openstack.org/#/c/331841/ as soon as we merge the classes refactor patch.","commit_id":"12d2a0f01b2dfb16ed919d41c7b2fa41a32e0259"}]}
