)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"658cc9f01c668be85c39837adcf8a6b2d84de7fb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Moving Reboot bashscript to python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a reboot bash script file is used to call reboot and"},{"line_number":10,"context_line":"poweroff operation.Deleting this file and moving the code to"},{"line_number":11,"context_line":"python file using utils.execute()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a8ec9b2_6fd7cebf","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":20},"updated":"2016-09-19 15:40:17.000000000","message":"missing space","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"f0c6240b2c8202c344904e2f7ecb945f643a5490","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Moving Reboot bashscript to python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a reboot bash script file is used to call reboot and"},{"line_number":10,"context_line":"poweroff operation.Deleting this file and moving the code to"},{"line_number":11,"context_line":"python file using utils.execute()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a8bc5a2_edef5aae","line":10,"range":{"start_line":10,"start_character":18,"end_line":10,"end_character":20},"in_reply_to":"7a8ec9b2_6fd7cebf","updated":"2016-09-22 13:51:48.000000000","message":"Done","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Bharath kumar \u003cshettybharath4@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-22 09:36:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Moving Reboot bashscript to python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a reboot bash script file is used to call reboot and"},{"line_number":10,"context_line":"poweroff operation. Deleting this file and moving the code to"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a71b18c_7ecd48b6","line":7,"range":{"start_line":7,"start_character":14,"end_line":7,"end_character":24},"updated":"2016-12-09 19:08:00.000000000","message":"s/bashscript/bash script/","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Moving Reboot bashscript to python"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a reboot bash script file is used to call reboot and"},{"line_number":10,"context_line":"poweroff operation. Deleting this file and moving the code to"},{"line_number":11,"context_line":"python file using utils.execute()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a71b18c_bebfe0fa","line":10,"range":{"start_line":10,"start_character":9,"end_line":10,"end_character":18},"updated":"2016-12-09 19:08:00.000000000","message":"s/operation/operations/","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f49a5fd863ad165012bd9822282d1b089a2401b5","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Iad9cd9d15417e9a954d108d2759e6303452fca27"},{"line_number":16,"context_line":"Author: Bharath kumar \u003cshettybharath4@gmail.com\u003e"},{"line_number":17,"context_line":"Co-Authored-By: Annie Lezil\u003cannie.lezil@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a6eadb0_6054bbfe","line":17,"range":{"start_line":17,"start_character":25,"end_line":17,"end_character":29},"updated":"2016-12-15 00:05:07.000000000","message":"Probably want a space in there.","commit_id":"c25cef74204534f3f6151ed9a2b8ae59d35ec3b8"}],"ironic_python_agent/extensions/standby.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"658cc9f01c668be85c39837adcf8a6b2d84de7fb","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."},{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_af02b609","line":561,"updated":"2016-09-19 15:40:17.000000000","message":"It should only allow to commands: reboot or poweroff. And it should not be a list. Just a string.","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"451385c54557e5879ff0ed564d117dc493187d26","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."},{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_8c724cac","line":561,"in_reply_to":"7a8ec9b2_49e116d0","updated":"2016-09-20 04:01:20.000000000","message":"I don\u0027t agree. Why should the caller need to know it is a list. Especially when there is only one argument.\n\nThis function can take care of putting it into a list.","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":19901,"name":"Xu Ao","email":"xuao@awcloud.com","username":"xuao"},"change_message_id":"d5f8dca1d23abebf06ab920a8a989a9f2774a763","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."},{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_ecf030cc","line":561,"in_reply_to":"7a8ec9b2_8c724cac","updated":"2016-09-20 04:15:12.000000000","message":"Sorry about it, I make a mistake here.","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"f0c6240b2c8202c344904e2f7ecb945f643a5490","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."},{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_402bba30","line":561,"in_reply_to":"7a8ec9b2_af02b609","updated":"2016-09-22 13:51:48.000000000","message":"Done","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":19901,"name":"Xu Ao","email":"xuao@awcloud.com","username":"xuao"},"change_message_id":"b47e72a4ab46649281c26f466cdefb2e4afe97a9","unresolved":false,"context_lines":[{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."},{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_49e116d0","line":561,"in_reply_to":"7a8ec9b2_af02b609","updated":"2016-09-20 03:40:01.000000000","message":"If the `command` is better to be a list. For it\u0027s a better format to be call in the utils.execute(*args, **kwargs).\nAnd may be more easily to be extended.\nNot sure about it~","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"658cc9f01c668be85c39837adcf8a6b2d84de7fb","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":567,"context_line":"            stdout, stderr \u003d utils.execute(*command, check_exit_code\u003d[0])"},{"line_number":568,"context_line":"        except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_4a3920d8","line":565,"updated":"2016-09-19 15:40:17.000000000","message":"if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):\n     raise SomeSortOfException()","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"f0c6240b2c8202c344904e2f7ecb945f643a5490","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":567,"context_line":"            stdout, stderr \u003d utils.execute(*command, check_exit_code\u003d[0])"},{"line_number":568,"context_line":"        except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_60a3569f","line":565,"in_reply_to":"7a8ec9b2_4a3920d8","updated":"2016-09-22 13:51:48.000000000","message":"Done","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":19901,"name":"Xu Ao","email":"xuao@awcloud.com","username":"xuao"},"change_message_id":"b47e72a4ab46649281c26f466cdefb2e4afe97a9","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        try:"},{"line_number":566,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":567,"context_line":"            stdout, stderr \u003d utils.execute(*command, check_exit_code\u003d[0])"},{"line_number":568,"context_line":"        except processutils.ProcessExecutionError as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_09c1ce2e","line":565,"in_reply_to":"7a8ec9b2_4a3920d8","updated":"2016-09-20 03:40:01.000000000","message":"Maybe:\nif command[0] not in (\u0027reboot\u0027, \u0027poweroff\u0027):\n     raise SomeSortOfException()","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"658cc9f01c668be85c39837adcf8a6b2d84de7fb","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        \"\"\"Runs image on agent\u0027s system via reboot.\"\"\""},{"line_number":574,"context_line":"        LOG.info(\u0027Rebooting system\u0027)"},{"line_number":575,"context_line":"        command \u003d [\u0027reboot\u0027]"},{"line_number":576,"context_line":"        self._run_shutdown_script(command)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    @base.async_command(\u0027power_off\u0027)"},{"line_number":579,"context_line":"    def power_off(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_2f16a655","line":576,"updated":"2016-09-19 15:40:17.000000000","message":"I think this would be better to just be:\n\n self._run_shutdown_script(\"reboot\")\n\nWithout it being part of the list. I don\u0027t think the caller should have to worry about the complexity.","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"f0c6240b2c8202c344904e2f7ecb945f643a5490","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        \"\"\"Runs image on agent\u0027s system via reboot.\"\"\""},{"line_number":574,"context_line":"        LOG.info(\u0027Rebooting system\u0027)"},{"line_number":575,"context_line":"        command \u003d [\u0027reboot\u0027]"},{"line_number":576,"context_line":"        self._run_shutdown_script(command)"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    @base.async_command(\u0027power_off\u0027)"},{"line_number":579,"context_line":"    def power_off(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a8bc5a2_c000aaad","line":576,"in_reply_to":"7a8ec9b2_2f16a655","updated":"2016-09-22 13:51:48.000000000","message":"Done","commit_id":"91bbfabd0f5bf7e116d06c7821cf3bbfb9eefd67"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bf6c0532e9950aa7b876122b913522611569abc6","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        LOG.info(result_msg)"},{"line_number":556,"context_line":"        return result_msg"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_e1266315","line":558,"range":{"start_line":558,"start_character":22,"end_line":558,"end_character":28},"updated":"2016-10-28 10:26:30.000000000","message":"This should be renamed since it doesn\u0027t run a script anymore","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"89b0c4ae6788ee597d5ae24941c57ed3dfcd4fbb","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        LOG.info(result_msg)"},{"line_number":556,"context_line":"        return result_msg"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_c781734c","line":558,"range":{"start_line":558,"start_character":22,"end_line":558,"end_character":28},"in_reply_to":"9a629dbe_39f259d3","updated":"2016-11-08 11:09:31.000000000","message":"\"_run_shutdown_script\" is the current name. Perhaps just \"_shutdown\" would make more sense.","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"d4a08a83edb35221033920e38a2f1d7b6e21dae9","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        LOG.info(result_msg)"},{"line_number":556,"context_line":"        return result_msg"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_c21401f7","line":558,"range":{"start_line":558,"start_character":22,"end_line":558,"end_character":28},"in_reply_to":"9a629dbe_c781734c","updated":"2016-11-08 11:27:46.000000000","message":"sorry, i meant \"_run_shutdown_command\"","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"a65802316de21d9b415b790443ed7e9f556d139f","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        LOG.info(result_msg)"},{"line_number":556,"context_line":"        return result_msg"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_0f2a997e","line":558,"range":{"start_line":558,"start_character":22,"end_line":558,"end_character":28},"in_reply_to":"ba5da102_e1266315","updated":"2016-10-28 15:46:30.000000000","message":"+1","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"8f35ed49547f96c8a94f4423d111fdbcbbb44651","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        LOG.info(result_msg)"},{"line_number":556,"context_line":"        return result_msg"},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"    def _run_shutdown_script(self, command):"},{"line_number":559,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":560,"context_line":""},{"line_number":561,"context_line":"        :param command: The command to be run."}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_39f259d3","line":558,"range":{"start_line":558,"start_character":22,"end_line":558,"end_character":28},"in_reply_to":"ba5da102_e1266315","updated":"2016-11-08 10:49:41.000000000","message":"yeah, ill change this, \"_run_shutdown_script\" looks fine ?","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5429c5b19fbcbcbe321aa0ee5c2956e5e408f7e4","unresolved":false,"context_lines":[{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":566,"context_line":"            msg \u003d (\u0027The command should be poweroff or reboot\u0027)"},{"line_number":567,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":568,"context_line":"        try:"},{"line_number":569,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_d5b4d2f3","line":566,"updated":"2016-09-22 19:47:38.000000000","message":"Should state what command was passed in, so user can have an idea about what caused issue.","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bf6c0532e9950aa7b876122b913522611569abc6","unresolved":false,"context_lines":[{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":566,"context_line":"            msg \u003d (\u0027The command should be poweroff or reboot\u0027)"},{"line_number":567,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":568,"context_line":"        try:"},{"line_number":569,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_a10c6b95","line":566,"in_reply_to":"5a8bc5a2_1eff2968","updated":"2016-10-28 10:26:30.000000000","message":"++","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"8f35ed49547f96c8a94f4423d111fdbcbbb44651","unresolved":false,"context_lines":[{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":566,"context_line":"            msg \u003d (\u0027The command should be poweroff or reboot\u0027)"},{"line_number":567,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":568,"context_line":"        try:"},{"line_number":569,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_97c7cc44","line":566,"in_reply_to":"5a8bc5a2_1eff2968","updated":"2016-11-08 10:49:41.000000000","message":"Done","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"a2dca8eb151379e68a4e5d864763fbc0b422a454","unresolved":false,"context_lines":[{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":566,"context_line":"            msg \u003d (\u0027The command should be poweroff or reboot\u0027)"},{"line_number":567,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":568,"context_line":"        try:"},{"line_number":569,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_1eff2968","line":566,"in_reply_to":"5a8bc5a2_d5b4d2f3","updated":"2016-09-23 04:45:11.000000000","message":"okay, i\u0027ll add the command here","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"a65802316de21d9b415b790443ed7e9f556d139f","unresolved":false,"context_lines":[{"line_number":563,"context_line":"         unsuccessful exit code."},{"line_number":564,"context_line":"        \"\"\""},{"line_number":565,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":566,"context_line":"            msg \u003d (\u0027The command should be poweroff or reboot\u0027)"},{"line_number":567,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":568,"context_line":"        try:"},{"line_number":569,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_6f3b15d2","line":566,"in_reply_to":"ba5da102_a10c6b95","updated":"2016-10-28 15:46:30.000000000","message":"+1","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3c0f8a7ca14aa45f1637bf3f55bab741338e8e80","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        \"\"\""},{"line_number":567,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":568,"context_line":"            msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":569,"context_line":"                   \u0027but receiving \"%s\".\u0027) % command)"},{"line_number":570,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":571,"context_line":"        try:"},{"line_number":572,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_20bbb5e6","line":569,"range":{"start_line":569,"start_character":24,"end_line":569,"end_character":33},"updated":"2016-11-09 14:53:51.000000000","message":"s/receiving/received\n\nAlso not sure that this check is needed. With shell script command was just silently ignored.","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"6fb4d164bad50323e4abdeccf40886c5855f5b13","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        \"\"\""},{"line_number":567,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":568,"context_line":"            msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":569,"context_line":"                   \u0027but receiving \"%s\".\u0027) % command)"},{"line_number":570,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":571,"context_line":"        try:"},{"line_number":572,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_a5cedb2b","line":569,"range":{"start_line":569,"start_character":24,"end_line":569,"end_character":33},"in_reply_to":"9a629dbe_20bbb5e6","updated":"2016-11-10 04:44:21.000000000","message":"thanks for the review. Ill change the text to \"received\" here.","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3c0f8a7ca14aa45f1637bf3f55bab741338e8e80","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                   \u0027but receiving \"%s\".\u0027) % command)"},{"line_number":570,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":571,"context_line":"        try:"},{"line_number":572,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":573,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":574,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":575,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_c06e7995","line":572,"updated":"2016-11-09 14:53:51.000000000","message":"why not use self.sync() here which is defined in L590?","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"6fb4d164bad50323e4abdeccf40886c5855f5b13","unresolved":false,"context_lines":[{"line_number":569,"context_line":"                   \u0027but receiving \"%s\".\u0027) % command)"},{"line_number":570,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":571,"context_line":"        try:"},{"line_number":572,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":573,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":574,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":575,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a629dbe_65f8434a","line":572,"in_reply_to":"9a629dbe_c06e7995","updated":"2016-11-10 04:44:21.000000000","message":"when sync fails here, we will end up getting two errors/exception. So i just avoided using the function here.","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        return result_msg"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def _run_shutdown_command(self, command):"},{"line_number":485,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_bef440cf","line":485,"range":{"start_line":485,"start_character":11,"end_line":485,"end_character":78},"updated":"2016-12-09 19:08:00.000000000","message":"Is \u0027Run a shutdown or reboot command\u0027 ok?","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"cb7c8578266e052b7fa8c3cfa04b978505321e76","unresolved":false,"context_lines":[{"line_number":482,"context_line":"        return result_msg"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"    def _run_shutdown_command(self, command):"},{"line_number":485,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_10d8c71c","line":485,"range":{"start_line":485,"start_character":11,"end_line":485,"end_character":78},"in_reply_to":"3a71b18c_bef440cf","updated":"2016-12-14 17:05:13.000000000","message":"Done","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":484,"context_line":"    def _run_shutdown_command(self, command):"},{"line_number":485,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"},{"line_number":489,"context_line":"         equal to poweroff or reboot."},{"line_number":490,"context_line":"        :raises: SystemRebootError if the command errors out with a"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_5e26cc68","line":487,"range":{"start_line":487,"start_character":26,"end_line":487,"end_character":32},"updated":"2016-12-09 19:08:00.000000000","message":"s/String/string/","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"cb7c8578266e052b7fa8c3cfa04b978505321e76","unresolved":false,"context_lines":[{"line_number":484,"context_line":"    def _run_shutdown_command(self, command):"},{"line_number":485,"context_line":"        \"\"\"Run the shutdown or reboot command according to the command passed."},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"},{"line_number":489,"context_line":"         equal to poweroff or reboot."},{"line_number":490,"context_line":"        :raises: SystemRebootError if the command errors out with a"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_50087f91","line":487,"range":{"start_line":487,"start_character":26,"end_line":487,"end_character":32},"in_reply_to":"3a71b18c_5e26cc68","updated":"2016-12-14 17:05:13.000000000","message":"Done","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"},{"line_number":489,"context_line":"         equal to poweroff or reboot."},{"line_number":490,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":491,"context_line":"         unsuccessful exit code."},{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":494,"context_line":"            msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_de62dcd7","line":491,"range":{"start_line":490,"start_character":66,"end_line":491,"end_character":21},"updated":"2016-12-09 19:08:00.000000000","message":"s/a unsuccessful/an unsuccessful/","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"cb7c8578266e052b7fa8c3cfa04b978505321e76","unresolved":false,"context_lines":[{"line_number":487,"context_line":"        :param command: A String having the command to be run."},{"line_number":488,"context_line":"        :raises: InvalidCommandParamsError if the passed command is not"},{"line_number":489,"context_line":"         equal to poweroff or reboot."},{"line_number":490,"context_line":"        :raises: SystemRebootError if the command errors out with a"},{"line_number":491,"context_line":"         unsuccessful exit code."},{"line_number":492,"context_line":"        \"\"\""},{"line_number":493,"context_line":"        if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":494,"context_line":"            msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_9002176e","line":491,"range":{"start_line":490,"start_character":66,"end_line":491,"end_character":21},"in_reply_to":"3a71b18c_de62dcd7","updated":"2016-12-14 17:05:13.000000000","message":"Done","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0a9bf3b61131e209cd1b1501c647a921de6299e8","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                   \u0027but received \"%s\".\u0027) % command)"},{"line_number":496,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":499,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":500,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":501,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a74a57a_d24cfc78","line":498,"updated":"2016-11-23 10:34:33.000000000","message":"Prior to this patch failing to call \"sync\" wouldn\u0027t abort the reboot/shutdown. I think we can call it but perhaps we should just ignore and log a warning if it fails ? \n\n try:\n    self.sync()\n except errors.CommandExecutionError as e:\n    LOG.warning(\u0027Failed to sync file system buffers: %s, e)\n\n try:\n     ...\n\nFWIW, reboot/poweroff should sync the buffers","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"cb7c8578266e052b7fa8c3cfa04b978505321e76","unresolved":false,"context_lines":[{"line_number":495,"context_line":"                   \u0027but received \"%s\".\u0027) % command)"},{"line_number":496,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":499,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":500,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":501,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_b0f9d382","line":498,"in_reply_to":"5a74a57a_d24cfc78","updated":"2016-12-14 17:05:13.000000000","message":"Done","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0a9bf3b61131e209cd1b1501c647a921de6299e8","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":499,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":500,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":501,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a74a57a_f209f8de","line":499,"range":{"start_line":499,"start_character":12,"end_line":499,"end_character":26},"updated":"2016-11-23 10:34:33.000000000","message":"There\u0027s no point in saving the stdout, stderr output if it\u0027s not going to be used anywhere","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":499,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":500,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":501,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_9e41443c","line":499,"range":{"start_line":499,"start_character":12,"end_line":499,"end_character":26},"in_reply_to":"5a74a57a_f209f8de","updated":"2016-12-09 19:08:00.000000000","message":"+1","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"cb7c8578266e052b7fa8c3cfa04b978505321e76","unresolved":false,"context_lines":[{"line_number":496,"context_line":"            raise errors.InvalidCommandParamsError(msg)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            stdout, stderr \u003d utils.execute(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":499,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":500,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":501,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":502,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_f078abf4","line":499,"range":{"start_line":499,"start_character":12,"end_line":499,"end_character":26},"in_reply_to":"5a74a57a_f209f8de","updated":"2016-12-14 17:05:13.000000000","message":"SystemRebootError takes the all three (e.exit_code, e.stdout, e.stderr) as argument. If I do not pass them as argument unit test fails","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5879791ffc480c8ef6141c10ed7eb512049bcda1","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        try:"},{"line_number":494,"context_line":"            self.sync()"},{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_d30f392c","line":496,"range":{"start_line":496,"start_character":60,"end_line":496,"end_character":61},"updated":"2016-12-14 17:13:47.000000000","message":"nit:double space","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":493,"context_line":"        try:"},{"line_number":494,"context_line":"            self.sync()"},{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_2e4ba488","line":496,"range":{"start_line":496,"start_character":60,"end_line":496,"end_character":61},"in_reply_to":"1a6eadb0_d30f392c","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5879791ffc480c8ef6141c10ed7eb512049bcda1","unresolved":false,"context_lines":[{"line_number":494,"context_line":"            self.sync()"},{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_730ae522","line":497,"updated":"2016-12-14 17:13:47.000000000","message":"We should do the sync() after we check if the command is a valid command (L501)","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":494,"context_line":"            self.sync()"},{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_6e459c6e","line":497,"in_reply_to":"1a6eadb0_730ae522","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5879791ffc480c8ef6141c10ed7eb512049bcda1","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_937221ac","line":501,"range":{"start_line":498,"start_character":0,"end_line":501,"end_character":65},"updated":"2016-12-14 17:13:47.000000000","message":"This should be outside the try..except block because it won\u0027t raise ProcessExectionError.\n\nAnd we should check if the parameters passed are correct prior to doing any operations so, this check should go before the self.sync() block","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":495,"context_line":"        except errors.CommandExecutionError as e:"},{"line_number":496,"context_line":"            LOG.warning(\u0027Failed to sync file system buffers:  % s\u0027, e)"},{"line_number":497,"context_line":"        try:"},{"line_number":498,"context_line":"            if command not in (\u0027reboot\u0027, \u0027poweroff\u0027):"},{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_8e483889","line":501,"range":{"start_line":498,"start_character":0,"end_line":501,"end_character":65},"in_reply_to":"1a6eadb0_937221ac","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"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":"80daa682479b316cf2ccab8f7b04c5a13dadf0eb","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_5d99781e","line":502,"updated":"2016-12-14 16:50:41.000000000","message":"missed comment from last patchset -- no need to keep stdout/err here as it\u0027s unused.","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_ee59ac5b","line":502,"in_reply_to":"1a6eadb0_1055271c","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5879791ffc480c8ef6141c10ed7eb512049bcda1","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_1055271c","line":502,"in_reply_to":"1a6eadb0_5d99781e","updated":"2016-12-14 17:13:47.000000000","message":"++","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                error_msg \u003d ((\u0027Expected the command \"poweroff\" or \"reboot\" \u0027"},{"line_number":500,"context_line":"                              \u0027but received \"%s\".\u0027) % command)"},{"line_number":501,"context_line":"                raise errors.InvalidCommandParamsError(error_msg)"},{"line_number":502,"context_line":"            stdout, stderr \u003d utils.execute(command, check_exit_code\u003d[0])"},{"line_number":503,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":504,"context_line":"            raise errors.SystemRebootError(e.exit_code, e.stdout, e.stderr)"},{"line_number":505,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_ce5a3050","line":502,"in_reply_to":"1a6eadb0_5d99781e","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"}],"ironic_python_agent/tests/unit/extensions/test_standby.py":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"a65802316de21d9b415b790443ed7e9f556d139f","unresolved":false,"context_lines":[{"line_number":771,"context_line":"        success_result.join()"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":774,"context_line":"        execute_mock.assert_any_call(\u0027reboot\u0027, check_exit_code\u003d[0])"},{"line_number":775,"context_line":"        self.assertEqual(\u0027SUCCEEDED\u0027, success_result.command_status)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        execute_mock.reset_mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_4f5bb12e","line":774,"updated":"2016-10-28 15:46:30.000000000","message":"I think we should use execute_mock.assert_has_calls here, since the ordering matters for when sync and reboot are called.","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"8f35ed49547f96c8a94f4423d111fdbcbbb44651","unresolved":false,"context_lines":[{"line_number":771,"context_line":"        success_result.join()"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":774,"context_line":"        execute_mock.assert_any_call(\u0027reboot\u0027, check_exit_code\u003d[0])"},{"line_number":775,"context_line":"        self.assertEqual(\u0027SUCCEEDED\u0027, success_result.command_status)"},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"        execute_mock.reset_mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_19f6758f","line":774,"in_reply_to":"ba5da102_4f5bb12e","updated":"2016-11-08 10:49:41.000000000","message":"thanks for the review. ill do the changes.","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"5429c5b19fbcbcbe321aa0ee5c2956e5e408f7e4","unresolved":false,"context_lines":[{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":785,"context_line":"        self.assertEqual(\u0027FAILED\u0027, failed_result.command_status)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":788,"context_line":"    def test_power_off(self, execute_mock):"},{"line_number":789,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_f5038e71","line":786,"updated":"2016-09-22 19:47:38.000000000","message":"Can some unit tests be added to test the function: _run_shutdown_script() ?\n\nOne to check if invalid command will raise correct exception.\n\nOne to check what happens if command or \u0027sync\u0027 fails.\n\nOne to check for successful run.","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"bf6c0532e9950aa7b876122b913522611569abc6","unresolved":false,"context_lines":[{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":785,"context_line":"        self.assertEqual(\u0027FAILED\u0027, failed_result.command_status)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":788,"context_line":"    def test_power_off(self, execute_mock):"},{"line_number":789,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_016b571f","line":786,"in_reply_to":"5a8bc5a2_f5038e71","updated":"2016-10-28 10:26:30.000000000","message":"+2","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"a2dca8eb151379e68a4e5d864763fbc0b422a454","unresolved":false,"context_lines":[{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":785,"context_line":"        self.assertEqual(\u0027FAILED\u0027, failed_result.command_status)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":788,"context_line":"    def test_power_off(self, execute_mock):"},{"line_number":789,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_fe2efdf8","line":786,"in_reply_to":"5a8bc5a2_f5038e71","updated":"2016-09-23 04:45:11.000000000","message":"okay","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"8f35ed49547f96c8a94f4423d111fdbcbbb44651","unresolved":false,"context_lines":[{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":785,"context_line":"        self.assertEqual(\u0027FAILED\u0027, failed_result.command_status)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":788,"context_line":"    def test_power_off(self, execute_mock):"},{"line_number":789,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_24ba2d24","line":786,"in_reply_to":"5a8bc5a2_fe2efdf8","updated":"2016-11-08 10:49:41.000000000","message":"Done","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"a65802316de21d9b415b790443ed7e9f556d139f","unresolved":false,"context_lines":[{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":785,"context_line":"        self.assertEqual(\u0027FAILED\u0027, failed_result.command_status)"},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":788,"context_line":"    def test_power_off(self, execute_mock):"},{"line_number":789,"context_line":"        execute_mock.return_value \u003d (\u0027\u0027, \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_af4c4d71","line":786,"in_reply_to":"ba5da102_016b571f","updated":"2016-10-28 15:46:30.000000000","message":"+1","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"a65802316de21d9b415b790443ed7e9f556d139f","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        success_result \u003d self.agent_extension.power_off()"},{"line_number":792,"context_line":"        success_result.join()"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":795,"context_line":"        execute_mock.assert_any_call(\u0027poweroff\u0027, check_exit_code\u003d[0])"},{"line_number":796,"context_line":"        self.assertEqual(\u0027SUCCEEDED\u0027, success_result.command_status)"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_8f3dc9bd","line":794,"updated":"2016-10-28 15:46:30.000000000","message":"same as L774","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"8f35ed49547f96c8a94f4423d111fdbcbbb44651","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        success_result \u003d self.agent_extension.power_off()"},{"line_number":792,"context_line":"        success_result.join()"},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        execute_mock.assert_any_call(\u0027sync\u0027, check_exit_code\u003d[0])"},{"line_number":795,"context_line":"        execute_mock.assert_any_call(\u0027poweroff\u0027, check_exit_code\u003d[0])"},{"line_number":796,"context_line":"        self.assertEqual(\u0027SUCCEEDED\u0027, success_result.command_status)"},{"line_number":797,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_b9e8297e","line":794,"in_reply_to":"ba5da102_8f3dc9bd","updated":"2016-11-08 10:49:41.000000000","message":"Done","commit_id":"740aba86b1f038a52339783a043761fb88b493f8"},{"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":"63b82472eae4df14a83ecaea3aebee444ab4a1b3","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from mock import call, mock"},{"line_number":18,"context_line":"from oslo_concurrency import processutils"},{"line_number":19,"context_line":"from oslotest import base as test_base"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_516eea96","line":17,"updated":"2016-11-08 17:07:52.000000000","message":"Stylistically we typically import the whole module use mock.call/mock.mock as needed. I don\u0027t know why pep8 isn\u0027t complaining about this.","commit_id":"7e56ae7ba143fd6479379fadc366633d83e0c8ad"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"ff71a1a37e3f859ef67ef1d4ce5e5908b4413b35","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import os"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from mock import call, mock"},{"line_number":18,"context_line":"from oslo_concurrency import processutils"},{"line_number":19,"context_line":"from oslotest import base as test_base"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_aa933b4e","line":17,"in_reply_to":"9a629dbe_516eea96","updated":"2016-11-09 04:23:50.000000000","message":"ohh, didn\u0027t know that. Ill make the changes. Thanks for the review","commit_id":"7e56ae7ba143fd6479379fadc366633d83e0c8ad"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":683,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"},{"line_number":684,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027, check_exit_code\u003d[0]),"},{"line_number":685,"context_line":"                 mock.call(\u0027poweroff\u0027, check_exit_code\u003d[0])]"},{"line_number":686,"context_line":"        execute_mock.assert_has_calls(calls)"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":689,"context_line":"    def test_run_image(self, execute_mock):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_2363bb1b","line":686,"range":{"start_line":686,"start_character":8,"end_line":686,"end_character":44},"updated":"2016-12-09 19:08:00.000000000","message":"How about add a call_count validation?","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"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":"f0f5d821a0903565ef000e07acf1607bc8a82955","unresolved":false,"context_lines":[{"line_number":683,"context_line":"        self.agent_extension._run_shutdown_command(\u0027poweroff\u0027)"},{"line_number":684,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027, check_exit_code\u003d[0]),"},{"line_number":685,"context_line":"                 mock.call(\u0027poweroff\u0027, check_exit_code\u003d[0])]"},{"line_number":686,"context_line":"        execute_mock.assert_has_calls(calls)"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":689,"context_line":"    def test_run_image(self, execute_mock):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_5d4ed896","line":686,"range":{"start_line":686,"start_character":8,"end_line":686,"end_character":44},"in_reply_to":"3a71b18c_2363bb1b","updated":"2016-12-14 16:50:48.000000000","message":"When you specify calls like this, I think it validates the correct number of calls as well -- AIUI this already verifies it\u0027s calling sync and poweroff exactly once in that order.","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":693,"context_line":"        success_result.join()"},{"line_number":694,"context_line":"        calls \u003d [mock.call(\u0027sync\u0027, check_exit_code\u003d[0]),"},{"line_number":695,"context_line":"                 mock.call(\u0027reboot\u0027, check_exit_code\u003d[0])]"},{"line_number":696,"context_line":"        execute_mock.assert_has_calls(calls)"},{"line_number":697,"context_line":"        self.assertEqual(\u0027SUCCEEDED\u0027, success_result.command_status)"},{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        execute_mock.reset_mock()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_636db303","line":696,"range":{"start_line":696,"start_character":8,"end_line":696,"end_character":44},"updated":"2016-12-09 19:08:00.000000000","message":"ditto","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"4f4db2aab13baa85ea57c6399bf02e5acf8ce67d","unresolved":false,"context_lines":[{"line_number":665,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":666,"context_line":"    def test_run_shutdown_command_invalid(self, execute_mock):"},{"line_number":667,"context_line":"        self.assertRaises(errors.InvalidCommandParamsError,"},{"line_number":668,"context_line":"                          lambda: self.agent_extension."},{"line_number":669,"context_line":"                          _run_shutdown_command(\u0027boot\u0027))"},{"line_number":670,"context_line":""},{"line_number":671,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_a2609b02","line":668,"updated":"2016-12-14 23:25:55.000000000","message":"I don\u0027t understand this. Why lambda?\n\nWhy not:\n\n self.agent_extension._run_shutdown_command,\n \u0027boot\u0027)","commit_id":"086b8a2c6fa05fdfcac9d78a5b8fd1c2d920f7e3"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"a47d5756edf76bf2c6e16f50ef926882fc32bd07","unresolved":false,"context_lines":[{"line_number":665,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"},{"line_number":666,"context_line":"    def test_run_shutdown_command_invalid(self, execute_mock):"},{"line_number":667,"context_line":"        self.assertRaises(errors.InvalidCommandParamsError,"},{"line_number":668,"context_line":"                          lambda: self.agent_extension."},{"line_number":669,"context_line":"                          _run_shutdown_command(\u0027boot\u0027))"},{"line_number":670,"context_line":""},{"line_number":671,"context_line":"    @mock.patch(\u0027ironic_python_agent.utils.execute\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6eadb0_e591bdf2","line":668,"in_reply_to":"1a6eadb0_a2609b02","updated":"2016-12-14 23:58:15.000000000","message":"Done","commit_id":"086b8a2c6fa05fdfcac9d78a5b8fd1c2d920f7e3"}],"releasenotes/notes/move-reboot-script-to-python-dba09f725f101a15.yaml":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3c0f8a7ca14aa45f1637bf3f55bab741338e8e80","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9a629dbe_c09f594e","line":3,"updated":"2016-11-09 14:53:51.000000000","message":"Not sure that we need release note for this, from end user, behavior wasn\u0027t changed.","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":18941,"name":"Bharath kumar","email":"bharath.kumar3@hpe.com","username":"bharathshetty4"},"change_message_id":"6fb4d164bad50323e4abdeccf40886c5855f5b13","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9a629dbe_1868cab8","line":3,"in_reply_to":"9a629dbe_c09f594e","updated":"2016-11-10 04:44:21.000000000","message":"Wanted to capture the changes made to the file here","commit_id":"bb806522fc8660cccd5314fbbd00fb58cf5cdca5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"0a9bf3b61131e209cd1b1501c647a921de6299e8","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"5a74a57a_f7cbaa1c","line":3,"updated":"2016-11-23 10:34:33.000000000","message":"s/bashscript/bash script/\n\nI don\u0027t think we need a release note for this, it\u0027s just internal stuff operators should not care about it.","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"925cf8b57cdceb78ddbc3c34bb8a3c7245a295ee","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3a71b18c_83a2cf49","line":3,"in_reply_to":"5a74a57a_f7cbaa1c","updated":"2016-12-09 19:08:00.000000000","message":"+1","commit_id":"5aee8a0240c22912be75d09057a72a3f518d60ea"},{"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":"80daa682479b316cf2ccab8f7b04c5a13dadf0eb","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a6eadb0_1d7460fb","line":3,"updated":"2016-12-14 16:50:41.000000000","message":"The comment from last patchset was missed - please remove the release note.","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a6eadb0_0e034810","line":3,"in_reply_to":"1a6eadb0_13b6113d","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"5879791ffc480c8ef6141c10ed7eb512049bcda1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a6eadb0_13b6113d","line":3,"in_reply_to":"1a6eadb0_1d7460fb","updated":"2016-12-14 17:13:47.000000000","message":"++","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"},{"author":{"_account_id":20462,"name":"Annie Lezil","email":"annie.lezil@gmail.com","username":"alezil"},"change_message_id":"e432e4f981f8c4b290b9d5c9f97153fdb00af539","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - Moving the reboot command written in a bashscript file to python."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"1a6eadb0_ee07ec19","line":3,"in_reply_to":"1a6eadb0_1d7460fb","updated":"2016-12-14 17:42:50.000000000","message":"Done","commit_id":"1a4306fbb7176ddcd22ad838a758cac507a4304f"}]}
