)]}'
{"novaclient/tests/unit/v2/test_shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ae22764e38ce77d804348f009bf455ba5a20f137","unresolved":false,"context_lines":[{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"    def test_create_server_group_fails(self):"},{"line_number":3081,"context_line":"        with testtools.ExpectedException(exceptions.CommandError):"},{"line_number":3082,"context_line":"            self.run_command(\u0027server-group-create wjsg\u0027)"},{"line_number":3083,"context_line":""},{"line_number":3084,"context_line":"    def test_delete_multi_server_groups(self):"},{"line_number":3085,"context_line":"        self.run_command(\u0027server-group-delete 12345 56789\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_f2a25a98","line":3082,"updated":"2016-10-13 15:44:37.000000000","message":"Why not use self.assertRaises(), like most of the rest of the tests in this file?  I see only two uses of testtools.ExpectedException…","commit_id":"5fceb38d4bc27924fbb5ff8dbbb097d5a650d3e2"}],"novaclient/v2/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ae22764e38ce77d804348f009bf455ba5a20f137","unresolved":false,"context_lines":[{"line_number":5242,"context_line":"    help\u003d_(\u0027Policies for the server groups.\u0027))"},{"line_number":5243,"context_line":"def do_server_group_create(cs, args):"},{"line_number":5244,"context_line":"    \"\"\"Create a new server group with the specified details.\"\"\""},{"line_number":5245,"context_line":"    if not getattr(args, \u0027policy\u0027, None):"},{"line_number":5246,"context_line":"        raise exceptions.CommandError(_(\"at least one policy must be \""},{"line_number":5247,"context_line":"                                        \"specified\"))"},{"line_number":5248,"context_line":"    kwargs \u003d {\u0027name\u0027: args.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_72672a4d","line":5245,"updated":"2016-10-13 15:44:37.000000000","message":"I think it would make much more sense to remove the \u0027default\u003dargparse.SUPPRESS\u0027 clause from the @utils.arg() decorator than to switch to using a getattr.  The default for \u0027default\u0027 is None, which would certainly satisfy this case, and correct the buggy AttributeError raised if the option is not provided.  For that matter, we could (and probably should) also change the \u0027nargs\u0027 clause to read \"nargs\u003d\u0027+\u0027\" to indicate that at least one policy must be provided, and then this entire test can be eliminated, as argparse will handle the error reporting itself, providing a more helpful error message.","commit_id":"5fceb38d4bc27924fbb5ff8dbbb097d5a650d3e2"},{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"c8704df92c4c08283810228debbe9cde88c1a999","unresolved":false,"context_lines":[{"line_number":5242,"context_line":"    help\u003d_(\u0027Policies for the server groups.\u0027))"},{"line_number":5243,"context_line":"def do_server_group_create(cs, args):"},{"line_number":5244,"context_line":"    \"\"\"Create a new server group with the specified details.\"\"\""},{"line_number":5245,"context_line":"    if not getattr(args, \u0027policy\u0027, None):"},{"line_number":5246,"context_line":"        raise exceptions.CommandError(_(\"at least one policy must be \""},{"line_number":5247,"context_line":"                                        \"specified\"))"},{"line_number":5248,"context_line":"    kwargs \u003d {\u0027name\u0027: args.name,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_38fbd048","line":5245,"in_reply_to":"fa6399be_72672a4d","updated":"2016-10-13 17:32:26.000000000","message":"This is 150% correct — the default behavior out of argparse is far more useful/helpful than what this tries to do.  And it results in less code; so it\u0027s a win-win-win.","commit_id":"5fceb38d4bc27924fbb5ff8dbbb097d5a650d3e2"},{"author":{"_account_id":5280,"name":"Nicolas Simonds","email":"nic@metacloud.com","username":"nicolas.simonds"},"change_message_id":"246f469e9de930749fa9613b076d2b8e174a2008","unresolved":false,"context_lines":[{"line_number":5224,"context_line":""},{"line_number":5225,"context_line":""},{"line_number":5226,"context_line":"@utils.arg(\u0027name\u0027, metavar\u003d\u0027\u003cname\u003e\u0027, help\u003d_(\u0027Server group name.\u0027))"},{"line_number":5227,"context_line":"# NOTE(wingwj): The \u0027--policy\u0027 way is still reserved here for preserving"},{"line_number":5228,"context_line":"# the backwards compatibility of CLI, even if a user won\u0027t get this usage"},{"line_number":5229,"context_line":"# in \u0027--help\u0027 description. It will be deprecated after a suitable deprecation"},{"line_number":5230,"context_line":"# period(probably 2 coordinated releases or so)."},{"line_number":5231,"context_line":"#"},{"line_number":5232,"context_line":"# Moreover, we imagine that a given user will use only positional parameters or"},{"line_number":5233,"context_line":"# only the \"--policy\" option. So we don\u0027t need to properly handle"},{"line_number":5234,"context_line":"# the possibility that they might mix them here. That usage is unsupported."},{"line_number":5235,"context_line":"# The related discussion can be found in"},{"line_number":5236,"context_line":"# https://review.openstack.org/#/c/96382/2/."},{"line_number":5237,"context_line":"@utils.arg("},{"line_number":5238,"context_line":"    \u0027policy\u0027,"},{"line_number":5239,"context_line":"    metavar\u003d\u0027\u003cpolicy\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_13ceed81","side":"PARENT","line":5236,"range":{"start_line":5227,"start_character":0,"end_line":5236,"end_character":44},"updated":"2016-10-13 17:47:42.000000000","message":"\"All comments are lies.\" — Fred Ford\n\nThese comments are referring to code that was removed several months ago.","commit_id":"ef3856804d17c1db1769d2f59c9a1ac02f99e9b2"}]}
