)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13290,"name":"Oleksii Zamiatin","email":"ozamiatin@mirantis.com","username":"ozamiatin"},"change_message_id":"391fb3dbe623f352055e9bd1339182bb67cad2ea","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Lin Tan \u003clin.tan@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-12-07 16:26:05 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make PortOpt accept choices paramter"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It is useful to add an additional paramter of choices for PortOpt."},{"line_number":10,"context_line":"Port will determine if choices are valid values in range of 1 and 65535."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a740942_f8736ce5","line":7,"updated":"2015-12-07 10:35:37.000000000","message":"nit: paramEter","commit_id":"2b780f62f7d8631d42113ba9a99aa5a64575b7b1"},{"author":{"_account_id":11650,"name":"Tom Cammann","email":"tom.cammann@hpe.com","username":"cammann"},"change_message_id":"44cd8f1c4da71375eb370ac42456b433b62758c4","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It is useful to add an additional paramter of choices for PortOpt."},{"line_number":10,"context_line":"Port will determine if choices are valid values in range of 1 and 65535."},{"line_number":11,"context_line":"And only assgin choices to Integer type."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I690ab4c57f5f67c3c8401dc74a83b8e61970da79"},{"line_number":14,"context_line":"Depends-On: 0416d73e56511b3437a071216888bc3a19648feb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a740942_ea67fcb4","line":11,"updated":"2015-12-07 15:56:34.000000000","message":"nt: s/assgin/assign","commit_id":"2b780f62f7d8631d42113ba9a99aa5a64575b7b1"}],"oslo_config/cfg.py":[{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"c3c0316e6dacf6b93c0b84c072b92f9036535bda","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"    \"\"\""},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"    def __init__(self, name, min\u003dNone, max\u003dNone, choices\u003dNone, **kwargs):"},{"line_number":1096,"context_line":"        type \u003d types.Integer(min\u003dmin, max\u003dmax, choices\u003dchoices)"},{"line_number":1097,"context_line":"        super(IntOpt, self).__init__(name, type\u003dtype,"},{"line_number":1098,"context_line":"                                     **kwargs)"},{"line_number":1099,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_bbd64e25","line":1096,"updated":"2015-12-02 03:05:52.000000000","message":"Is there any use case we need choices  for IntOpt ?","commit_id":"6c55564a5045b6d833ccda12e05e91c109476d94"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"a25de13c2df03d0a55bf4c0fa3dfcf0a20c59e60","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"    \"\"\""},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"    def __init__(self, name, min\u003dNone, max\u003dNone, choices\u003dNone, **kwargs):"},{"line_number":1096,"context_line":"        type \u003d types.Integer(min\u003dmin, max\u003dmax, choices\u003dchoices)"},{"line_number":1097,"context_line":"        super(IntOpt, self).__init__(name, type\u003dtype,"},{"line_number":1098,"context_line":"                                     **kwargs)"},{"line_number":1099,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_b6ed0127","line":1096,"in_reply_to":"9a8ffd7b_bbd64e25","updated":"2015-12-07 03:49:04.000000000","message":"Not yet, but it won\u0027t hurt to add the choices I think","commit_id":"6c55564a5045b6d833ccda12e05e91c109476d94"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"c3c0316e6dacf6b93c0b84c072b92f9036535bda","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"       Added *choices* paramter."},{"line_number":1168,"context_line":"    \"\"\""},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":1171,"context_line":"        type \u003d types.Integer(min\u003d1, max\u003d65535, choices\u003dchoices,"},{"line_number":1172,"context_line":"                             type_name\u003d\u0027port value\u0027)"},{"line_number":1173,"context_line":"        super(PortOpt, self).__init__(name, type\u003dtype, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_bb2f2e3d","line":1170,"updated":"2015-12-02 03:05:52.000000000","message":"if choices is not None, You can check if choices  is in the range [1, 65535] , and only pass choices to types.Integer ?","commit_id":"6c55564a5045b6d833ccda12e05e91c109476d94"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"a25de13c2df03d0a55bf4c0fa3dfcf0a20c59e60","unresolved":false,"context_lines":[{"line_number":1167,"context_line":"       Added *choices* paramter."},{"line_number":1168,"context_line":"    \"\"\""},{"line_number":1169,"context_line":""},{"line_number":1170,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":1171,"context_line":"        type \u003d types.Integer(min\u003d1, max\u003d65535, choices\u003dchoices,"},{"line_number":1172,"context_line":"                             type_name\u003d\u0027port value\u0027)"},{"line_number":1173,"context_line":"        super(PortOpt, self).__init__(name, type\u003dtype, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_56f4ddf0","line":1170,"in_reply_to":"9a8ffd7b_bb2f2e3d","updated":"2015-12-07 03:49:04.000000000","message":"I like this idea. Thanks","commit_id":"6c55564a5045b6d833ccda12e05e91c109476d94"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"94830065f6752bb958bade16e4c5ff46859073b3","unresolved":false,"context_lines":[{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    .. versionadded:: 2.6"},{"line_number":1162,"context_line":"    .. versionchanged:: 3.1.0"},{"line_number":1163,"context_line":"       Added *choices* paramter."},{"line_number":1164,"context_line":"    \"\"\""},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_dec46360","line":1163,"updated":"2015-12-07 06:44:48.000000000","message":"s/paramter/parameter","commit_id":"1dd280ab4e04367fbf02f4f53fb740c1b3c1de53"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"94830065f6752bb958bade16e4c5ff46859073b3","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":1167,"context_line":"        min \u003d 1"},{"line_number":1168,"context_line":"        max \u003d 65535"},{"line_number":1169,"context_line":"        # choices and min/max are mutally exclusive for Integer type.So check"},{"line_number":1170,"context_line":"        # if choice are in the range of min/max and only assign choices to"},{"line_number":1171,"context_line":"        # Integer type."},{"line_number":1172,"context_line":"        if choices is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_deed43f0","line":1169,"updated":"2015-12-07 06:44:48.000000000","message":"space after .","commit_id":"1dd280ab4e04367fbf02f4f53fb740c1b3c1de53"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"94830065f6752bb958bade16e4c5ff46859073b3","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"        # Integer type."},{"line_number":1172,"context_line":"        if choices is not None:"},{"line_number":1173,"context_line":"            for choice in choices:"},{"line_number":1174,"context_line":"                assert min \u003c choice \u003c max"},{"line_number":1175,"context_line":"            min \u003d max \u003d None"},{"line_number":1176,"context_line":"        type \u003d types.Integer(min\u003dmin, max\u003dmax, choices\u003dchoices,"},{"line_number":1177,"context_line":"                             type_name\u003d\u0027port value\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_1ec74b46","line":1174,"updated":"2015-12-07 06:44:48.000000000","message":"I\u0027m not sure an assertion exception is the best choice.  In fact, Bandit will flag assert used as a potential security issue.","commit_id":"1dd280ab4e04367fbf02f4f53fb740c1b3c1de53"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"8318e143d82d94cbe091c283e8ad9d3ed0da1716","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"        # Integer type."},{"line_number":1172,"context_line":"        if choices is not None:"},{"line_number":1173,"context_line":"            for choice in choices:"},{"line_number":1174,"context_line":"                assert min \u003c choice \u003c max"},{"line_number":1175,"context_line":"            min \u003d max \u003d None"},{"line_number":1176,"context_line":"        type \u003d types.Integer(min\u003dmin, max\u003dmax, choices\u003dchoices,"},{"line_number":1177,"context_line":"                             type_name\u003d\u0027port value\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_5213820d","line":1174,"in_reply_to":"7a740942_1ec74b46","updated":"2015-12-07 08:38:58.000000000","message":"OK, use valueError instead","commit_id":"1dd280ab4e04367fbf02f4f53fb740c1b3c1de53"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"2d2882feaf94128b0f1c18b7417a9a165cd5bc5b","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"    Option with ``type`` :class:`oslo_config.types.Integer`"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    .. versionadded:: 2.6"},{"line_number":1162,"context_line":"    .. versionchanged:: 3.1.0"},{"line_number":1163,"context_line":"       Added *choices* parameter."},{"line_number":1164,"context_line":"    \"\"\""},{"line_number":1165,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_d696583d","line":1162,"updated":"2015-12-07 23:32:37.000000000","message":"oslo.config 3.1 was just released unfortunately.  So this needs to go to 3.2.0","commit_id":"2b780f62f7d8631d42113ba9a99aa5a64575b7b1"},{"author":{"_account_id":11650,"name":"Tom Cammann","email":"tom.cammann@hpe.com","username":"cammann"},"change_message_id":"44cd8f1c4da71375eb370ac42456b433b62758c4","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"    \"\"\""},{"line_number":1165,"context_line":""},{"line_number":1166,"context_line":"    def __init__(self, name, choices\u003dNone, **kwargs):"},{"line_number":1167,"context_line":"        min \u003d 1"},{"line_number":1168,"context_line":"        max \u003d 65535"},{"line_number":1169,"context_line":"        # choices and min/max are mutally exclusive for Integer type. So check"},{"line_number":1170,"context_line":"        # if choice are in the range of min/max and only assign choices to"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_caefa0e7","line":1167,"updated":"2015-12-07 15:56:34.000000000","message":"These should be constants inside the class or module, e.g.\n\n    MIN_PORT \u003d 1\n    MAX_PORT \u003d 65535\n\n    def __init__(...","commit_id":"2b780f62f7d8631d42113ba9a99aa5a64575b7b1"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"b9ff814c8da3728c798d663fd65856e9e22712ca","unresolved":false,"context_lines":[{"line_number":1172,"context_line":"        if choices is not None:"},{"line_number":1173,"context_line":"            invalid_choices \u003d []"},{"line_number":1174,"context_line":"            for choice in choices:"},{"line_number":1175,"context_line":"                if not min \u003c choice \u003c max:"},{"line_number":1176,"context_line":"                    invalid_choices.append(six.text_type(choice))"},{"line_number":1177,"context_line":"            if invalid_choices:"},{"line_number":1178,"context_line":"                raise ValueError(\"\u0027Choices\u0027 values %s should be in the range \""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a740942_f9ecc0f4","line":1175,"updated":"2015-12-07 15:08:55.000000000","message":"should be : if not min \u003c\u003d choice \u003c\u003dmax .","commit_id":"2b780f62f7d8631d42113ba9a99aa5a64575b7b1"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"2e7a290b0bcd924ddbb1af9bc35437113b411f9d","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"    Option with ``type`` :class:`oslo_config.types.Integer`"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"    .. versionadded:: 2.6"},{"line_number":1162,"context_line":"    .. versionchanged:: 3.2.0"},{"line_number":1163,"context_line":"       Added *choices* parameter."},{"line_number":1164,"context_line":"    \"\"\""},{"line_number":1165,"context_line":"    PORT_MIN \u003d 1"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_c4977046","line":1162,"updated":"2015-12-08 07:44:07.000000000","message":"Oops, revision number of .0 isn\u0027t needed.  Just leave as 3.2","commit_id":"a932e6135c3bb26333ecc0877c4f62f0514fca80"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"2e7a290b0bcd924ddbb1af9bc35437113b411f9d","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"                    invalid_choices.append(six.text_type(choice))"},{"line_number":1178,"context_line":"            if invalid_choices:"},{"line_number":1179,"context_line":"                raise ValueError(\"\u0027Choices\u0027 values %s should be in the range \""},{"line_number":1180,"context_line":"                                 \"of 1 and 65535\" % \u0027, \u0027.join(invalid_choices))"},{"line_number":1181,"context_line":"            type \u003d types.Integer(choices\u003dchoices, type_name\u003d\u0027port value\u0027)"},{"line_number":1182,"context_line":"        else:"},{"line_number":1183,"context_line":"            type \u003d types.Integer(min\u003dself.PORT_MIN, max\u003dself.PORT_MAX,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_44bce0db","line":1180,"updated":"2015-12-08 07:44:07.000000000","message":"Might as well use the PORT_MIN and PORT_MAX here too","commit_id":"a932e6135c3bb26333ecc0877c4f62f0514fca80"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"cb84c67fa090439127710999a6e033bb24ec8a3a","unresolved":false,"context_lines":[{"line_number":1177,"context_line":"                    invalid_choices.append(six.text_type(choice))"},{"line_number":1178,"context_line":"            if invalid_choices:"},{"line_number":1179,"context_line":"                raise ValueError(\"\u0027Choices\u0027 values %s should be in the range \""},{"line_number":1180,"context_line":"                                 \"of 1 and 65535\" % \u0027, \u0027.join(invalid_choices))"},{"line_number":1181,"context_line":"            type \u003d types.Integer(choices\u003dchoices, type_name\u003d\u0027port value\u0027)"},{"line_number":1182,"context_line":"        else:"},{"line_number":1183,"context_line":"            type \u003d types.Integer(min\u003dself.PORT_MIN, max\u003dself.PORT_MAX,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_9ade6edb","line":1180,"in_reply_to":"7a740942_44bce0db","updated":"2015-12-09 02:23:56.000000000","message":"OK， this is better.","commit_id":"a932e6135c3bb26333ecc0877c4f62f0514fca80"}],"oslo_config/tests/test_cfg.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"94830065f6752bb958bade16e4c5ff46859073b3","unresolved":false,"context_lines":[{"line_number":3725,"context_line":""},{"line_number":3726,"context_line":"    def test_choice_good(self):"},{"line_number":3727,"context_line":"        self.conf.register_cli_opt(cfg.PortOpt(\u0027port\u0027,"},{"line_number":3728,"context_line":"                                   choices\u003d[80, 8080]))"},{"line_number":3729,"context_line":"        self.conf([\u0027--port\u0027, \u002780\u0027])"},{"line_number":3730,"context_line":"        self.assertEqual(self.conf.port, 80)"},{"line_number":3731,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a740942_9eba5bbf","line":3728,"updated":"2015-12-07 06:44:48.000000000","message":"Please change choices value to a tuple for some variation","commit_id":"1dd280ab4e04367fbf02f4f53fb740c1b3c1de53"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"2e7a290b0bcd924ddbb1af9bc35437113b411f9d","unresolved":false,"context_lines":[{"line_number":3744,"context_line":"        self.assertRaises(ValueError,"},{"line_number":3745,"context_line":"                          cfg.PortOpt,"},{"line_number":3746,"context_line":"                          \u0027port\u0027,"},{"line_number":3747,"context_line":"                          choices\u003d[80, 65537, 0])"},{"line_number":3748,"context_line":""},{"line_number":3749,"context_line":"    def test_conf_file_choice_value(self):"},{"line_number":3750,"context_line":"        self.conf.register_opt(cfg.PortOpt(\u0027port\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_e47b8c26","line":3747,"updated":"2015-12-08 07:44:07.000000000","message":"Since your new message for the ValueError prints out the choices that are invalid, you could add a test to verify only the invalid choices are included in the message.","commit_id":"a932e6135c3bb26333ecc0877c4f62f0514fca80"},{"author":{"_account_id":13362,"name":"Tan Lin","email":"lin.tan@intel.com","username":"zero"},"change_message_id":"cb84c67fa090439127710999a6e033bb24ec8a3a","unresolved":false,"context_lines":[{"line_number":3744,"context_line":"        self.assertRaises(ValueError,"},{"line_number":3745,"context_line":"                          cfg.PortOpt,"},{"line_number":3746,"context_line":"                          \u0027port\u0027,"},{"line_number":3747,"context_line":"                          choices\u003d[80, 65537, 0])"},{"line_number":3748,"context_line":""},{"line_number":3749,"context_line":"    def test_conf_file_choice_value(self):"},{"line_number":3750,"context_line":"        self.conf.register_opt(cfg.PortOpt(\u0027port\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a740942_1af11e6b","line":3747,"in_reply_to":"7a740942_e47b8c26","updated":"2015-12-09 02:23:56.000000000","message":"Nice suggestion.","commit_id":"a932e6135c3bb26333ecc0877c4f62f0514fca80"}]}
