)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add power command to sushy cli"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"this change add a sushy-cli command to power on/off the system."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Task: 36776"},{"line_number":12,"context_line":"Change-Id: I929b91a43f91c5b9cac5c24f9e1a7ccf55f2a789"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3fa7e38b_1039d7a0","line":9,"updated":"2020-01-22 10:24:19.000000000","message":"nit: Capitalize\ns/add/adds/","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"this change add a sushy-cli command to power on/off the system."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Task: 36776"},{"line_number":12,"context_line":"Change-Id: I929b91a43f91c5b9cac5c24f9e1a7ccf55f2a789"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3fa7e38b_5033cfc4","line":11,"updated":"2020-01-22 10:24:19.000000000","message":"Story: is missing","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"}],"docs/configexample.JSON":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{\"DEFAULT\": {"},{"line_number":2,"context_line":"    \"user\": \"foo\","},{"line_number":3,"context_line":"    \"password\": \"bar\","},{"line_number":4,"context_line":"    \"rhost\": \"http://localhost:8000/redfish/v1/\","}],"source_content_type":"application/octet-stream","patch_set":5,"id":"3fa7e38b_505c2fef","line":1,"updated":"2020-01-22 10:24:19.000000000","message":"Please:\n\n*  low-case file suffix\n* run this JSON document through a formatter such as `python -m son.tool` to make it well-formed","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"}],"setup.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1be15cc8ab72433d7f92415cba6cd849f95ea52f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027power \u003d sushycli.power:Power\u0027,"},{"line_number":55,"context_line":"        ],"},{"line_number":56,"context_line":"    },"},{"line_number":57,"context_line":")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_d7c5d591","line":57,"updated":"2020-01-15 16:08:58.000000000","message":"Side note: please rewrite to use pbr and setup.cfg","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            \u0027power \u003d sushycli.power:Power\u0027,"},{"line_number":55,"context_line":"        ],"},{"line_number":56,"context_line":"    },"},{"line_number":57,"context_line":")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_776d012e","line":57,"in_reply_to":"3fa7e38b_d7c5d591","updated":"2020-01-15 16:40:39.000000000","message":"@khansa: see other projects (such as sushy) for inspiration","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"}],"sushycli/config_example.JSON":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"bc1cce61a181944cb4028c6efd0261de9a292297","unresolved":false,"context_lines":[{"line_number":3,"context_line":"    \"password\": \"bar\","},{"line_number":4,"context_line":"    \"rhost\": \"http://localhost:8000/redfish/v1/\","},{"line_number":5,"context_line":"    \"system\": \"437XR1138R2\""},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"}}"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3fa7e38b_cf60e3d3","line":6,"updated":"2020-01-15 13:37:48.000000000","message":"close the second graph on this line","commit_id":"beab535ce5a3258efbabc99222bbb636d24e5a68"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1be15cc8ab72433d7f92415cba6cd849f95ea52f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3fa7e38b_f7ca519e","updated":"2020-01-15 16:08:58.000000000","message":"Examples should probably go into docs and/or unit tests","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3fa7e38b_b74cd9c9","in_reply_to":"3fa7e38b_f7ca519e","updated":"2020-01-15 16:40:39.000000000","message":"low-cased file name please","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"}],"sushycli/power.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"bc1cce61a181944cb4028c6efd0261de9a292297","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import logging"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"import json"},{"line_number":4,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_ef9effb5","line":1,"updated":"2020-01-15 13:37:48.000000000","message":"from pep8 standard:\nImports should be grouped in the following order:\n\n    Standard library imports.\n    Related third party imports.\n    Local application/library specific imports.\n\nYou should put a blank line between each group of imports.","commit_id":"beab535ce5a3258efbabc99222bbb636d24e5a68"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":11,"context_line":"        \"\"\"Command argument parsing.\"\"\""},{"line_number":12,"context_line":"        parser \u003d super(Power, self).get_parser(prog_name)"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"        parser.add_argument(\u0027--mode\u0027,"},{"line_number":15,"context_line":"                            dest\u003d\u0027power_mode\u0027,"},{"line_number":16,"context_line":"                            default\u003d\u0027\u0027,"},{"line_number":17,"context_line":"                            help\u003d\u0027Specifying the type of action to perform\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_b756192b","line":14,"updated":"2020-01-15 16:40:39.000000000","message":"Mode is an unfortunate choice because it\u0027s confusing and there is also \"boot mode\" we might address in the future.\n\nMay be --state or --power-state would be better?","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    def take_action(self, parsed_args):"},{"line_number":24,"context_line":"        \"\"\"Command action.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        with open(os.path.abspath(\u0027sushycli/config.JSON\u0027)) as config_file:"},{"line_number":27,"context_line":"                   data \u003d json.load(config_file)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        s \u003d sushy.Sushy(data[\u0027DEFAULT\u0027][\u0027rhost\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_b7fa9941","line":26,"updated":"2020-01-15 16:40:39.000000000","message":"I am not sure we should have a config considering how few parameters are required...\n\nEither way, the config should not be a hard requirement..","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        \"\"\"Command action.\"\"\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"        with open(os.path.abspath(\u0027sushycli/config.JSON\u0027)) as config_file:"},{"line_number":27,"context_line":"                   data \u003d json.load(config_file)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        s \u003d sushy.Sushy(data[\u0027DEFAULT\u0027][\u0027rhost\u0027],"},{"line_number":30,"context_line":"                        username\u003ddata[\u0027DEFAULT\u0027][\u0027user\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_9782fda5","line":27,"updated":"2020-01-15 16:40:39.000000000","message":"Here we can run into a subtile issue of encoding. I can expand on that if this code remains in the end.","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        with open(os.path.abspath(\u0027sushycli/config.JSON\u0027)) as config_file:"},{"line_number":27,"context_line":"                   data \u003d json.load(config_file)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"        s \u003d sushy.Sushy(data[\u0027DEFAULT\u0027][\u0027rhost\u0027],"},{"line_number":30,"context_line":"                        username\u003ddata[\u0027DEFAULT\u0027][\u0027user\u0027],"},{"line_number":31,"context_line":"                        password\u003ddata[\u0027DEFAULT\u0027][\u0027password\u0027])"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_37bd4967","line":29,"updated":"2020-01-15 16:40:39.000000000","message":"All these params should be present in the CLI as arguments.\n\nConfig file (if you decide it\u0027s useful) should only be optional and provide some reasonable defaults (if it exists at all).","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"                                %data[\u0027DEFAULT\u0027][\u0027system\u0027])"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        # Performing reset action with the specified reset mode"},{"line_number":38,"context_line":"        if parsed_args.power_mode\u003d\u003d\"on\":"},{"line_number":39,"context_line":"            sys_inst.reset_system(sushy.RESET_TYPE_ON)"},{"line_number":40,"context_line":"        if parsed_args.power_mode\u003d\u003d\"off\":"},{"line_number":41,"context_line":"            sys_inst.reset_system(sushy.RESET_TYPE_FORCE_OFF)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_37622917","line":38,"updated":"2020-01-15 16:40:39.000000000","message":"You should run `tox pep8` on the code to catch formatting issues such as this - should have whitespaces around `\u003d\u003d`.","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"e76796175facdb19a73d45e20c3c6f08268c41c8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        if parsed_args.power_mode\u003d\u003d\"off\":"},{"line_number":41,"context_line":"            sys_inst.reset_system(sushy.RESET_TYPE_FORCE_OFF)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"         #TODO: Don\u0027t know how to handle the case user put wrong"},{"line_number":44,"context_line":"         #parameter (other then on/off)"},{"line_number":45,"context_line":"        # continue with else and print msg or raise an error exception !"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_17460d80","line":43,"updated":"2020-01-15 16:40:39.000000000","message":"You should have argparse enumeration for the --mode parameter. That would make argparse bailing out early.","commit_id":"977025fef7d8651c3b5933fae57dddeebcf1c67d"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"class Power(command.Command):"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"    def get_parser(self, prog_name):"},{"line_number":12,"context_line":"        \"\"\"Command argument parsing.\"\"\""},{"line_number":13,"context_line":"        parser \u003d super(Power, self).get_parser(prog_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_300c13ea","line":10,"updated":"2020-01-22 10:24:19.000000000","message":"docstring is missing","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        rhost \u003d parsed_args.rhost"},{"line_number":47,"context_line":"        system \u003d parsed_args.system"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        with open(os.path.abspath(\u0027config.JSON\u0027)) as config_file:"},{"line_number":50,"context_line":"            data \u003d json.load(config_file)"},{"line_number":51,"context_line":"        if data:"},{"line_number":52,"context_line":"            user \u003d data[\u0027DEFAULT\u0027][\u0027user\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_b06243a6","line":49,"updated":"2020-01-22 10:24:19.000000000","message":"lowercase file name please","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"2ef9a3e92eb30358988a53f8bbf079b79233f751","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        s \u003d sushy.Sushy(rhost, username\u003duser, password\u003dpassword)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        # Instantiate a system object"},{"line_number":60,"context_line":"        sys_inst \u003d s.get_system(\u0027/redfish/v1/Systems/%s\u0027 % system)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        # Performing reset action with the specified reset mode"},{"line_number":63,"context_line":"        if parsed_args.state \u003d\u003d \"on\":"}],"source_content_type":"text/x-python","patch_set":5,"id":"3fa7e38b_70060bd0","line":60,"updated":"2020-01-22 10:24:19.000000000","message":"What happens on failure? will the user get a proper error message on stderr and process exit code (rc) \u003d\u003d 1?","commit_id":"0db8c17717d4976d0500a7b59662a599855e0eb6"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ef61189cf9f017f9f4ef2c48d689d4fa718f80eb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 \u0027resource that the driver will interact with. \u0027"},{"line_number":48,"context_line":"                 \u0027It should include the root service, version and \u0027"},{"line_number":49,"context_line":"                 \u0027the unique resource path to a ComputerSystem. \u0027"},{"line_number":50,"context_line":"                 \u0027For example: /redfish/v1/Systems/1\u0027)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        parser.add_argument("},{"line_number":53,"context_line":"            \u0027state\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_9b672d53","line":50,"updated":"2020-02-10 10:54:11.000000000","message":"All this stuff should eventually go to a common place.","commit_id":"f5b5b4362bc4fd8c589a2c066dbf9b8731ed164f"}],"sushycli/tests/unit/cmd/test_sushycli.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"a68232b63663f6f83a441a515ac10df568b8cfc2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":16,"context_line":"#    under the License."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import mock"},{"line_number":19,"context_line":"import sushy"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from sushycli.cmd.sushycli import main"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fa7e38b_d2cc718b","line":18,"updated":"2020-01-27 08:53:35.000000000","message":"from Python 3.3 mock is a submodule of unittest and it needs to be imported from there","commit_id":"49a3ae0ff40b8627b63dc30e2ab0ef3eb8499e31"}]}
