)]}'
{"neutron/api/v2/attributes.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9a319be05ddbd1a1e8617945750b9d405d4fa645","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# Used to check maximum number of connections per second allowed"},{"line_number":48,"context_line":"# for the Loadblancer vip. -1 indicate no limit."},{"line_number":49,"context_line":"CONNECTION_UNLIMIT \u003d -1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_303ec28c","line":49,"updated":"2015-11-27 00:38:11.000000000","message":"The name of this constant does not fit with the purpose of the check.\nWhile the name suggests checking for Unlimited Connections, you are validating the value to be less than it(-1).\nAll the above constants which are used for verification define the Max value( i.e. the Max boundary condition)\n\nI would suggest renaming this to MIN_CONN_VALUE or something similar.","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"95af1d568a9fcd2a4a23a46e4a193bdbce782705","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# Used to check maximum number of connections per second allowed"},{"line_number":48,"context_line":"# for the Loadblancer vip. -1 indicate no limit."},{"line_number":49,"context_line":"CONNECTION_UNLIMIT \u003d -1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_647ecf1a","line":49,"in_reply_to":"9a8ffd7b_303ec28c","updated":"2015-11-27 01:58:15.000000000","message":"@Reedip, thanks. I known this value may confused, but it\u0027s hard to name it. -1 is unlimit, the min conn value can be 0 or 1.\nRemove constant here?","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c49b264c0c83302eaf68b1111092e71002bee866","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# Used to check maximum number of connections per second allowed"},{"line_number":48,"context_line":"# for the Loadblancer vip. -1 indicate no limit."},{"line_number":49,"context_line":"CONNECTION_UNLIMIT \u003d -1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_c4d3fbd3","line":49,"in_reply_to":"9a8ffd7b_647ecf1a","updated":"2015-11-27 02:11:50.000000000","message":"Removing it not too logical.\nThe motivation for this patch is to verify that a user does not put any value less than -1.\nSo , I would still suggest to rename it ( keeping the above comment ) .\nLets see what the other reviewers say ?","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"4db8a919a0462faf7e000578cc9d46ae3df1cea6","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# Used to check maximum number of connections per second allowed"},{"line_number":48,"context_line":"# for the Loadblancer vip. -1 indicate no limit."},{"line_number":49,"context_line":"CONNECTION_UNLIMIT \u003d -1"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def _verify_dict_keys(expected_keys, target_dict, strict\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_47bf0daa","line":49,"in_reply_to":"9a8ffd7b_c4d3fbd3","updated":"2015-11-27 02:54:16.000000000","message":"@Reedip, agree with you.","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9a319be05ddbd1a1e8617945750b9d405d4fa645","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        return msg"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"def _validate_connection_limit(data, valid_values\u003dNone):"},{"line_number":516,"context_line":"    if int(data) \u003c CONNECTION_UNLIMIT:"},{"line_number":517,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid value, can not less than -1\") % data"},{"line_number":518,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_50bca605","line":515,"updated":"2015-11-27 00:38:11.000000000","message":"Why do you need valid_values?\nIts not used anywhere?","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"95af1d568a9fcd2a4a23a46e4a193bdbce782705","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        return msg"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"def _validate_connection_limit(data, valid_values\u003dNone):"},{"line_number":516,"context_line":"    if int(data) \u003c CONNECTION_UNLIMIT:"},{"line_number":517,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid value, can not less than -1\") % data"},{"line_number":518,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_c4b21be5","line":515,"in_reply_to":"9a8ffd7b_50bca605","updated":"2015-11-27 01:58:15.000000000","message":":) yes, it not used here, but it can\u0027t missed for convert_value.","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"4db8a919a0462faf7e000578cc9d46ae3df1cea6","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        return msg"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"def _validate_connection_limit(data, valid_values\u003dNone):"},{"line_number":516,"context_line":"    if int(data) \u003c CONNECTION_UNLIMIT:"},{"line_number":517,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid value, can not less than -1\") % data"},{"line_number":518,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_c7e9bdb8","line":515,"in_reply_to":"9a8ffd7b_6479efc7","updated":"2015-11-27 02:54:16.000000000","message":"Thanks, done.","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c49b264c0c83302eaf68b1111092e71002bee866","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        return msg"},{"line_number":513,"context_line":""},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"def _validate_connection_limit(data, valid_values\u003dNone):"},{"line_number":516,"context_line":"    if int(data) \u003c CONNECTION_UNLIMIT:"},{"line_number":517,"context_line":"        msg \u003d _(\"\u0027%s\u0027 is not a valid value, can not less than -1\") % data"},{"line_number":518,"context_line":"        LOG.debug(msg)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_6479efc7","line":515,"in_reply_to":"9a8ffd7b_c4b21be5","updated":"2015-11-27 02:11:50.000000000","message":"There are 2 ways you can handle it.\na) Remove it\nb) assign valid_values as CONNECTION_UNLIMIT ( or whatever variable name is decided at the end) in the function signature as below:\n\nAlso, suggest renaming valid_values to min_value as valid_values means a RANGE of values\n\n def _validate_connection_limit(data, min_value\u003dCONNECTION_UNLIMIT):\n    if int(data) \u003c min_value: \n        msg \u003d _(\"\u0027%s\u0027 is not a valid value, can not less than %s\") % (data,min_value)\n        LOG.debug(msg)\n        return msg","commit_id":"52552e9feaf2fc780b72616e2f062a02aa704b33"}]}
