)]}'
{"octavia/amphorae/backends/agent/agent_jinja_cfg.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"             \u0027use_upstart\u0027: CONF.haproxy_amphora.use_upstart,"},{"line_number":59,"context_line":"             \u0027respawn_count\u0027: CONF.haproxy_amphora.respawn_count,"},{"line_number":60,"context_line":"             \u0027respawn_interval\u0027: CONF.haproxy_amphora.respawn_interval,"},{"line_number":61,"context_line":"             \u0027topology\u0027: CONF.controller_worker.loadbalancer_topology})"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_2f4bc8b1","line":61,"updated":"2016-03-17 01:32:27.000000000","message":"Should this come from the database via a repository call using the amphora_id or passed in?","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"480bb08ae4eb2733aa2bef68c6747897f1f83797","unresolved":false,"context_lines":[{"line_number":58,"context_line":"             \u0027use_upstart\u0027: CONF.haproxy_amphora.use_upstart,"},{"line_number":59,"context_line":"             \u0027respawn_count\u0027: CONF.haproxy_amphora.respawn_count,"},{"line_number":60,"context_line":"             \u0027respawn_interval\u0027: CONF.haproxy_amphora.respawn_interval,"},{"line_number":61,"context_line":"             \u0027topology\u0027: CONF.controller_worker.loadbalancer_topology})"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_e9e6d2ae","line":61,"in_reply_to":"1af94dfe_2f4bc8b1","updated":"2016-03-17 17:54:05.000000000","message":"Is it fine to make an repository call in here?","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e9e6c65f47eda251a84c9a79df2d6b24b0180eee","unresolved":false,"context_lines":[{"line_number":58,"context_line":"             \u0027use_upstart\u0027: CONF.haproxy_amphora.use_upstart,"},{"line_number":59,"context_line":"             \u0027respawn_count\u0027: CONF.haproxy_amphora.respawn_count,"},{"line_number":60,"context_line":"             \u0027respawn_interval\u0027: CONF.haproxy_amphora.respawn_interval,"},{"line_number":61,"context_line":"             \u0027topology\u0027: CONF.controller_worker.loadbalancer_topology})"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_8ba3beb1","line":61,"in_reply_to":"1af94dfe_e9e6d2ae","updated":"2016-03-17 19:42:11.000000000","message":"Yes.  I understand your concern though.  With it under backends it seems like it is running inside the amp, but it\u0027s not.","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"}],"octavia/amphorae/backends/agent/api_server/amphora_info.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"def upload_agent_config():"},{"line_number":173,"context_line":"    try:"},{"line_number":174,"context_line":"        stream \u003d listener.Wrapped(flask.request.stream)"},{"line_number":175,"context_line":"        conf_file \u003d \u0027/etc/octavia/amphora-agent.conf\u0027"},{"line_number":176,"context_line":"        with open(conf_file, \u0027w\u0027) as f:"},{"line_number":177,"context_line":"            b \u003d stream.read(BUFFER)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_f447f51a","line":174,"updated":"2016-03-17 01:32:27.000000000","message":"There is no need to use Wrapped here as it is used for generating an ETag header.  Since this is not an endpoint that would be polled, I don\u0027t think there is value in adding an ETag header here.  You can just use flask.request.stream","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":172,"context_line":"def upload_agent_config():"},{"line_number":173,"context_line":"    try:"},{"line_number":174,"context_line":"        stream \u003d listener.Wrapped(flask.request.stream)"},{"line_number":175,"context_line":"        conf_file \u003d \u0027/etc/octavia/amphora-agent.conf\u0027"},{"line_number":176,"context_line":"        with open(conf_file, \u0027w\u0027) as f:"},{"line_number":177,"context_line":"            b \u003d stream.read(BUFFER)"},{"line_number":178,"context_line":"            while b:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_b42a8d2a","line":175,"range":{"start_line":175,"start_character":20,"end_line":175,"end_character":53},"updated":"2016-03-17 01:32:27.000000000","message":"Let\u0027s at least put this in octavia/common/constants.py","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    try:"},{"line_number":174,"context_line":"        stream \u003d listener.Wrapped(flask.request.stream)"},{"line_number":175,"context_line":"        conf_file \u003d \u0027/etc/octavia/amphora-agent.conf\u0027"},{"line_number":176,"context_line":"        with open(conf_file, \u0027w\u0027) as f:"},{"line_number":177,"context_line":"            b \u003d stream.read(BUFFER)"},{"line_number":178,"context_line":"            while b:"},{"line_number":179,"context_line":"                f.write(b)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_74be45d5","line":176,"updated":"2016-03-17 01:32:27.000000000","message":"We need to handle the file permissions here in case the file does not exist for some reason.\nSee this page: https://security.openstack.org/guidelines/dg_apply-restrictive-file-permissions.html","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"def get_topology_info():"},{"line_number":191,"context_line":"    with open(\u0027/etc/octavia/amphora-agent.conf\u0027, \u0027r\u0027) as agent_cfg_file:"},{"line_number":192,"context_line":"        content \u003d agent_cfg_file.read()"},{"line_number":193,"context_line":"    if consts.TOPOLOGY_SINGLE in content:"},{"line_number":194,"context_line":"        return consts.TOPOLOGY_SINGLE"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_b4af2d93","line":191,"updated":"2016-03-17 01:32:27.000000000","message":"We should use oslo_config to access the conf file.\nCONF \u003d cfg.CONF\nCONF.import_group(\u0027haproxy_amphora\u0027, \u0027octavia.common.config\u0027)","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    elif consts.TOPOLOGY_ACTIVE_STANDBY in content:"},{"line_number":196,"context_line":"        return consts.TOPOLOGY_ACTIVE_STANDBY"},{"line_number":197,"context_line":"    else:"},{"line_number":198,"context_line":"        return \u0027UNKNOWN\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_d4ff5965","line":198,"updated":"2016-03-17 01:32:27.000000000","message":"This should be in constants.py","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"f4fbe00416d9352d43ec5d7af9b3fc7eb6670637","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"def upload_agent_config():"},{"line_number":176,"context_line":"    try:"},{"line_number":177,"context_line":"        stream \u003d flask.request.stream"},{"line_number":178,"context_line":"        flags \u003d os.O_WRONLY | os.O_CREAT | os.O_EXCL"},{"line_number":179,"context_line":"        if os.path.isfile(consts.AGENT_CONF_FILE):"},{"line_number":180,"context_line":"            f \u003d open(consts.AGENT_CONF_FILE, \u0027w\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa0719c6_f1a215ad","line":177,"range":{"start_line":177,"start_character":8,"end_line":177,"end_character":14},"updated":"2016-03-23 22:04:26.000000000","message":"any thoughts on how can we validate this data?","commit_id":"02b6bd9bf01354d5ffabfda898e4c89e71096981"},{"author":{"_account_id":10477,"name":"min wang","email":"swiftwangster@gmail.com","username":"minwang"},"change_message_id":"100069d68bb7fdf268953ec15b33d7118a957f3b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"        if os.path.isfile(consts.AGENT_CONF_FILE):"},{"line_number":180,"context_line":"            f \u003d os.open(consts.AGENT_CONF_FILE, \u0027w\u0027)"},{"line_number":181,"context_line":"        else:"},{"line_number":182,"context_line":"            f \u003d os.fdopen(os.open(consts.AGENT_CONF_FILE, flags, 0o600), \u0027w\u0027)"},{"line_number":183,"context_line":"        b \u003d stream.read(BUFFER)"},{"line_number":184,"context_line":"        while b:"},{"line_number":185,"context_line":"            f.write(b)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_aebe28fd","line":182,"range":{"start_line":182,"start_character":65,"end_line":182,"end_character":70},"updated":"2016-03-28 19:53:46.000000000","message":"instead of using hard coded value, you can use something like this:\n\nmode \u003d stat.S_IRUSR | stat.S_IWUSR\nos.fdopen(os.open(consts.AGENT_CONF_FILE, flags, mode), \u0027w\u0027)","commit_id":"06b644146fe8c674b2bd0c21523455441d75c3b7"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"3eda4879a0197019fbb7facb7b562bb1a6cf7dd2","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                                   \"for IP address\")), 404)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"def upload_agent_config():"},{"line_number":177,"context_line":"    try:"},{"line_number":178,"context_line":"        stream \u003d flask.request.stream"},{"line_number":179,"context_line":"        flags \u003d os.O_WRONLY | os.O_CREAT | os.O_EXCL"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_01712576","line":176,"updated":"2016-03-31 20:42:16.000000000","message":"consider moving that into it\u0027s own agent file since it\u0027s not clear to me what this has to do with amphora_info.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d52083779e095109d4c6ca15630d46a40a8cc1b9","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                                   \"for IP address\")), 404)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"def upload_agent_config():"},{"line_number":177,"context_line":"    try:"},{"line_number":178,"context_line":"        stream \u003d flask.request.stream"},{"line_number":179,"context_line":"        flags \u003d os.O_WRONLY | os.O_CREAT | os.O_EXCL"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_ae6656ea","line":176,"in_reply_to":"ba0121b8_01712576","updated":"2016-04-01 07:13:29.000000000","message":"ll do it in the next patch.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"}],"octavia/amphorae/backends/agent/api_server/server.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return amphora_info.get_interface(ip_addr)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"@app.route(\u0027/\u0027 + api_server.VERSION + \u0027/uploadagentconfig\u0027, methods\u003d[\u0027PUT\u0027])"},{"line_number":160,"context_line":"def upload_agent_config():"},{"line_number":161,"context_line":"    return amphora_info.upload_agent_config()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_cf7d0470","line":159,"updated":"2016-03-17 01:32:27.000000000","message":"\"upload\" here is redundant with the PUT method.\nmaybe just: \u0027/agentconfig\u0027?","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"3eda4879a0197019fbb7facb7b562bb1a6cf7dd2","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return amphora_info.get_interface(ip_addr)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"@app.route(\u0027/\u0027 + api_server.VERSION + \u0027/agentconfig\u0027, methods\u003d[\u0027PUT\u0027])"},{"line_number":160,"context_line":"def upload_agent_config():"},{"line_number":161,"context_line":"    return amphora_info.upload_agent_config()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_818ed52b","line":159,"updated":"2016-03-31 20:42:16.000000000","message":"This needs to be added to the REST spec and docs (haproxy-amphora-api.rst)","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"2cc96174c0f0e4b0c1c13c72ec123b7f5cbcab73","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return amphora_info.get_interface(ip_addr)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"@app.route(\u0027/\u0027 + api_server.VERSION + \u0027/agentconfig\u0027, methods\u003d[\u0027PUT\u0027])"},{"line_number":160,"context_line":"def upload_agent_config():"},{"line_number":161,"context_line":"    return amphora_info.upload_agent_config()"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a061dce_f80aff88","line":159,"in_reply_to":"ba0121b8_2ea1a6f8","updated":"2016-04-07 01:24:53.000000000","message":"should I add it in version0.5 or version1 ?","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d52083779e095109d4c6ca15630d46a40a8cc1b9","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    return amphora_info.get_interface(ip_addr)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"@app.route(\u0027/\u0027 + api_server.VERSION + \u0027/agentconfig\u0027, methods\u003d[\u0027PUT\u0027])"},{"line_number":160,"context_line":"def upload_agent_config():"},{"line_number":161,"context_line":"    return amphora_info.upload_agent_config()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_2ea1a6f8","line":159,"in_reply_to":"ba0121b8_818ed52b","updated":"2016-04-01 07:13:29.000000000","message":"ok.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"}],"octavia/amphorae/backends/agent/templates/amphora_agent_conf.template":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#}"},{"line_number":15,"context_line":"[DEFAULT]"},{"line_number":16,"context_line":"debug \u003d {{ debug }}"},{"line_number":17,"context_line":"topology \u003d {{topology}}"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"[haproxy_amphora]"},{"line_number":20,"context_line":"base_cert_dir \u003d {{ base_cert_dir }}"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"1af94dfe_b4860d11","line":17,"updated":"2016-03-17 01:32:27.000000000","message":"Can we move this to the [haproxy_amphora] or [amphora_agent] section?","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"}],"octavia/amphorae/drivers/driver_base.py":[{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"23e323f7481eedf59f996c8aaad8cba0fbb3c618","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        pass"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def upload_agent_config(self, amp, agent_cfg_data):"},{"line_number":203,"context_line":"        pass"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_a2930e5a","line":202,"updated":"2016-03-01 09:37:20.000000000","message":"Docstring and param descriptions missing","commit_id":"c5fcee15c790dcc8701d332fac3edfc08f15ff17"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"3eda4879a0197019fbb7facb7b562bb1a6cf7dd2","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        pass"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def upload_agent_config(self, loadbalancer):"},{"line_number":203,"context_line":"        \"\"\"upload agent config to amphora"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_c19bad64","line":202,"updated":"2016-03-31 20:42:16.000000000","message":"this needs to be added to the amphora-driver-interface.rst -- but it\u0027s gotten a bit stale so this is just a recommendation","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d52083779e095109d4c6ca15630d46a40a8cc1b9","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        \"\"\""},{"line_number":200,"context_line":"        pass"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def upload_agent_config(self, loadbalancer):"},{"line_number":203,"context_line":"        \"\"\"upload agent config to amphora"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_0eb9422e","line":202,"in_reply_to":"ba0121b8_c19bad64","updated":"2016-04-01 07:13:29.000000000","message":"noted.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"}],"octavia/amphorae/drivers/haproxy/rest_api_driver.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":342,"context_line":"            return r.json()"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def upload_agent_config(self, amp, agent_config_data):"},{"line_number":345,"context_line":"        r \u003d self.put(amp, \u0027uploadagentconfig\u0027, data\u003dagent_config_data)"},{"line_number":346,"context_line":"        return exc.check_exception(r)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_ef1c4015","line":345,"range":{"start_line":345,"start_character":27,"end_line":345,"end_character":44},"updated":"2016-03-17 01:32:27.000000000","message":"agentconfig","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"}],"octavia/controller/worker/flows/amphora_flows.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        return rotated_amphora_flow"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def get_upload_agent_config_subflow(self):"},{"line_number":435,"context_line":"        upload_agent_config_subflow \u003d linear_flow.Flow("},{"line_number":436,"context_line":"            constants.UPLOAD_AGENT_CONFIG_SUBFLOW)"},{"line_number":437,"context_line":"        upload_agent_config_subflow.add(amphora_driver_tasks.UploadAgentConfig("}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_4ff3b4d6","line":434,"updated":"2016-03-17 01:32:27.000000000","message":"I don\u0027t think we need a subflow for one task.  Couldn\u0027t we just put the task in the above flow?","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"3eda4879a0197019fbb7facb7b562bb1a6cf7dd2","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        failover_amphora_flow.add(database_tasks.GetVipFromLoadbalancer("},{"line_number":341,"context_line":"            requires\u003dconstants.LOADBALANCER, provides\u003dconstants.VIP))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":344,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.ListenersUpdate("}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_01012538","line":343,"updated":"2016-03-31 20:42:16.000000000","message":"In the failover we should know the topology so why can\u0027t we push that config through the config-drive?","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"ed5836b66a089f4dd8f7e593bb43a8527f9f9520","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        failover_amphora_flow.add(database_tasks.GetVipFromLoadbalancer("},{"line_number":341,"context_line":"            requires\u003dconstants.LOADBALANCER, provides\u003dconstants.VIP))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":344,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.ListenersUpdate("}],"source_content_type":"text/x-python","patch_set":23,"id":"9a061dce_22f2149b","line":343,"in_reply_to":"9a061dce_38b9177a","updated":"2016-04-08 17:31:39.000000000","message":"and also it considers the case where failover uses a amp from spare pool.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d52083779e095109d4c6ca15630d46a40a8cc1b9","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        failover_amphora_flow.add(database_tasks.GetVipFromLoadbalancer("},{"line_number":341,"context_line":"            requires\u003dconstants.LOADBALANCER, provides\u003dconstants.VIP))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":344,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.ListenersUpdate("}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_cecd8a67","line":343,"in_reply_to":"ba0121b8_01012538","updated":"2016-04-01 07:13:29.000000000","message":"can we have some discussion about this. will ping to tom.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"2cc96174c0f0e4b0c1c13c72ec123b7f5cbcab73","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        failover_amphora_flow.add(database_tasks.GetVipFromLoadbalancer("},{"line_number":341,"context_line":"            requires\u003dconstants.LOADBALANCER, provides\u003dconstants.VIP))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":344,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        failover_amphora_flow.add(amphora_driver_tasks.ListenersUpdate("}],"source_content_type":"text/x-python","patch_set":23,"id":"9a061dce_38b9177a","line":343,"in_reply_to":"ba0121b8_cecd8a67","updated":"2016-04-07 01:24:53.000000000","message":"it\u0027s the change in here or we need to pass the load balancer id to the build config function to fetch its topology from db.","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"}],"octavia/controller/worker/flows/load_balancer_flows.py":[{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"23e323f7481eedf59f996c8aaad8cba0fbb3c618","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                requires\u003dconstants.LOADBALANCER_ID,"},{"line_number":124,"context_line":"                provides\u003dconstants.LOADBALANCER))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        upload_agent_config \u003d self.get_upload_agent_config_subflow()"},{"line_number":127,"context_line":"        post_create_LB_flow.add(upload_agent_config)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        new_LB_net_subflow \u003d self.get_new_LB_networking_subflow()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aed3d3a_628586cd","line":126,"range":{"start_line":126,"start_character":8,"end_line":126,"end_character":27},"updated":"2016-03-01 09:37:20.000000000","message":"Would suggest renaming to \"upload_agent_config_subflow\"","commit_id":"c5fcee15c790dcc8701d332fac3edfc08f15ff17"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return update_LB_flow"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"    def get_upload_agent_config_subflow(self):"},{"line_number":287,"context_line":"        upload_agent_config_subflow \u003d linear_flow.Flow("},{"line_number":288,"context_line":"            constants.UPLOAD_AGENT_CONFIG_SUBFLOW)"},{"line_number":289,"context_line":"        upload_agent_config_subflow.add(amphora_driver_tasks.UploadAgentConfig("}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_0fcc0c69","line":286,"updated":"2016-03-17 01:32:27.000000000","message":"Same here, no need for a subflow that just has one task.","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"3eda4879a0197019fbb7facb7b562bb1a6cf7dd2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                requires\u003dconstants.LOADBALANCER_ID,"},{"line_number":124,"context_line":"                provides\u003dconstants.LOADBALANCER))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        post_create_LB_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":127,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        new_LB_net_subflow \u003d self.get_new_LB_networking_subflow()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_2162690a","line":126,"updated":"2016-03-31 20:42:16.000000000","message":"I doubt that works since I didn\u0027t see where you restart the agent to pick up that new config. I also didn\u0027t see you changing cmd/agent.py to add it to the files the agent monitors and when they change does a restart","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d52083779e095109d4c6ca15630d46a40a8cc1b9","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                requires\u003dconstants.LOADBALANCER_ID,"},{"line_number":124,"context_line":"                provides\u003dconstants.LOADBALANCER))"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        post_create_LB_flow.add(amphora_driver_tasks.UploadAgentConfig("},{"line_number":127,"context_line":"            requires\u003dconstants.LOADBALANCER))"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        new_LB_net_subflow \u003d self.get_new_LB_networking_subflow()"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba0121b8_0ebe62fe","line":126,"in_reply_to":"ba0121b8_2162690a","updated":"2016-04-01 07:13:29.000000000","message":"ll update the cmd/agent.py. I had the same doubt. thanks for this review. when I was testing it out I was seeing the updated value in the config file .","commit_id":"857a0a5c853fb4a003eeebabb966a9152c520cfe"}],"octavia/controller/worker/tasks/amphora_driver_tasks.py":[{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"02cc90505542d6c3c741ceeac7b64eaa967611ed","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from taskflow import task"},{"line_number":22,"context_line":"from taskflow.types import failure"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from octavia.amphorae.backends.agent import agent_jinja_cfg"},{"line_number":25,"context_line":"from octavia.common import constants"},{"line_number":26,"context_line":"from octavia.db import api as db_apis"},{"line_number":27,"context_line":"from octavia.db import repositories as repo"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_2d0af0d2","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":59},"updated":"2016-03-16 03:35:33.000000000","message":"So, there\u0027s essentially no reason the controller worker amphora tasks should be rendering configs from templates. This is something that should pretty-much only ever happen within the driver.","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"61f0cf86baf277b07cc08a32eeab04d8bc4dc4c0","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from taskflow import task"},{"line_number":22,"context_line":"from taskflow.types import failure"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from octavia.amphorae.backends.agent import agent_jinja_cfg"},{"line_number":25,"context_line":"from octavia.common import constants"},{"line_number":26,"context_line":"from octavia.db import api as db_apis"},{"line_number":27,"context_line":"from octavia.db import repositories as repo"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_7d73d815","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":59},"in_reply_to":"1af94dfe_2d0af0d2","updated":"2016-03-16 18:16:36.000000000","message":"as johnsom suggested, according to the design we are building the configs in the controller and then pushing it to the amps, so thought this place might be a good place to do the same.","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"ccc61f0027a35a51995d4ab47a69e7f1c91c0eb5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from taskflow import task"},{"line_number":22,"context_line":"from taskflow.types import failure"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from octavia.amphorae.backends.agent import agent_jinja_cfg"},{"line_number":25,"context_line":"from octavia.common import constants"},{"line_number":26,"context_line":"from octavia.db import api as db_apis"},{"line_number":27,"context_line":"from octavia.db import repositories as repo"}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_4000b0aa","line":24,"range":{"start_line":24,"start_character":0,"end_line":24,"end_character":59},"in_reply_to":"1af94dfe_7d73d815","updated":"2016-03-16 19:53:46.000000000","message":"Just asked johnsom in channel and he agrees that rendering should happen in the driver. I think when he talked with you before, he probably meant config rendering should happen \"in the controller\" as opposed to \"on the amphora.\" In this usage, \"in the controller\" doesn\u0027t necessarily mean in the controller worker.","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"02cc90505542d6c3c741ceeac7b64eaa967611ed","unresolved":false,"context_lines":[{"line_number":300,"context_line":"class UploadAgentConfig(BaseAmphoraTask):"},{"line_number":301,"context_line":"    def execute(self, loadbalancer):"},{"line_number":302,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":303,"context_line":"            agent_cfg \u003d agent_jinja_cfg.AgentJinjaTemplater()"},{"line_number":304,"context_line":"            agent_cfg_data \u003d agent_cfg.build_agent_config(amp.id)"},{"line_number":305,"context_line":"            self.amphora_driver.upload_agent_config(amp, agent_cfg_data)"},{"line_number":306,"context_line":"            LOG.debug(\"Marked the topology of loadbalancer %s amphorae\","}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_adda8076","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":61},"updated":"2016-03-16 03:35:33.000000000","message":"The config you\u0027re building here is very haproxy-specific. As such, rendering this should happen within the haproxy driver. (Instead of passing the rendered config to the driver, just pass whatever information is necessary to render this in the driver, and do the rendering there. I\u0027m thinking it will be one tiny bit of data: The \"topology.\" Everything else the driver should be able to figure out itself.)\n\nIn fact, instead of calling this task \u0027UploadAgentConfig\u0027 I\u0027d recommend calling it something like \u0027SetAmphoraTopology\u0027 (the driver can then do the \u0027uploadagentconfig\u0027 as you have there since that is *how* it sets the topology on the amphora-- but from the perspective of the controller worker, it doesn\u0027t have to care as much exactly how the topology gets set, only that it *does* get set.)","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"61f0cf86baf277b07cc08a32eeab04d8bc4dc4c0","unresolved":false,"context_lines":[{"line_number":300,"context_line":"class UploadAgentConfig(BaseAmphoraTask):"},{"line_number":301,"context_line":"    def execute(self, loadbalancer):"},{"line_number":302,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":303,"context_line":"            agent_cfg \u003d agent_jinja_cfg.AgentJinjaTemplater()"},{"line_number":304,"context_line":"            agent_cfg_data \u003d agent_cfg.build_agent_config(amp.id)"},{"line_number":305,"context_line":"            self.amphora_driver.upload_agent_config(amp, agent_cfg_data)"},{"line_number":306,"context_line":"            LOG.debug(\"Marked the topology of loadbalancer %s amphorae\","}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_ddc78c10","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":61},"in_reply_to":"1af94dfe_0da0d49e","updated":"2016-03-16 18:16:36.000000000","message":"so it okay ?","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"4f00b5f78d583052e9a80a79cd08d73f68d47d76","unresolved":false,"context_lines":[{"line_number":300,"context_line":"class UploadAgentConfig(BaseAmphoraTask):"},{"line_number":301,"context_line":"    def execute(self, loadbalancer):"},{"line_number":302,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":303,"context_line":"            agent_cfg \u003d agent_jinja_cfg.AgentJinjaTemplater()"},{"line_number":304,"context_line":"            agent_cfg_data \u003d agent_cfg.build_agent_config(amp.id)"},{"line_number":305,"context_line":"            self.amphora_driver.upload_agent_config(amp, agent_cfg_data)"},{"line_number":306,"context_line":"            LOG.debug(\"Marked the topology of loadbalancer %s amphorae\","}],"source_content_type":"text/x-python","patch_set":8,"id":"1af94dfe_0da0d49e","line":303,"range":{"start_line":303,"start_character":0,"end_line":303,"end_character":61},"in_reply_to":"1af94dfe_adda8076","updated":"2016-03-16 03:37:12.000000000","message":"Er... that is to say the config you\u0027re rendering here is \u0027haproxy amphora\u0027 specific. Other drivers that vendors add later are unlikely to use the same agent, let alone the same agent config.","commit_id":"907cb45e04fe61f0323c6eca12d0618eb777fce5"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        if lb:"},{"line_number":303,"context_line":"            topology_from_db \u003d lb.topology"},{"line_number":304,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":305,"context_line":"            agent_cfg \u003d agent_jinja_cfg.AgentJinjaTemplater()"},{"line_number":306,"context_line":"            agent_cfg_data \u003d agent_cfg.build_agent_config(amp.id)"},{"line_number":307,"context_line":"            if topology_from_db:"},{"line_number":308,"context_line":"                # TODO(bana_k): Come up something better than this."}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_8f7adcef","line":305,"updated":"2016-03-17 01:32:27.000000000","message":"I agree with sbalukoff, let\u0027s move the config generation into the amphora_driver.upload_agent_config method so that this task can just be about calling the upload_agent_config method.","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"704e598c211befa026474d98de6082f962de3eb1","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            agent_cfg_data \u003d agent_cfg.build_agent_config(amp.id)"},{"line_number":307,"context_line":"            if topology_from_db:"},{"line_number":308,"context_line":"                # TODO(bana_k): Come up something better than this."},{"line_number":309,"context_line":"                up_agent_cfg_data \u003d agent_cfg_data.replace("},{"line_number":310,"context_line":"                    constants.TOPOLOGY_SINGLE, topology_from_db)"},{"line_number":311,"context_line":"                up_agent_cfg_data \u003d agent_cfg_data.replace("},{"line_number":312,"context_line":"                    constants.TOPOLOGY_ACTIVE_STANDBY, topology_from_db)"}],"source_content_type":"text/x-python","patch_set":10,"id":"1af94dfe_ef69e026","line":309,"updated":"2016-03-17 01:32:27.000000000","message":"This should not be necessary.  The above build_agent_config should have put in the right value for you.","commit_id":"afd83fc79a9c416715963395c0a661481cf74310"}],"octavia/tests/functional/amphorae/backend/agent/api_server/test_server.py":[{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"896b773369203ea12c980eb164bfeda6067d32f3","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"},{"line_number":715,"context_line":"            self.assertEqual(200, rv.status_code)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da0c15f0_78033810","line":712,"updated":"2016-03-24 20:32:43.000000000","message":"You may have to mock os.fdopen() as well","commit_id":"575593820466e4fe171a7b1b1e1ffadb4db33b69"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"53cc2cebc5c74c5eead16778ddb5404bb3e62383","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"},{"line_number":715,"context_line":"            self.assertEqual(200, rv.status_code)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da0c15f0_2d25f7aa","line":712,"in_reply_to":"da0c15f0_5609e530","updated":"2016-03-24 23:47:08.000000000","message":"thanks will try that out.","commit_id":"575593820466e4fe171a7b1b1e1ffadb4db33b69"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"013a70d811cdbddf285ad0ed14357cd7733bfbfc","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"},{"line_number":715,"context_line":"            self.assertEqual(200, rv.status_code)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da0c15f0_d60975df","line":712,"in_reply_to":"da0c15f0_78033810","updated":"2016-03-24 21:02:52.000000000","message":"thanks a lot the tip. But I don\u0027t know why it\u0027s working fine in my local machine.","commit_id":"575593820466e4fe171a7b1b1e1ffadb4db33b69"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"944257fb1d6723863d1870ca894c9112c22e5cc2","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"},{"line_number":715,"context_line":"            self.assertEqual(200, rv.status_code)"}],"source_content_type":"text/x-python","patch_set":16,"id":"da0c15f0_5609e530","line":712,"in_reply_to":"da0c15f0_d60975df","updated":"2016-03-24 21:20:05.000000000","message":"I had a similar experience in the past. On the local machine, running \"tox -e py27\" returned a \"success\" however when I ran just the particular test case but not the whole, it resulted in \"failure\". \n\nNo clue why though. I am not a tox/testr expert. :-)","commit_id":"575593820466e4fe171a7b1b1e1ffadb4db33b69"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"5ae804fbbec9b749bcac070d7419dcb68d1079fb","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        mock_exists.return_value \u003d True"},{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch(\u0027os.fdopen\u0027):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da0c15f0_61c7f845","line":711,"updated":"2016-03-25 03:02:32.000000000","message":"Using the below worked on my machine.\n\nimport os\n....\n....\nmock.patch.object(os, \u0027fdopen\u0027, m)","commit_id":"d54ca605d443a2c98cb21abfaa819c5975737dac"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"d68cbb676ff164ad99368cd9bd5c18db28edb47f","unresolved":false,"context_lines":[{"line_number":708,"context_line":"        mock_exists.return_value \u003d True"},{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch(\u0027os.fdopen\u0027):"},{"line_number":712,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":713,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":714,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da0c15f0_bc2017f9","line":711,"in_reply_to":"da0c15f0_61c7f845","updated":"2016-03-25 04:05:03.000000000","message":"thank you Bharath, will  give it a try.","commit_id":"d54ca605d443a2c98cb21abfaa819c5975737dac"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"f2eaf4c8140bea1e53c8cb302cd93816b4f4dc5b","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        # Agent config file exits"},{"line_number":708,"context_line":"        mock_exists.return_value \u003d True"},{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_b33a05cc","line":710,"range":{"start_line":710,"start_character":8,"end_line":710,"end_character":17},"updated":"2016-03-25 05:35:29.000000000","message":"hmm.. it\u0027s good practice to import modules at the beginning. Sorry if my previous comment was confusing..","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"af1f5e43b37710ad82abee1389d22def2b6fff33","unresolved":false,"context_lines":[{"line_number":707,"context_line":"        # Agent config file exits"},{"line_number":708,"context_line":"        mock_exists.return_value \u003d True"},{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_3218941d","line":710,"range":{"start_line":710,"start_character":8,"end_line":710,"end_character":17},"in_reply_to":"da0c15f0_b33a05cc","updated":"2016-03-25 17:22:48.000000000","message":"Done","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"f2eaf4c8140bea1e53c8cb302cd93816b4f4dc5b","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":714,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":715,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_933ee1b6","line":712,"range":{"start_line":712,"start_character":13,"end_line":712,"end_character":51},"updated":"2016-03-25 05:35:29.000000000","message":"Pep 8 errors with line length.\n\nAlso, using \u0027builtins\u0027 causing errors as I pointed before. Use, either \n\nmock.patch.object(os, \u0027open\u0027, m)\n\nOR\n\nmock.patch(\u0027os.open\u0027)","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"fc8ff9bc870b8d041bbb2897c7d123559116d1e6","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":714,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":715,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_cf124a62","line":712,"range":{"start_line":712,"start_character":13,"end_line":712,"end_character":51},"in_reply_to":"da0c15f0_2cc67467","updated":"2016-03-25 19:32:45.000000000","message":"thanks a lot, it looks like it worked.","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"},{"author":{"_account_id":17419,"name":"Banashankar k","email":"banveerad@gmail.com","username":"banveerad"},"change_message_id":"af1f5e43b37710ad82abee1389d22def2b6fff33","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":714,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":715,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_f2e45c0e","line":712,"range":{"start_line":712,"start_character":13,"end_line":712,"end_character":51},"in_reply_to":"da0c15f0_933ee1b6","updated":"2016-03-25 17:22:48.000000000","message":"will fix the pep8.\nActually if you see the above code, they are using builtins (in test_upload_keepalived_config function), so thought it might not be the prob.","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"},{"author":{"_account_id":15226,"name":"Bharath M","email":"bharath.stacker@gmail.com","username":"bharath"},"change_message_id":"5a14618fc63c3c5b23b17ab5856a95ff7f493357","unresolved":false,"context_lines":[{"line_number":709,"context_line":"        m \u003d mock.mock_open()"},{"line_number":710,"context_line":"        import os"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":"        with mock.patch.object(builtins, \u0027open\u0027, m), mock.patch.object(os, \u0027fdopen\u0027, m):"},{"line_number":713,"context_line":"            rv \u003d self.app.put(\u0027/\u0027 + api_server.VERSION +"},{"line_number":714,"context_line":"                              \u0027/agentconfig\u0027,"},{"line_number":715,"context_line":"                              data\u003d\u0027test\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da0c15f0_2cc67467","line":712,"range":{"start_line":712,"start_character":13,"end_line":712,"end_character":51},"in_reply_to":"da0c15f0_f2e45c0e","updated":"2016-03-25 18:52:50.000000000","message":"Yeah I just noticed why it was failing. \n\nYou use os.open() in your amphora_info.py. \n\nos.open() !\u003d open() \n\nthe later is a builtin method. Builtin open would be suffice for normal usage. If you update it there, then patching \"(builtins, \u0027open\u0027, m)\" here would work.","commit_id":"02d0243b6f8e78fcf736ff8d897e50807ff26d64"}]}
