)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b133a42a9e46f371c8c06e8ca9160ab9c80b1009","unresolved":false,"context_lines":[{"line_number":12,"context_line":"a bit less error prone. Also, added improved error handling of connections"},{"line_number":13,"context_line":"to the client and parsing of results."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partial Implements: blueprint agent-driver"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: Kyle Stevenson \u003ckyle@kylestevenson.me\u003e"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_98a804dd","line":15,"updated":"2014-09-10 00:51:43.000000000","message":"This blueprint is already marked as implemented, please don\u0027t mark this as partially implemented.\n\nCan you remove this line? If we want to require this to be associated with a bug, you can file one about the issues resolved and mark this as \"Closes-bug: \" on that bug? \n\nI personally am OK with the improvements without a bug indicated here.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b4886eb5949cdfcfe870f45c49e275125af152a4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"a bit less error prone. Also, added improved error handling of connections"},{"line_number":13,"context_line":"to the client and parsing of results."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partial Implements: blueprint agent-driver"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: Kyle Stevenson \u003ckyle@kylestevenson.me\u003e"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_98e420e1","line":15,"in_reply_to":"fa98f980_8cc5f85d","updated":"2014-09-12 21:42:12.000000000","message":"Done","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fcb712201faec554db8b86bb786b22d6be1e13ab","unresolved":false,"context_lines":[{"line_number":12,"context_line":"a bit less error prone. Also, added improved error handling of connections"},{"line_number":13,"context_line":"to the client and parsing of results."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partial Implements: blueprint agent-driver"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Co-Authored-By: Kyle Stevenson \u003ckyle@kylestevenson.me\u003e"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa98f980_8cc5f85d","line":15,"in_reply_to":"fa98f980_98a804dd","updated":"2014-09-11 09:13:31.000000000","message":"+1\n\nThe bug would be nice because we are on RC period, so in theory we should be merging things that are fixing the bugs targeting RC","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"}],"ironic/common/exception.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b133a42a9e46f371c8c06e8ca9160ab9c80b1009","unresolved":false,"context_lines":[{"line_number":479,"context_line":""},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"class AgentClientUnexpectedHTTPException(AgentClientException):"},{"line_number":482,"context_line":"    message \u003d _(\"The agent client received unexpected HTTP while contacting \""},{"line_number":483,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_f8b8302c","line":482,"updated":"2014-09-10 00:51:43.000000000","message":"unexpected HTTP what?","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fcb712201faec554db8b86bb786b22d6be1e13ab","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":487,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":488,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":489,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_2c9c0c5d","line":486,"updated":"2014-09-11 09:13:31.000000000","message":"class AgentClientJSONException(AgentClientException):\n     message \u003d _(\"blah blah\")\n     code \u003d 400  # Bad Request\n\n\n\n\nThis should return 400 (Bad Request)[1] (By default IronicException returns 500)\n\n[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html\n\n10.4.1 400 Bad Request\n\nThe request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b4886eb5949cdfcfe870f45c49e275125af152a4","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":484,"context_line":""},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":487,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":488,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":489,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_c3987477","line":486,"in_reply_to":"fa98f980_2c9c0c5d","updated":"2014-09-12 21:42:12.000000000","message":"Done","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":442,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":443,"context_line":"    code \u003d 400"},{"line_number":444,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":445,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"class AgentClientConnectionException(AgentClientException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_df6f8b90","line":445,"updated":"2014-10-15 19:04:29.000000000","message":"Does this mean the malformed JSON was from the agent, or does it mean the malformed JSON was from the \u0027user\u0027 that invoked the client?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":442,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":443,"context_line":"    code \u003d 400"},{"line_number":444,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":445,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"class AgentClientConnectionException(AgentClientException):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_8c793f31","line":445,"in_reply_to":"baa201ad_df6f8b90","updated":"2014-10-16 18:51:13.000000000","message":"This is only if the agent returns invalid JSON. If invalid JSON is sent to the node, it\u0027ll fall in AgentClientUnexpectedHTTPCodeException above (what a name) or raise a JSON exception when building the JSON in the requests library.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"38add43d0c87099fe00f62f4c0aff4c247c45501","unresolved":false,"context_lines":[{"line_number":442,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":443,"context_line":"    code \u003d 400"},{"line_number":444,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":445,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"class AgentClientConnectionException(AgentClientException):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_d57ae3b8","line":445,"updated":"2014-10-17 00:34:59.000000000","message":"How about \u0027The agent client received malformed JSON in the response from the agent, for node ...\u0027.  \n\nThe \u0027while contacting\u0027 part made me wonder where the json was coming from.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"76316dab84de9978c4a1c7b14b56fdbf0bc9045e","unresolved":false,"context_lines":[{"line_number":442,"context_line":"class AgentClientJSONException(AgentClientException):"},{"line_number":443,"context_line":"    code \u003d 400"},{"line_number":444,"context_line":"    message \u003d _(\"The agent client received malformed JSON while contacting \""},{"line_number":445,"context_line":"                \"the agent for node %(node)s\")"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"class AgentClientConnectionException(AgentClientException):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_81716fe2","line":445,"in_reply_to":"baa201ad_d57ae3b8","updated":"2014-11-13 22:13:51.000000000","message":"Done","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"}],"ironic/drivers/modules/agent.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b7bb4cdc433a98a06550fde29201872ca08422d0","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        if not command:"},{"line_number":453,"context_line":"            return False"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"        if command.status \u003d\u003d \u0027FAILED\u0027:"},{"line_number":456,"context_line":"            return command.results"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    def _reboot_to_instance(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7562e616","line":455,"updated":"2014-08-04 16:20:20.000000000","message":"command_results() returns a list.","commit_id":"59f531dba35fca0390544ec3d4d5ebf74a58e129"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b133a42a9e46f371c8c06e8ca9160ab9c80b1009","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    def _check_deploy_success(self, node):"},{"line_number":443,"context_line":"        # should only ever be called after we\u0027ve validated that"},{"line_number":444,"context_line":"        # the prepare_image command is complete"},{"line_number":445,"context_line":"        command \u003d self._client.command_results(node, \u0027preparing\u0027)"},{"line_number":446,"context_line":"        if not command:"},{"line_number":447,"context_line":"            return \u0027no command result\u0027"},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_583a1c99","line":445,"updated":"2014-09-10 00:51:43.000000000","message":"We probably shouldn\u0027t hardcode this string. \n\n_check_command_success(self, node, command_to_check) is maybe a better signature for this function, which would then possibly be a good fit for the agent client library.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b4886eb5949cdfcfe870f45c49e275125af152a4","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    def _check_deploy_success(self, node):"},{"line_number":443,"context_line":"        # should only ever be called after we\u0027ve validated that"},{"line_number":444,"context_line":"        # the prepare_image command is complete"},{"line_number":445,"context_line":"        command \u003d self._client.command_results(node, \u0027preparing\u0027)"},{"line_number":446,"context_line":"        if not command:"},{"line_number":447,"context_line":"            return \u0027no command result\u0027"},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_7a10514e","line":445,"in_reply_to":"fa98f980_583a1c99","updated":"2014-09-12 21:42:12.000000000","message":"I removed the method and opted to use the CommandResult attributes instead.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fcb712201faec554db8b86bb786b22d6be1e13ab","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        # the prepare_image command is complete"},{"line_number":445,"context_line":"        command \u003d self._client.command_results(node, \u0027preparing\u0027)"},{"line_number":446,"context_line":"        if not command:"},{"line_number":447,"context_line":"            return \u0027no command result\u0027"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        if command.status \u003d\u003d \u0027FAILED\u0027:"},{"line_number":450,"context_line":"            return command.error"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_4cf9507f","line":447,"updated":"2014-09-11 09:13:31.000000000","message":"I\u0027m not expert in IPA code but returning a string like that looks odd (no i18n as well).\n\nI know None is being used to success, but IMHO I think that None for no result and True for success looks a bit better","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b4886eb5949cdfcfe870f45c49e275125af152a4","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        # the prepare_image command is complete"},{"line_number":445,"context_line":"        command \u003d self._client.command_results(node, \u0027preparing\u0027)"},{"line_number":446,"context_line":"        if not command:"},{"line_number":447,"context_line":"            return \u0027no command result\u0027"},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"        if command.status \u003d\u003d \u0027FAILED\u0027:"},{"line_number":450,"context_line":"            return command.error"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_23fdc06e","line":447,"in_reply_to":"fa98f980_4cf9507f","updated":"2014-09-12 21:42:12.000000000","message":"I basically factored this method out and used the handy class attributes in CommandResult to determine the same thing.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        if results[-1].error:"},{"line_number":472,"context_line":"            # TODO(jimrollenhagen) power off if using neutron dhcp to"},{"line_number":473,"context_line":"            #                      align with pxe driver?"},{"line_number":474,"context_line":"            msg \u003d (_(\u0027node %(node)s command status errored: %(error)s\u0027) %"},{"line_number":475,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027error\u0027: results[-1].error})"},{"line_number":476,"context_line":"            LOG.error(msg)"},{"line_number":477,"context_line":"            _set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_058d447c","line":474,"updated":"2014-10-15 19:04:29.000000000","message":"not sure if \u0027errored\u0027 should be \u0027error\u0027.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        if results[-1].error:"},{"line_number":472,"context_line":"            # TODO(jimrollenhagen) power off if using neutron dhcp to"},{"line_number":473,"context_line":"            #                      align with pxe driver?"},{"line_number":474,"context_line":"            msg \u003d (_(\u0027node %(node)s command status errored: %(error)s\u0027) %"},{"line_number":475,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027error\u0027: results[-1].error})"},{"line_number":476,"context_line":"            LOG.error(msg)"},{"line_number":477,"context_line":"            _set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_6ccc1b6b","line":474,"in_reply_to":"baa201ad_058d447c","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"1bedf5d80b9039143d58d49304e725cc99b6e8de","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        node \u003d task.node"},{"line_number":399,"context_line":"        LOG.debug(\u0027Preparing to reboot to instance for node %s\u0027,"},{"line_number":400,"context_line":"                  node.uuid)"},{"line_number":401,"context_line":"        results \u003d self._client.command_results(node, \u0027prepare_image\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not results:"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027node %s did not return any results for prepare_image\u0027) %"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_feb7c6d5","line":401,"updated":"2015-01-07 19:10:55.000000000","message":"I\u0027m pretty sure that here (and maybe other places) this is triggering an extra roundtrip to the agent that isn\u0027t needed.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                  node.uuid)"},{"line_number":401,"context_line":"        results \u003d self._client.command_results(node, \u0027prepare_image\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not results:"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027node %s did not return any results for prepare_image\u0027) %"},{"line_number":405,"context_line":"                   node.uuid)"},{"line_number":406,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_d2592bfe","line":403,"updated":"2015-01-07 12:58:54.000000000","message":"Isn\u0027t this block of  \"if not results\" redundant ? I see the same thing done in agent_client.deploy_is_done().  If results were not available, we wouldn\u0027t have considered that deploy was done and I guess we wouldn\u0027t have been here.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":400,"context_line":"                  node.uuid)"},{"line_number":401,"context_line":"        results \u003d self._client.command_results(node, \u0027prepare_image\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not results:"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027node %s did not return any results for prepare_image\u0027) %"},{"line_number":405,"context_line":"                   node.uuid)"},{"line_number":406,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_bb4630be","line":403,"in_reply_to":"3a961159_d2592bfe","updated":"2015-01-07 19:10:27.000000000","message":"Good catch.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        results \u003d self._client.command_results(node, \u0027prepare_image\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not results:"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027node %s did not return any results for prepare_image\u0027) %"},{"line_number":405,"context_line":"                   node.uuid)"},{"line_number":406,"context_line":"            LOG.error(msg)"},{"line_number":407,"context_line":"            deploy_utils.set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_0892a656","line":404,"updated":"2015-01-07 12:58:54.000000000","message":"_LE","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        results \u003d self._client.command_results(node, \u0027prepare_image\u0027)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not results:"},{"line_number":404,"context_line":"            msg \u003d (_(\u0027node %s did not return any results for prepare_image\u0027) %"},{"line_number":405,"context_line":"                   node.uuid)"},{"line_number":406,"context_line":"            LOG.error(msg)"},{"line_number":407,"context_line":"            deploy_utils.set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_5b5b8c85","line":404,"in_reply_to":"3a961159_0892a656","updated":"2015-01-07 19:10:27.000000000","message":"No, because the same variable is being used in an exception and a log message. http://docs.openstack.org/developer/oslo.i18n/guidelines.html#examples","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if results[-1].error:"},{"line_number":411,"context_line":"            # TODO(jimrollenhagen) power off if using neutron dhcp to"},{"line_number":412,"context_line":"            #                      align with pxe driver?"},{"line_number":413,"context_line":"            msg \u003d (_(\u0027node %(node)s command status error: %(error)s\u0027) %"},{"line_number":414,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027error\u0027: results[-1].error})"},{"line_number":415,"context_line":"            LOG.error(msg)"},{"line_number":416,"context_line":"            deploy_utils.set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_289be273","line":413,"updated":"2015-01-07 12:58:54.000000000","message":"_LE","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":410,"context_line":"        if results[-1].error:"},{"line_number":411,"context_line":"            # TODO(jimrollenhagen) power off if using neutron dhcp to"},{"line_number":412,"context_line":"            #                      align with pxe driver?"},{"line_number":413,"context_line":"            msg \u003d (_(\u0027node %(node)s command status error: %(error)s\u0027) %"},{"line_number":414,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027error\u0027: results[-1].error})"},{"line_number":415,"context_line":"            LOG.error(msg)"},{"line_number":416,"context_line":"            deploy_utils.set_failed_state(task, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_9b50945f","line":413,"in_reply_to":"3a961159_289be273","updated":"2015-01-07 19:10:27.000000000","message":"See above.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":352,"context_line":"        node.save()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        # Async call backs don\u0027t set error state on their own"},{"line_number":355,"context_line":"        # TODO(jimrollenhagen) improve error messages here"},{"line_number":356,"context_line":"        msg \u003d _(\u0027Failed checking if deploy is done.\u0027)"},{"line_number":357,"context_line":"        try:"},{"line_number":358,"context_line":"            if node.provision_state \u003d\u003d states.DEPLOYWAIT:"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_1bd4a445","line":355,"updated":"2015-01-16 02:34:42.000000000","message":"I guess this TODO is being taken care now :)","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"}],"ironic/drivers/modules/agent_client.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b7bb4cdc433a98a06550fde29201872ca08422d0","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                 \"agent_url\" as a key in driver_info"},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        if \u0027agent_url\u0027 not in node.driver_info:"},{"line_number":49,"context_line":"            raise exception.IronicException(_("},{"line_number":50,"context_line":"                \u0027Node %s requires \"agent_url\" as a key in driver_info\u0027) %"},{"line_number":51,"context_line":"                node.uuid)"},{"line_number":52,"context_line":"        return (\u0027%(agent_url)s/%(api_version)s/commands\u0027 %"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_2034aedd","line":49,"updated":"2014-08-04 16:20:20.000000000","message":"Please raise InvalidParameterValue or MissingParameterValue here.","commit_id":"59f531dba35fca0390544ec3d4d5ebf74a58e129"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fcb712201faec554db8b86bb786b22d6be1e13ab","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    results \u003d None"},{"line_number":173,"context_line":"    error \u003d None"},{"line_number":174,"context_line":"    running \u003d False"},{"line_number":175,"context_line":"    status \u003d None"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def __init__(self, command, command_name\u003dNone):"},{"line_number":178,"context_line":"        \"\"\"A synchronous or asynchronous command result from the"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_ecc204e8","line":175,"updated":"2014-09-11 09:13:31.000000000","message":"Is those class attributes needed? I don\u0027t see this class being accessed like CommandResult.results","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b4886eb5949cdfcfe870f45c49e275125af152a4","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    results \u003d None"},{"line_number":173,"context_line":"    error \u003d None"},{"line_number":174,"context_line":"    running \u003d False"},{"line_number":175,"context_line":"    status \u003d None"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def __init__(self, command, command_name\u003dNone):"},{"line_number":178,"context_line":"        \"\"\"A synchronous or asynchronous command result from the"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa98f980_980fc038","line":175,"in_reply_to":"fa98f980_ecc204e8","updated":"2014-09-12 21:42:12.000000000","message":"Oh wow. Definitely not.","commit_id":"15d61141276ab9d2eebed806ee3f14301412d06a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"\"\"Build a URL for the node\u0027s agent API"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param node: The node to contact"},{"line_number":45,"context_line":"        :raises: exception.IronicException if the node doesn\u0027t have"},{"line_number":46,"context_line":"                 \"agent_url\" as a key in driver_info"},{"line_number":47,"context_line":"        :returns: A URL for the node\u0027s agent API"},{"line_number":48,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_dfc78b43","line":45,"updated":"2014-10-15 19:04:29.000000000","message":"IronicException -\u003e more specifically \u0027InvalidParameterValue\u0027","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        \"\"\"Build a URL for the node\u0027s agent API"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param node: The node to contact"},{"line_number":45,"context_line":"        :raises: exception.IronicException if the node doesn\u0027t have"},{"line_number":46,"context_line":"                 \"agent_url\" as a key in driver_info"},{"line_number":47,"context_line":"        :returns: A URL for the node\u0027s agent API"},{"line_number":48,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_61cc246b","line":45,"in_reply_to":"baa201ad_dfc78b43","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"53680bbc75d01c8f842324641821bc0d78f930f9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :returns: A URL for the node\u0027s agent API"},{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        if \u0027agent_url\u0027 not in node.driver_info:"},{"line_number":50,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":51,"context_line":"                \u0027Node %s requires \"agent_url\" as a key in driver_info\u0027) %"},{"line_number":52,"context_line":"                node.uuid)"},{"line_number":53,"context_line":"        return (\u0027%(agent_url)s/%(api_version)s/commands\u0027 %"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_a4c70197","line":50,"updated":"2014-10-16 15:22:54.000000000","message":"Now I see that exception.MissingParameterValue should be here for consistency with other code. Sorry for ambiguity in my past comment.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :returns: A URL for the node\u0027s agent API"},{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        if \u0027agent_url\u0027 not in node.driver_info:"},{"line_number":50,"context_line":"            raise exception.InvalidParameterValue(_("},{"line_number":51,"context_line":"                \u0027Node %s requires \"agent_url\" as a key in driver_info\u0027) %"},{"line_number":52,"context_line":"                node.uuid)"},{"line_number":53,"context_line":"        return (\u0027%(agent_url)s/%(api_version)s/commands\u0027 %"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_81a02891","line":50,"in_reply_to":"baa201ad_a4c70197","updated":"2014-10-16 18:51:13.000000000","message":"No worries. Done.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def _get_command_body(self, method, params):"},{"line_number":58,"context_line":"        \"\"\"Creates the POST body for an Agent command"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param method: The Agent method to run"},{"line_number":61,"context_line":"        :param params: The parameters to send to the command. Required"},{"line_number":62,"context_line":"                       params are determined by the method"},{"line_number":63,"context_line":"        :returns: A JSON representation of the command body"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_1fd593e4","line":60,"updated":"2014-10-15 19:04:29.000000000","message":"I\u0027m guessing this is a string?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def _get_command_body(self, method, params):"},{"line_number":58,"context_line":"        \"\"\"Creates the POST body for an Agent command"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param method: The Agent method to run"},{"line_number":61,"context_line":"        :param params: The parameters to send to the command. Required"},{"line_number":62,"context_line":"                       params are determined by the method"},{"line_number":63,"context_line":"        :returns: A JSON representation of the command body"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_41000066","line":60,"in_reply_to":"baa201ad_1fd593e4","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"\"\"Creates the POST body for an Agent command"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param method: The Agent method to run"},{"line_number":61,"context_line":"        :param params: The parameters to send to the command. Required"},{"line_number":62,"context_line":"                       params are determined by the method"},{"line_number":63,"context_line":"        :returns: A JSON representation of the command body"},{"line_number":64,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_bfd1e7fc","line":61,"updated":"2014-10-15 19:04:29.000000000","message":"is this a list? a dictionary? depends?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        \"\"\"Creates the POST body for an Agent command"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :param method: The Agent method to run"},{"line_number":61,"context_line":"        :param params: The parameters to send to the command. Required"},{"line_number":62,"context_line":"                       params are determined by the method"},{"line_number":63,"context_line":"        :returns: A JSON representation of the command body"},{"line_number":64,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_21fdbc6e","line":61,"in_reply_to":"baa201ad_bfd1e7fc","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                 unexpected HTTP code in its response"},{"line_number":77,"context_line":"        :raises: AgentClientJSONException if the command result cannot be"},{"line_number":78,"context_line":"                 decoded or the Content-Type is not application/json"},{"line_number":79,"context_line":"        :returns:"},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        url \u003d self._get_command_url(node)"},{"line_number":82,"context_line":"        body \u003d self._get_command_body(method, params)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_ff452fb4","line":79,"updated":"2014-10-15 19:04:29.000000000","message":"doesn\u0027t return anything?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                 unexpected HTTP code in its response"},{"line_number":77,"context_line":"        :raises: AgentClientJSONException if the command result cannot be"},{"line_number":78,"context_line":"                 decoded or the Content-Type is not application/json"},{"line_number":79,"context_line":"        :returns:"},{"line_number":80,"context_line":"        \"\"\""},{"line_number":81,"context_line":"        url \u003d self._get_command_url(node)"},{"line_number":82,"context_line":"        body \u003d self._get_command_body(method, params)"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_010a7889","line":79,"in_reply_to":"baa201ad_ff452fb4","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            raise exception.AgentClientConnectionException(node\u003dnode)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if not 200 \u003c\u003d response.status_code \u003c 300:"},{"line_number":98,"context_line":"            LOG.debug((\u0027Command (%(method)s) returned an unexpected \u0027"},{"line_number":99,"context_line":"                       \u0027HTTP Status Code (%(status_code)s).\u0027),"},{"line_number":100,"context_line":"                      {\u0027status_code\u0027: response.status_code,"},{"line_number":101,"context_line":"                       \u0027method\u0027: method})"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_bf6d6734","line":98,"updated":"2014-10-15 19:04:29.000000000","message":"wondering if it might be useful to log the node \u0026 parameters too.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            raise exception.AgentClientConnectionException(node\u003dnode)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        if not 200 \u003c\u003d response.status_code \u003c 300:"},{"line_number":98,"context_line":"            LOG.debug((\u0027Command (%(method)s) returned an unexpected \u0027"},{"line_number":99,"context_line":"                       \u0027HTTP Status Code (%(status_code)s).\u0027),"},{"line_number":100,"context_line":"                      {\u0027status_code\u0027: response.status_code,"},{"line_number":101,"context_line":"                       \u0027method\u0027: method})"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_e12d74ff","line":98,"in_reply_to":"baa201ad_bf6d6734","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            LOG.debug((\u0027Command (%(method)s) returned an unexpected \u0027"},{"line_number":107,"context_line":"                       \u0027Content-Type header: \"%(content_type)s\".\u0027),"},{"line_number":108,"context_line":"                      {\u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027),"},{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_bf7727d3","line":109,"updated":"2014-10-15 19:04:29.000000000","message":"ditto","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            LOG.debug((\u0027Command (%(method)s) returned an unexpected \u0027"},{"line_number":107,"context_line":"                       \u0027Content-Type header: \"%(content_type)s\".\u0027),"},{"line_number":108,"context_line":"                      {\u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027),"},{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_410e408d","line":109,"in_reply_to":"baa201ad_bf7727d3","updated":"2014-10-16 18:51:13.000000000","message":"Done","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                       \u0027Content-Type header: \"%(content_type)s\".\u0027),"},{"line_number":108,"context_line":"                      {\u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027),"},{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"},{"line_number":113,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_62952632","line":110,"updated":"2014-10-15 19:04:29.000000000","message":"Will the exception message be a bit misleading in this case?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                       \u0027Content-Type header: \"%(content_type)s\".\u0027),"},{"line_number":108,"context_line":"                      {\u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027),"},{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"},{"line_number":113,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_ccd427eb","line":110,"in_reply_to":"baa201ad_62952632","updated":"2014-10-16 18:51:13.000000000","message":"I don\u0027t think so. Both cases are the Agent has an error and is breaking the API contract where they only communicate via JSON. Both should result in a bug filed for IPA with the log messages.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            return response.json()"},{"line_number":115,"context_line":"        except (requests.RequestException, ValueError):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_ff544f23","line":112,"updated":"2014-10-15 19:04:29.000000000","message":"is there more real error handling to be done?","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                       \u0027method\u0027: method})"},{"line_number":110,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(russellhaering): real error handling"},{"line_number":113,"context_line":"        try:"},{"line_number":114,"context_line":"            return response.json()"},{"line_number":115,"context_line":"        except (requests.RequestException, ValueError):"}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_415c807d","line":112,"in_reply_to":"baa201ad_ff544f23","updated":"2014-10-16 18:51:13.000000000","message":"Whoops, nope. This should cover all the errors I can think of.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"66500fea13eb74d85b01fc17400c2683b395cb84","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        if command_name and command.get(\u0027command_name\u0027) !\u003d command_name:"},{"line_number":187,"context_line":"            # catches race condition where prepare_image is still processing"},{"line_number":188,"context_line":"            # so deploy hasn\u0027t started yet"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def is_running(self):"},{"line_number":192,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_429662f1","line":189,"updated":"2014-10-15 19:04:29.000000000","message":"I\u0027m missing something. Whether or not this \"if\" statement is True, you get the same CommandResult object. Is that what you wanted?\n\nI\u0027m also not clear on why the comment is there.","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"bec56d424797892c86df4df503feb917628e1ce8","unresolved":false,"context_lines":[{"line_number":186,"context_line":"        if command_name and command.get(\u0027command_name\u0027) !\u003d command_name:"},{"line_number":187,"context_line":"            # catches race condition where prepare_image is still processing"},{"line_number":188,"context_line":"            # so deploy hasn\u0027t started yet"},{"line_number":189,"context_line":"            return"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def is_running(self):"},{"line_number":192,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baa201ad_c14790a1","line":189,"in_reply_to":"baa201ad_429662f1","updated":"2014-10-16 18:51:13.000000000","message":"Ahh this belongs in the method below it. Thanks!","commit_id":"7821502fe32e0f11290bd29cd019fc1cd09565c8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"38add43d0c87099fe00f62f4c0aff4c247c45501","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        :param method: The Agent method to run as a string in the form"},{"line_number":61,"context_line":"                       \u0027extensions.method\u0027"},{"line_number":62,"context_line":"        :param params: A dict of parameters to send to the command. Required"},{"line_number":63,"context_line":"                       parameters are determined by the agent_client method."},{"line_number":64,"context_line":"        :returns: A JSON representation of the command body"},{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        return jsonutils.dumps({"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_955bfb52","line":63,"updated":"2014-10-17 00:34:59.000000000","message":"by \u0027agent_client method\u0027 -- you mean the agent method above? If so, I\u0027d just use \u0027agent method\u0027.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"76316dab84de9978c4a1c7b14b56fdbf0bc9045e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        :param method: The Agent method to run as a string in the form"},{"line_number":61,"context_line":"                       \u0027extensions.method\u0027"},{"line_number":62,"context_line":"        :param params: A dict of parameters to send to the command. Required"},{"line_number":63,"context_line":"                       parameters are determined by the agent_client method."},{"line_number":64,"context_line":"        :returns: A JSON representation of the command body"},{"line_number":65,"context_line":"        \"\"\""},{"line_number":66,"context_line":"        return jsonutils.dumps({"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_663e2f2a","line":63,"in_reply_to":"baa201ad_955bfb52","updated":"2014-11-13 22:13:51.000000000","message":"Done","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"38add43d0c87099fe00f62f4c0aff4c247c45501","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        try:"},{"line_number":120,"context_line":"            return response.json()"},{"line_number":121,"context_line":"        except (requests.RequestException, ValueError):"},{"line_number":122,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def deploy_is_done(self, node):"},{"line_number":125,"context_line":"        \"\"\"Checks if the deploy is finished."}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9837b2e2","line":122,"updated":"2014-10-17 00:34:59.000000000","message":"I was just wondering when debugging, how you\u0027re going to distinguish this JSONException from the one above, since they both will have the same message. (I\u0027m not sure if it would help if the messages were a bit different.)\n\nYou might want to log something here too, just to be consistent and to provide more info if you need it.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"76316dab84de9978c4a1c7b14b56fdbf0bc9045e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        try:"},{"line_number":120,"context_line":"            return response.json()"},{"line_number":121,"context_line":"        except (requests.RequestException, ValueError):"},{"line_number":122,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def deploy_is_done(self, node):"},{"line_number":125,"context_line":"        \"\"\"Checks if the deploy is finished."}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_cc472b4a","line":122,"in_reply_to":"baa201ad_9837b2e2","updated":"2014-11-13 22:13:51.000000000","message":"I doubt you\u0027d have the correct content-type header and not be able to do response.json(), but odd things do happen! Updated.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"be8a98810cab4205f628ec495d369ef5f09b6351","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param node: The node to get the command results from"},{"line_number":141,"context_line":"        :param command_name: Only returns results for the specified"},{"line_number":142,"context_line":"                             command_name"},{"line_number":143,"context_line":"        :raises: AgentClientJSONException if the command response"},{"line_number":144,"context_line":"                 cannot be decoded"},{"line_number":145,"context_line":"        :returns: A list of CommandResults"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_98ac12ef","line":142,"updated":"2014-10-17 00:40:46.000000000","message":"Hmm. Maybe this is what is confusing me. I don\u0027t see anything in the code here, that eg filters for results for the command_name. Isn\u0027t this GET\u0027ing something from the agent, regardless of command_name?","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"76316dab84de9978c4a1c7b14b56fdbf0bc9045e","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        :param node: The node to get the command results from"},{"line_number":141,"context_line":"        :param command_name: Only returns results for the specified"},{"line_number":142,"context_line":"                             command_name"},{"line_number":143,"context_line":"        :raises: AgentClientJSONException if the command response"},{"line_number":144,"context_line":"                 cannot be decoded"},{"line_number":145,"context_line":"        :returns: A list of CommandResults"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_0cc133e4","line":142,"in_reply_to":"baa201ad_98ac12ef","updated":"2014-11-13 22:13:51.000000000","message":"Uhh, yes. Wow. Fixing and adding tests for filtered and not filtered results.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"38add43d0c87099fe00f62f4c0aff4c247c45501","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""},{"line_number":196,"context_line":"        if self.called_command and self.called_command !\u003d self.command_name:"},{"line_number":197,"context_line":"            # catches race condition where prepare_image is still processing"},{"line_number":198,"context_line":"            # so deploy hasn\u0027t started yet"},{"line_number":199,"context_line":"            return True"},{"line_number":200,"context_line":"        return self.status \u003d\u003d \u0027RUNNING\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_983ed2b6","line":198,"updated":"2014-10-17 00:34:59.000000000","message":"there\u0027s some sort of assumption/logic that I don\u0027t quite get, between called_command and command_name. Because this \u0027if\u0027 is assuming something about those two values.  I guess if it works for you.\n\nYour comment makes it sound like a CommandResult is only used for preparing images \u0026 deploying. Will this \u0027if\u0027 work for other types of agent commands?","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"76316dab84de9978c4a1c7b14b56fdbf0bc9045e","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""},{"line_number":196,"context_line":"        if self.called_command and self.called_command !\u003d self.command_name:"},{"line_number":197,"context_line":"            # catches race condition where prepare_image is still processing"},{"line_number":198,"context_line":"            # so deploy hasn\u0027t started yet"},{"line_number":199,"context_line":"            return True"},{"line_number":200,"context_line":"        return self.status \u003d\u003d \u0027RUNNING\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a890539_ac4f3fbc","line":198,"in_reply_to":"baa201ad_983ed2b6","updated":"2014-11-13 22:13:51.000000000","message":"So this is only a race for the first command in a series that is triggered by a user (prepare_image for deploy in this case), because the agent heartbeats on its own time, and its possible it could heartbeat and trigger the deploy_is_done check before the agent has actually started the prepare_image command. Once we start passing the request id through to IPA, we can get rid of a lot of this hackery.","commit_id":"17fa0cdb6c9a12c449a6bcc16b6fc49725092620"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a0923f27d9e2925181cabd124a48678dc1bb0531","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _send_command(self, node, method, params, wait\u003dFalse):"},{"line_number":73,"context_line":"        \"\"\"Send a command to the agent API"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        :raises: AgentClientConnectionException if there is a problem"},{"line_number":76,"context_line":"                 connecting to the API"},{"line_number":77,"context_line":"        :raises: AgentClientUnexpectedHTTPCodeException if the API returned an"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_31364db5","line":74,"updated":"2015-01-02 11:42:51.000000000","message":"nit: document the parameters as well?","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"cb0810499ddbfd0dfb8b429c0a821d29a183073d","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _send_command(self, node, method, params, wait\u003dFalse):"},{"line_number":73,"context_line":"        \"\"\"Send a command to the agent API"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        :raises: AgentClientConnectionException if there is a problem"},{"line_number":76,"context_line":"                 connecting to the API"},{"line_number":77,"context_line":"        :raises: AgentClientUnexpectedHTTPCodeException if the API returned an"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_b97918fe","line":74,"in_reply_to":"3a961159_31364db5","updated":"2015-01-06 00:01:32.000000000","message":"Done","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a0923f27d9e2925181cabd124a48678dc1bb0531","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                          \u0027Code (%(status_code)s).\u0027),"},{"line_number":103,"context_line":"                      {\u0027method\u0027: method,"},{"line_number":104,"context_line":"                       \u0027params\u0027: params,"},{"line_number":105,"context_line":"                       \u0027node\u0027: node,"},{"line_number":106,"context_line":"                       \u0027status_code\u0027: response.status_code})"},{"line_number":107,"context_line":"            raise exception.AgentClientUnexpectedHTTPCodeException("},{"line_number":108,"context_line":"                node\u003dnode, code\u003dresponse.status_code)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_f1bcc508","line":105,"updated":"2015-01-02 11:42:51.000000000","message":"s/node/node.uuid \n\nI think, otherwise seems it\u0027s going to print the string representation of the object instance","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"cb0810499ddbfd0dfb8b429c0a821d29a183073d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                          \u0027Code (%(status_code)s).\u0027),"},{"line_number":103,"context_line":"                      {\u0027method\u0027: method,"},{"line_number":104,"context_line":"                       \u0027params\u0027: params,"},{"line_number":105,"context_line":"                       \u0027node\u0027: node,"},{"line_number":106,"context_line":"                       \u0027status_code\u0027: response.status_code})"},{"line_number":107,"context_line":"            raise exception.AgentClientUnexpectedHTTPCodeException("},{"line_number":108,"context_line":"                node\u003dnode, code\u003dresponse.status_code)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_1985ccce","line":105,"in_reply_to":"3a961159_f1bcc508","updated":"2015-01-06 00:01:32.000000000","message":"Done","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7a1d04c2270800426bf4c771a9283211867edb34","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if response.headers.get(\u0027Content-Type\u0027) !\u003d \u0027application/json\u0027:"},{"line_number":111,"context_line":"            msg \u003d _(\u0027Command (%(method)s) with params %(params)s for node \u0027"},{"line_number":112,"context_line":"                        \u0027%(node)s returned an unexpected \u0027"},{"line_number":113,"context_line":"                        \u0027Content-Type header: \"%(content_type)s\".\u0027)"},{"line_number":114,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"},{"line_number":115,"context_line":"                        \u0027params\u0027: params,"},{"line_number":116,"context_line":"                        \u0027node\u0027: node,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_604c859e","line":113,"updated":"2015-01-02 00:06:45.000000000","message":"2014-12-23 15:35:52.925 4830 ERROR ironic.drivers.modules.agent_client [-] Command (standby.prepare_image) with params {\u0027image_info\u0027: {\u0027checksum\u0027: u\u002764d7c1cd2b6f60c92c14662941cb7913\u0027, \u0027disk_format\u0027: u\u0027qcow2\u0027, \u0027id\u0027: u\u00278e558026-a439-47f5-9230-7da16d6b04e1\u0027, \u0027urls\u0027: [u\u0027http://104.130.127.79:8080/v1/AUTH_d9fbe199fcd6473199a6f9e2459a0dc3/glance/8e558026-a439-47f5-9230-7da16d6b04e1?temp_url_sig\u003d6b0f80a71396684897034c65c6d19fc9cb7cc27e\u0026temp_url_expires\u003d1419352331\u0027], \u0027container_format\u0027: u\u0027bare\u0027}} for node \u003cironic.objects.node.Node object at 0x7f5f4a377810\u003e returned an unexpected Content-Type header: \"application/json; charset\u003dUTF-8\".\n\nThis is what is currently breaking agent_ssh tempest, I think the check on Line 110 needs to be less strict in order to allow charset, but IMBW.","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"a0923f27d9e2925181cabd124a48678dc1bb0531","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if response.headers.get(\u0027Content-Type\u0027) !\u003d \u0027application/json\u0027:"},{"line_number":111,"context_line":"            msg \u003d _(\u0027Command (%(method)s) with params %(params)s for node \u0027"},{"line_number":112,"context_line":"                        \u0027%(node)s returned an unexpected \u0027"},{"line_number":113,"context_line":"                        \u0027Content-Type header: \"%(content_type)s\".\u0027)"},{"line_number":114,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"},{"line_number":115,"context_line":"                        \u0027params\u0027: params,"},{"line_number":116,"context_line":"                        \u0027node\u0027: node,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_71dc5547","line":113,"in_reply_to":"3a961159_604c859e","updated":"2015-01-02 11:42:51.000000000","message":"+1 perhpas testing if the Content-Type is a string and starts with \u0027application/json\u0027","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"cb0810499ddbfd0dfb8b429c0a821d29a183073d","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        if response.headers.get(\u0027Content-Type\u0027) !\u003d \u0027application/json\u0027:"},{"line_number":111,"context_line":"            msg \u003d _(\u0027Command (%(method)s) with params %(params)s for node \u0027"},{"line_number":112,"context_line":"                        \u0027%(node)s returned an unexpected \u0027"},{"line_number":113,"context_line":"                        \u0027Content-Type header: \"%(content_type)s\".\u0027)"},{"line_number":114,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"},{"line_number":115,"context_line":"                        \u0027params\u0027: params,"},{"line_number":116,"context_line":"                        \u0027node\u0027: node,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a961159_fcc62e9b","line":113,"in_reply_to":"3a961159_71dc5547","updated":"2015-01-06 00:01:32.000000000","message":"Nice, awesome catch.","commit_id":"23c1a58daa378622613625ee56681c725bd888d0"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"a464d711047b0494fae8ad5e45f65f46b41c0836","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        \"\"\"Build a URL for the node\u0027s agent API"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        :param node: The node to contact"},{"line_number":46,"context_line":"        :raises: exception.MissingParameterValue if the node doesn\u0027t have"},{"line_number":47,"context_line":"                 \"agent_url\" as a key in driver_info"},{"line_number":48,"context_line":"        :returns: A URL for the node\u0027s agent API"},{"line_number":49,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_b43ca4e2","line":46,"updated":"2015-01-06 20:00:08.000000000","message":"nit: I\u0027m pretty sure nowhere else do we prepend the exception name in the docstring with the module.","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"03c48cc93234c9bce4347711b418ac1706752521","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            raise exception.AgentClientUnexpectedHTTPCodeException("},{"line_number":116,"context_line":"                node\u003dnode, code\u003dresponse.status_code)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        if \u0027application/json\u0027 not in response.headers.get(\u0027Content-Type\u0027):"},{"line_number":119,"context_line":"            msg \u003d _(\u0027Command (%(method)s) with params %(params)s for node \u0027"},{"line_number":120,"context_line":"                    \u0027%(node)s returned an unexpected \u0027"},{"line_number":121,"context_line":"                    \u0027Content-Type header: \"%(content_type)s\".\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_956a42b3","line":118,"updated":"2015-01-06 19:28:16.000000000","message":"I\u0027m not sure I like this. Is it possible for response.headers.get() to return None? If so, this will raise a TypeError exception.","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"03c48cc93234c9bce4347711b418ac1706752521","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        if \u0027application/json\u0027 not in response.headers.get(\u0027Content-Type\u0027):"},{"line_number":119,"context_line":"            msg \u003d _(\u0027Command (%(method)s) with params %(params)s for node \u0027"},{"line_number":120,"context_line":"                    \u0027%(node)s returned an unexpected \u0027"},{"line_number":121,"context_line":"                    \u0027Content-Type header: \"%(content_type)s\".\u0027)"},{"line_number":122,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"},{"line_number":123,"context_line":"                        \u0027params\u0027: params,"},{"line_number":124,"context_line":"                        \u0027node\u0027: node.uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_b5a65e0d","line":121,"updated":"2015-01-06 19:28:16.000000000","message":"I don\u0027t know if you want this or not, but the method will show up in \u0027(method)\u0027, but the content type will show up in \u0027\"content-type\"\u0027. One is with parentheses and the other double-quotes.","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"a464d711047b0494fae8ad5e45f65f46b41c0836","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                  {\u0027node\u0027: node.uuid, \u0027res\u0027: not commands[-1].is_running()"},{"line_number":167,"context_line":"                   and commands[-1].results})"},{"line_number":168,"context_line":"        # Finished commands are not running and have some results"},{"line_number":169,"context_line":"        return not commands[-1].is_running() and commands[-1].results"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def command_results(self, node, command_name):"},{"line_number":172,"context_line":"        \"\"\"Return a list of CommandResult objects"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_27c7a513","line":169,"updated":"2015-01-06 20:00:08.000000000","message":"As we talked about in meatspace, it\u0027s valid for command results to be None, and this is why tempest is failing.","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"03c48cc93234c9bce4347711b418ac1706752521","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        if command_name:"},{"line_number":199,"context_line":"            results \u003d [CommandResult(command, command_name)"},{"line_number":200,"context_line":"                       for command in commands"},{"line_number":201,"context_line":"                       if command.get(\u0027command_name\u0027) \u003d\u003d command_name]"},{"line_number":202,"context_line":"        else:"},{"line_number":203,"context_line":"            results \u003d [CommandResult(command, command_name)"},{"line_number":204,"context_line":"                       for command in commands]"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_55b61add","line":201,"updated":"2015-01-06 19:28:16.000000000","message":"I suppose you could have also added \u0027or command_name \u003d\u003d None\u0027 and then you wouldn\u0027t need the if/else. \n\nNot sure which is clearer to understand.","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                         data\u003dbody,"},{"line_number":103,"context_line":"                                         headers\u003dheaders)"},{"line_number":104,"context_line":"        except requests.RequestException:"},{"line_number":105,"context_line":"            raise exception.AgentClientConnectionException(node\u003dnode)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not 200 \u003c\u003d response.status_code \u003c 300:"},{"line_number":108,"context_line":"            LOG.error(_LE(\u0027Command \"%(method)s\" with params \"%(params)s\" for \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_52b29b49","line":105,"updated":"2015-01-07 12:58:54.000000000","message":"May be print the requests.RequestException along with this, that might help in debugging the issue from logs.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                         data\u003dbody,"},{"line_number":103,"context_line":"                                         headers\u003dheaders)"},{"line_number":104,"context_line":"        except requests.RequestException:"},{"line_number":105,"context_line":"            raise exception.AgentClientConnectionException(node\u003dnode)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if not 200 \u003c\u003d response.status_code \u003c 300:"},{"line_number":108,"context_line":"            LOG.error(_LE(\u0027Command \"%(method)s\" with params \"%(params)s\" for \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_1bcca434","line":105,"in_reply_to":"3a961159_52b29b49","updated":"2015-01-07 19:10:27.000000000","message":"Done","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                        \u0027params\u0027: params,"},{"line_number":125,"context_line":"                        \u0027node\u0027: node.uuid,"},{"line_number":126,"context_line":"                        \u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027)}"},{"line_number":127,"context_line":"            LOG.exception(msg, msg_args)"},{"line_number":128,"context_line":"            raise exception.AgentClientJSONException(message\u003dmsg % msg_args,"},{"line_number":129,"context_line":"                                                     node\u003dnode)"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_88bbf6c2","line":127,"updated":"2015-01-07 12:58:54.000000000","message":"This is not from exception handler.  So LOG.error() right ? Also _LE","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"                        \u0027params\u0027: params,"},{"line_number":125,"context_line":"                        \u0027node\u0027: node.uuid,"},{"line_number":126,"context_line":"                        \u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027)}"},{"line_number":127,"context_line":"            LOG.exception(msg, msg_args)"},{"line_number":128,"context_line":"            raise exception.AgentClientJSONException(message\u003dmsg % msg_args,"},{"line_number":129,"context_line":"                                                     node\u003dnode)"},{"line_number":130,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_5ba0ec41","line":127,"in_reply_to":"3a961159_88bbf6c2","updated":"2015-01-07 19:10:27.000000000","message":"Done","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"},{"line_number":137,"context_line":"                        \u0027params\u0027: params,"},{"line_number":138,"context_line":"                        \u0027node\u0027: node.uuid}"},{"line_number":139,"context_line":"            LOG.exception(msg, msg_args)"},{"line_number":140,"context_line":"            raise exception.AgentClientJSONException(message\u003dmsg % msg_args,"},{"line_number":141,"context_line":"                                                     node\u003dnode)"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_a8e352d6","line":139,"updated":"2015-01-07 12:58:54.000000000","message":"_LE","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                      node.uuid)"},{"line_number":155,"context_line":"            return False"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if commands[-1].called_command !\u003d \u0027prepare_image\u0027:"},{"line_number":158,"context_line":"            # catches race condition where the node is deploying but"},{"line_number":159,"context_line":"            # prepare_image hasn\u0027t started on the agent yet."},{"line_number":160,"context_line":"            LOG.debug(\u0027Deploy not done for %(node)s, command results returned \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_a3053311","line":157,"updated":"2015-01-07 12:58:54.000000000","message":"Wondering if this if condition will ever be true.\n\nOn line 150, we get all the commands that match prepare_image, and then we check if the last command is prepare_image or not.  Since self.command_results() returns only commands where command_name is \u0027prepare_image\u0027, wondering if this condition works.  I guess we shouldn\u0027t have called the self.command_results() with second argument.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                      node.uuid)"},{"line_number":155,"context_line":"            return False"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if commands[-1].called_command !\u003d \u0027prepare_image\u0027:"},{"line_number":158,"context_line":"            # catches race condition where the node is deploying but"},{"line_number":159,"context_line":"            # prepare_image hasn\u0027t started on the agent yet."},{"line_number":160,"context_line":"            LOG.debug(\u0027Deploy not done for %(node)s, command results returned \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_fb643823","line":157,"in_reply_to":"3a961159_a3053311","updated":"2015-01-07 19:10:27.000000000","message":"I think getting rid of it is better. If this race happens, it\u0027ll be caught by line 151. Nice eye!","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"6d9729d15b211b505ae60fe37354e9224967c1c9","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                  {\u0027node\u0027: node.uuid, \u0027res\u0027: not commands[-1].is_running()"},{"line_number":168,"context_line":"                   and commands[-1].results})"},{"line_number":169,"context_line":"        # Finished commands are not running and have some results"},{"line_number":170,"context_line":"        return commands[-1].is_running() is False"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def command_results(self, node, command_name):"},{"line_number":173,"context_line":"        \"\"\"Return a list of CommandResult objects"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_7d7dbc6c","line":170,"updated":"2015-01-06 20:59:25.000000000","message":"Shouldn\u0027t you be checking command_status at some point? I think we should actually add a test case where prepare_image() fails, to ensure this is handled correctly.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":167,"context_line":"                  {\u0027node\u0027: node.uuid, \u0027res\u0027: not commands[-1].is_running()"},{"line_number":168,"context_line":"                   and commands[-1].results})"},{"line_number":169,"context_line":"        # Finished commands are not running and have some results"},{"line_number":170,"context_line":"        return commands[-1].is_running() is False"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def command_results(self, node, command_name):"},{"line_number":173,"context_line":"        \"\"\"Return a list of CommandResult objects"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_1e52d212","line":170,"in_reply_to":"3a961159_7d7dbc6c","updated":"2015-01-07 19:10:27.000000000","message":"It\u0027s being check in agent.py in _reboot_to_instance, when checking if the command has an error. deploy_is_done() needs to return a boolean and avoid throwing exceptions for the way we have the heartbeat loop, so checking success/failure in the method wouldn\u0027t work. I\u0027m going to change this name to command_is_done, and explicitly check for success in _reboot_to_instance.","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        LOG.debug(\u0027Getting command results for node %s\u0027, node.uuid)"},{"line_number":183,"context_line":"        url \u003d self._get_command_url(node)"},{"line_number":184,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":185,"context_line":"        res \u003d self.session.get(url, headers\u003dheaders)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            commands \u003d res.json().get(\u0027commands\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_08ad4631","line":185,"updated":"2015-01-07 12:58:54.000000000","message":"Don\u0027t we need to protect like self.session.post() above ?","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        LOG.debug(\u0027Getting command results for node %s\u0027, node.uuid)"},{"line_number":183,"context_line":"        url \u003d self._get_command_url(node)"},{"line_number":184,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":185,"context_line":"        res \u003d self.session.get(url, headers\u003dheaders)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        try:"},{"line_number":188,"context_line":"            commands \u003d res.json().get(\u0027commands\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_beee1eeb","line":185,"in_reply_to":"3a961159_08ad4631","updated":"2015-01-07 19:10:27.000000000","message":"Done","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"a1c32c08ffbd6691532ce2b0349358a859364986","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        self.results \u003d command.get(\u0027command_result\u0027)"},{"line_number":247,"context_line":"        self.error \u003d command.get(\u0027command_error\u0027)"},{"line_number":248,"context_line":"        self.command_name \u003d command.get(\u0027command_name\u0027)"},{"line_number":249,"context_line":"        self.called_command \u003d command_name"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def is_running(self):"},{"line_number":252,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_c83c1ee4","line":249,"updated":"2015-01-07 12:58:54.000000000","message":"Why two properties with the same value ?","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        self.results \u003d command.get(\u0027command_result\u0027)"},{"line_number":247,"context_line":"        self.error \u003d command.get(\u0027command_error\u0027)"},{"line_number":248,"context_line":"        self.command_name \u003d command.get(\u0027command_name\u0027)"},{"line_number":249,"context_line":"        self.called_command \u003d command_name"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    def is_running(self):"},{"line_number":252,"context_line":"        \"\"\"Returns True if the command is currently running.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_9ee32204","line":249,"in_reply_to":"3a961159_c83c1ee4","updated":"2015-01-07 19:10:27.000000000","message":"Done","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            return response.json()"},{"line_number":134,"context_line":"        except (requests.RequestException, ValueError):"},{"line_number":135,"context_line":"            msg \u003d _(\u0027Could not parse JSON from response from command \u0027"},{"line_number":136,"context_line":"                    \u0027\"%(method)s\" with params \"%(params)s\" for node %(node)s\u0027)"},{"line_number":137,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_01b3184e","line":134,"updated":"2015-01-09 17:59:39.000000000","message":"Is ValueError required here ?","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                 fails"},{"line_number":152,"context_line":"        :raises: AgentClientJSONException if the command response"},{"line_number":153,"context_line":"                 cannot be decoded"},{"line_number":154,"context_line":"        :returns: A list of CommandResults"},{"line_number":155,"context_line":"        \"\"\""},{"line_number":156,"context_line":"        LOG.debug(\u0027Getting command results for node %s\u0027, node.uuid)"},{"line_number":157,"context_line":"        url \u003d self._get_command_url(node)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_e1b52c33","line":154,"updated":"2015-01-09 17:59:39.000000000","message":"Returns the last CommandResult matching the command name or None.","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        \"\"\"A (a)synchronous command result from the Ironic Python Agent\u0027s API"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        :param command: The JSON returned for a single command from IPA"},{"line_number":223,"context_line":"        :param command_name: Optional, the command name to filter for"},{"line_number":224,"context_line":"        \"\"\""},{"line_number":225,"context_line":"        self.status \u003d command.get(\u0027command_status\u0027)"},{"line_number":226,"context_line":"        self.results \u003d command.get(\u0027command_result\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_2102d4ba","line":223,"updated":"2015-01-09 17:59:39.000000000","message":"I guess this is not there now.","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def is_successful(self):"},{"line_number":235,"context_line":"        \"\"\"Returns True if the command is finished and successful.\"\"\""},{"line_number":236,"context_line":"        return (self.is_running() is False and self.status \u003d\u003d \u0027SUCCEEDED\u0027 and"},{"line_number":237,"context_line":"                self.error is None)"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_41d5201a","line":236,"updated":"2015-01-09 17:59:39.000000000","message":"I guess the below check is redundant because is_running inturn checks if self.status \u003d\u003d \u0027RUNNING\u0027.\nself.is_running() is False and self.status \u003d\u003d \u0027SUCCEEDED\u0027\n\nSo, only self.status \u003d\u003d \u0027SUCCEEDED\u0027 should be enough.","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        if \u0027agent_url\u0027 not in node.driver_info:"},{"line_number":51,"context_line":"            raise exception.MissingParameterValue(_("},{"line_number":52,"context_line":"                \u0027Node %s requires \"agent_url\" as a key in driver_info\u0027) %"},{"line_number":53,"context_line":"                node.uuid)"},{"line_number":54,"context_line":"        return (\u0027%(agent_url)s/%(api_version)s/commands\u0027 %"},{"line_number":55,"context_line":"                {\u0027agent_url\u0027: node.driver_info[\u0027agent_url\u0027],"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_8fc45a41","line":52,"updated":"2015-01-22 11:32:05.000000000","message":"Maybe \u0027Agent driver requires agent_url key in driver_info for node %s\u0027 ?","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                                         headers\u003dheaders)"},{"line_number":104,"context_line":"        except requests.RequestException as e:"},{"line_number":105,"context_line":"            raise exception.AgentClientConnectionException("},{"line_number":106,"context_line":"                node\u003dnode, request_error\u003dstr(e))"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        if not 200 \u003c\u003d response.status_code \u003c 300:"},{"line_number":109,"context_line":"            LOG.error(_LE(\u0027Command \"%(method)s\" with params \"%(params)s\" for \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_ef095e96","line":106,"updated":"2015-01-22 11:32:05.000000000","message":"No need to do str(e), can be just e. And should it be node\u003dnode.uuid?","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                       \u0027node\u0027: node.uuid,"},{"line_number":115,"context_line":"                       \u0027status_code\u0027: response.status_code})"},{"line_number":116,"context_line":"            raise exception.AgentClientUnexpectedHTTPCodeException("},{"line_number":117,"context_line":"                node\u003dnode, code\u003dresponse.status_code)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if (response.headers.get(\u0027Content-Type\u0027) and \u0027application/json\u0027"},{"line_number":120,"context_line":"                not in response.headers[\u0027Content-Type\u0027]):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_af4676bd","line":117,"updated":"2015-01-22 11:32:05.000000000","message":"ditto node.uuid","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":127,"context_line":"                        \u0027content_type\u0027: response.headers.get(\u0027Content-Type\u0027)}"},{"line_number":128,"context_line":"            LOG.error(msg, msg_args)"},{"line_number":129,"context_line":"            raise exception.AgentClientJSONException(message\u003dmsg % msg_args,"},{"line_number":130,"context_line":"                                                     node\u003dnode)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            result \u003d response.json()"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_ef7ebee3","line":130,"updated":"2015-01-22 11:32:05.000000000","message":"ditto node.uuid. Also, if you specify message, do you still need to pass node.uuid?","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        try:"},{"line_number":133,"context_line":"            result \u003d response.json()"},{"line_number":134,"context_line":"        except requests.RequestException:"},{"line_number":135,"context_line":"            msg \u003d _(\u0027Could not parse JSON from response from command \u0027"},{"line_number":136,"context_line":"                    \u0027\"%(method)s\" with params \"%(params)s\" for node %(node)s\u0027)"},{"line_number":137,"context_line":"            msg_args \u003d {\u0027method\u0027: method,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_fb4d1873","line":134,"updated":"2015-01-16 02:34:42.000000000","message":"Shouldn\u0027t this be ValueError ? \n\nhttp://docs.python-requests.org/en/latest/user/quickstart/#json-response-content","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                        \u0027node\u0027: node.uuid}"},{"line_number":140,"context_line":"            LOG.exception(msg, msg_args)"},{"line_number":141,"context_line":"            raise exception.AgentClientJSONException(message\u003dmsg % msg_args,"},{"line_number":142,"context_line":"                                                     node\u003dnode)"},{"line_number":143,"context_line":"        return CommandResult(result)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def command_result(self, node, command_name):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_6fff2e35","line":142,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L130","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            res \u003d self.session.get(url, headers\u003dheaders)"},{"line_number":162,"context_line":"        except requests.RequestException as e:"},{"line_number":163,"context_line":"            raise exception.AgentClientConnectionException("},{"line_number":164,"context_line":"                node\u003dnode, request_error\u003dstr(e))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            commands \u003d res.json().get(\u0027commands\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_af7e76ac","line":164,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L106","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                node\u003dnode, request_error\u003dstr(e))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            commands \u003d res.json().get(\u0027commands\u0027)"},{"line_number":168,"context_line":"        except (requests.RequestException, ValueError):"},{"line_number":169,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":170,"context_line":"        LOG.debug(\u0027Got command results for node %(node)s: %(results)s\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_3b6b20ba","line":167,"updated":"2015-01-16 02:34:42.000000000","message":"Ditto, I guess just ValueError is enough.","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            commands \u003d res.json().get(\u0027commands\u0027)"},{"line_number":168,"context_line":"        except (requests.RequestException, ValueError):"},{"line_number":169,"context_line":"            raise exception.AgentClientJSONException(node\u003dnode)"},{"line_number":170,"context_line":"        LOG.debug(\u0027Got command results for node %(node)s: %(results)s\u0027,"},{"line_number":171,"context_line":"                  {\u0027node\u0027: node.uuid, \u0027results\u0027: commands})"},{"line_number":172,"context_line":"        results \u003d self._command_results(commands, command_name)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_0f45ca6f","line":169,"updated":"2015-01-22 11:32:05.000000000","message":"node.uuid","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"}],"ironic/tests/drivers/test_agent.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"6d9729d15b211b505ae60fe37354e9224967c1c9","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                              self.passthru.heartbeat, task, **kwargs)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    @mock.patch.object(deploy_utils, \u0027set_failed_state\u0027)"},{"line_number":405,"context_line":"    def test_heartbeat_deploy_done_fails(self, failed_mock):"},{"line_number":406,"context_line":"        client_mock \u003d mock.Mock()"},{"line_number":407,"context_line":"        client_mock.deploy_is_done.side_effect \u003d Exception"},{"line_number":408,"context_line":"        self.passthru._client \u003d client_mock"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_9df8a8c5","line":405,"updated":"2015-01-06 20:59:25.000000000","message":"I\u0027d love to see a test similar to this that mocks self.command_results instead of mocking out the entire client. That would potentially catch the type of logic issues that kept the tempest tests from failing (and that I believe I found again in deploy_is_done()).","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3da97977d032cff6367536c19b7d0bb16578b96e","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                              self.passthru.heartbeat, task, **kwargs)"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"    @mock.patch.object(deploy_utils, \u0027set_failed_state\u0027)"},{"line_number":405,"context_line":"    def test_heartbeat_deploy_done_fails(self, failed_mock):"},{"line_number":406,"context_line":"        client_mock \u003d mock.Mock()"},{"line_number":407,"context_line":"        client_mock.deploy_is_done.side_effect \u003d Exception"},{"line_number":408,"context_line":"        self.passthru._client \u003d client_mock"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a961159_7e96764d","line":405,"in_reply_to":"3a961159_9df8a8c5","updated":"2015-01-07 19:10:27.000000000","message":"Done","commit_id":"216936827489b64b17b8679918010a49aa8a248c"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":454,"context_line":"            self.assertEqual(states.ACTIVE, task.node.provision_state)"},{"line_number":455,"context_line":"            self.assertEqual(states.NOSTATE, task.node.target_provision_state)"},{"line_number":456,"context_line":""},{"line_number":457,"context_line":"    @mock.patch.object(deploy_utils, \u0027set_failed_state\u0027)"},{"line_number":458,"context_line":"    def test__reboot_to_instance_failed(self, failed_mock):"},{"line_number":459,"context_line":"        command \u003d {"},{"line_number":460,"context_line":"            \u0027command_status\u0027: \u0027FAILED\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_1bed8425","line":457,"updated":"2015-01-16 02:34:42.000000000","message":"As above, I guess good to avoid mocking set_failed_state and assert if provision_state and target_provision_state are set properly for the error case.","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"}],"ironic/tests/drivers/test_agent_client.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"03c48cc93234c9bce4347711b418ac1706752521","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.node \u003d MockNode()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _assert_comand_results_equal(self, expected, actual):"},{"line_number":83,"context_line":"        self.assertEqual()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test__get_command_url(self):"},{"line_number":86,"context_line":"        command_url \u003d self.client._get_command_url(self.node)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a961159_95408260","line":83,"updated":"2015-01-06 19:28:16.000000000","message":"What is this function used for?","commit_id":"9516f71c818646d14de323f048534d90bfb43851"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                          self.node,"},{"line_number":230,"context_line":"                          \u0027prepare_image\u0027)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    def test_command_result_json_fail(self):"},{"line_number":233,"context_line":"        response \u003d mock.Mock()"},{"line_number":234,"context_line":"        response.json.side_effect \u003d requests.RequestException"},{"line_number":235,"context_line":"        self.client.session.get.return_value \u003d response"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_21b9f47c","line":232,"updated":"2015-01-09 17:59:39.000000000","message":"May be add a test case where we get valid json but commands doesn\u0027t exist.","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"d5eff49e190131f00ae395e44e48753c5faeb42a","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                          self.node,"},{"line_number":240,"context_line":"                          \u0027prepare_image\u0027)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    def test_is_successful(self):"},{"line_number":243,"context_line":"        with mock.patch.object(self.client, \u0027command_result\u0027) as mock_s:"},{"line_number":244,"context_line":"            mock_s.return_value \u003d _get_fake_command_result("},{"line_number":245,"context_line":"                {\u0027command_status\u0027: \u0027SUCCEEDED\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a961159_e17d2cb4","line":242,"updated":"2015-01-09 17:59:39.000000000","message":"May be package them another class AgentCommandResultTestCase for better scoping.","commit_id":"3c239b49e0c95bc50986b71663129ed855f7c4a7"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027agent_url\u0027: \"http://127.0.0.1:9999\""},{"line_number":55,"context_line":"        }"},{"line_number":56,"context_line":"        self.instance_info \u003d {}"},{"line_number":57,"context_line":"        self.uuid \u003d \u00273f1175d5-9c83-4fa3-8921-7e6e186f7406\u0027"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"fake_results \u003d {"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_e30eda31","line":57,"updated":"2015-01-22 11:32:05.000000000","message":"uuid defined 2 times","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    u\u0027command_status\u0027: u\u0027SUCCEEDED\u0027,"},{"line_number":63,"context_line":"    u\u0027command_params\u0027: {},"},{"line_number":64,"context_line":"    u\u0027command_result\u0027: None,"},{"line_number":65,"context_line":"    u\u0027id\u0027: u\u00273f1175d5-9c83-4fa3-8921-7e6e186f7406\u0027,"},{"line_number":66,"context_line":"    u\u0027command_name\u0027: u\u0027prepare_image\u0027"},{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_e3aa5ad1","line":65,"updated":"2015-01-22 11:32:05.000000000","message":"id is not in CommandResult class, is it ok?","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"def _get_fake_command_result(kwargs):"},{"line_number":71,"context_line":"    results \u003d dict(fake_results.items() + kwargs.items())"},{"line_number":72,"context_line":"    return agent_client.CommandResult(results)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_c341de3a","line":71,"updated":"2015-01-22 11:32:05.000000000","message":"This won\u0027t work in py3 because you can\u0027t add view objects.","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        image_info \u003d {\u0027image_id\u0027: \u0027test_image\u0027}"},{"line_number":129,"context_line":"        params \u003d {\u0027image_info\u0027: image_info}"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"        with mock.patch.object(self.client.session, \u0027post\u0027) as mock_post:"},{"line_number":132,"context_line":"            mock_post.side_effect \u003d requests.RequestException"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            self.assertRaises(exception.AgentClientConnectionException,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_03912699","line":131,"updated":"2015-01-22 11:32:05.000000000","message":"it\u0027s better to use decorator here.","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        image_info \u003d {\u0027image_id\u0027: \u0027test_image\u0027}"},{"line_number":143,"context_line":"        params \u003d {\u0027image_info\u0027: image_info}"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        with mock.patch.object(self.client.session, \u0027post\u0027) as mock_post:"},{"line_number":146,"context_line":"            mock_response \u003d mock.Mock()"},{"line_number":147,"context_line":"            mock_response.status_code \u003d 400"},{"line_number":148,"context_line":"            mock_post.return_value \u003d mock_response"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_83f436f3","line":145,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        image_info \u003d {\u0027image_id\u0027: \u0027test_image\u0027}"},{"line_number":159,"context_line":"        params \u003d {\u0027image_info\u0027: image_info}"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        with mock.patch.object(self.client.session, \u0027post\u0027) as mock_post:"},{"line_number":162,"context_line":"            mock_response \u003d mock.Mock()"},{"line_number":163,"context_line":"            mock_response.status_code \u003d 200"},{"line_number":164,"context_line":"            mock_response.headers \u003d {\u0027Content-Type\u0027: \u0027text/html\u0027}"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_a3f772f4","line":161,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        image_info \u003d {\u0027image_id\u0027: \u0027test_image\u0027}"},{"line_number":176,"context_line":"        params \u003d {\u0027image_info\u0027: image_info}"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        with mock.patch.object(self.client.session, \u0027post\u0027) as mock_post:"},{"line_number":179,"context_line":"            mock_response \u003d mock.Mock()"},{"line_number":180,"context_line":"            mock_response.status_code \u003d 200"},{"line_number":181,"context_line":"            mock_response.headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_c3dd5e72","line":178,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":179,"context_line":"            mock_response \u003d mock.Mock()"},{"line_number":180,"context_line":"            mock_response.status_code \u003d 200"},{"line_number":181,"context_line":"            mock_response.headers \u003d {\u0027Content-Type\u0027: \u0027application/json\u0027}"},{"line_number":182,"context_line":"            mock_response.json.side_effect \u003d requests.RequestException"},{"line_number":183,"context_line":"            mock_post.return_value \u003d mock_response"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"            self.assertRaises(exception.AgentClientJSONException,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_fb2c384c","line":182,"updated":"2015-01-16 02:34:42.000000000","message":"I guess this should be ValueError.\n\nhttp://docs.python-requests.org/en/latest/user/quickstart/#json-response-content","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                         results[0].status)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def test_command_result_empty_response(self):"},{"line_number":208,"context_line":"        with mock.patch.object(self.client, \u0027_command_results\u0027) as mock_s:"},{"line_number":209,"context_line":"            mock_s.return_value \u003d []"},{"line_number":210,"context_line":"            result \u003d self.client.command_result(self.node, \u0027prepare_image\u0027)"},{"line_number":211,"context_line":"            self.assertIsNone(result)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_a3ce92b2","line":208,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"aa54cc41427bb5d4ed39da6b130a736f45a50587","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def test_command_result_json_fail(self):"},{"line_number":239,"context_line":"        response \u003d mock.Mock()"},{"line_number":240,"context_line":"        response.json.side_effect \u003d requests.RequestException"},{"line_number":241,"context_line":"        self.client.session.get.return_value \u003d response"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        self.assertRaises(exception.AgentClientJSONException,"}],"source_content_type":"text/x-python","patch_set":20,"id":"3a961159_7b72087d","line":240,"updated":"2015-01-16 02:34:42.000000000","message":"May be the side_effect should be ValueError ?\n\nhttp://docs.python-requests.org/en/latest/user/quickstart/#json-response-content","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":293,"context_line":"    def setUp(self):"},{"line_number":294,"context_line":"        super(AgentCommandResultTestCase, self).setUp()"},{"line_number":295,"context_line":"        self.client \u003d agent_client.AgentClient()"},{"line_number":296,"context_line":"        self.client.session \u003d mock.Mock(autospec\u003drequests.Session)"},{"line_number":297,"context_line":"        self.node \u003d MockNode()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def test_is_successful(self):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_c37c7e23","line":296,"updated":"2015-01-22 11:32:05.000000000","message":"Seems that you dont need self.clinet.session and self.node mocks in this test case.","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.node \u003d MockNode()"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def test_is_successful(self):"},{"line_number":300,"context_line":"        with mock.patch.object(self.client, \u0027command_result\u0027) as mock_s:"},{"line_number":301,"context_line":"            mock_s.return_value \u003d _get_fake_command_result("},{"line_number":302,"context_line":"                {\u0027command_status\u0027: \u0027SUCCEEDED\u0027,"},{"line_number":303,"context_line":"                 \u0027command_name\u0027: \u0027prepare_image\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_83def63d","line":300,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            self.assertTrue(result.is_successful())"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"    def test_is_not_successful(self):"},{"line_number":310,"context_line":"        with mock.patch.object(self.client, \u0027command_result\u0027) as mock_s:"},{"line_number":311,"context_line":"            mock_s.return_value \u003d _get_fake_command_result("},{"line_number":312,"context_line":"                {\u0027command_status\u0027: \u0027FAILED\u0027,"},{"line_number":313,"context_line":"                 \u0027command_name\u0027: \u0027prepare_image\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_23ed42f0","line":310,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"41f63b029c7c5a370996de4ed0870d65fdceed07","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            self.assertFalse(result.is_successful())"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    def test_is_running(self):"},{"line_number":320,"context_line":"        with mock.patch.object(self.client, \u0027command_result\u0027) as mock_s:"},{"line_number":321,"context_line":"            mock_s.return_value \u003d _get_fake_command_result("},{"line_number":322,"context_line":"                {\u0027command_status\u0027: \u0027RUNNING\u0027,"},{"line_number":323,"context_line":"                 \u0027command_name\u0027: \u0027prepare_image\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a930d6b_63be6ad6","line":320,"updated":"2015-01-22 11:32:05.000000000","message":"ditto L131","commit_id":"7ded8c6ae86ad8d1698c8a6a71ade33b70fbaedd"}]}
