)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"805e8bdc343f04852a9b9740c7f6b07ea3168da9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"as part of volume creation or retype."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Implements: blueprint min-max-vol-size-by-vol-type"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: Ie7a20b28b5f6b2c5d956b03f6d39f30ec10c2ed9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a57f1b5_fcb11b90","line":16,"updated":"2016-02-11 14:14:37.000000000","message":"Pretty sure this needs a doc impact tag and a release note since you are adding capabilities to Cinder.","commit_id":"1d03d62158ad4c30438025422bd68741017bf2a2"}],"cinder/volume/api.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"805e8bdc343f04852a9b9740c7f6b07ea3168da9","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        if size:"},{"line_number":332,"context_line":"            # Compare the size of the volume to any size restrictions that may"},{"line_number":333,"context_line":"            # exist on the volume type"},{"line_number":334,"context_line":"            vol_type \u003d volume_type"},{"line_number":335,"context_line":"            if not vol_type:"},{"line_number":336,"context_line":"                vol_type \u003d volume_types.get_default_volume_type()"},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a57f1b5_fc6efb2d","line":334,"updated":"2016-02-11 14:14:37.000000000","message":"Could you make vol_type something more specific? I realize its just holding the volume_type being passed in, but this logic gets confusing.","commit_id":"1d03d62158ad4c30438025422bd68741017bf2a2"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"867e8b59bcaf57725e28f3e208fa0d9a664f7fa3","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        :param req_size: integer of the requested size"},{"line_number":236,"context_line":"        :param vol_type: volume_type to check limits of"},{"line_number":237,"context_line":"        :raises InvalidInput if req_size is outside of the size restrictions"},{"line_number":238,"context_line":"        \"\"\""},{"line_number":239,"context_line":"        extra_specs \u003d vol_type.get(\u0027extra_specs\u0027, {})"},{"line_number":240,"context_line":"        min_size \u003d extra_specs.get(MIN_SIZE_KEY)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_e822ab51","line":237,"updated":"2016-02-11 17:30:15.000000000","message":"Should have a second colon after raises.","commit_id":"054fa873dc172fa8d9d69ccf5eba0a60d62866a2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"486a30c769f7b481abdc54b3b2b0aba45049e187","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        :param req_size: integer of the requested size"},{"line_number":236,"context_line":"        :param vol_type: volume_type to check limits of"},{"line_number":237,"context_line":"        :raises InvalidInput if req_size is outside of the size restrictions"},{"line_number":238,"context_line":"        \"\"\""},{"line_number":239,"context_line":"        extra_specs \u003d vol_type.get(\u0027extra_specs\u0027, {})"},{"line_number":240,"context_line":"        min_size \u003d extra_specs.get(MIN_SIZE_KEY)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_c3feb0ad","line":237,"in_reply_to":"3a57f1b5_e822ab51","updated":"2016-02-11 17:52:55.000000000","message":"Good call, will fix this.","commit_id":"054fa873dc172fa8d9d69ccf5eba0a60d62866a2"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"867e8b59bcaf57725e28f3e208fa0d9a664f7fa3","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                \u0027req_size\u0027: req_size, \u0027min_size\u0027: min_size,"},{"line_number":246,"context_line":"                \u0027vol_type\u0027: vol_type[\u0027name\u0027]"},{"line_number":247,"context_line":"            }"},{"line_number":248,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        max_size \u003d extra_specs.get(MAX_SIZE_KEY)"},{"line_number":251,"context_line":"        if max_size and req_size \u003e int(max_size):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_7d519b35","line":248,"updated":"2016-02-11 17:30:15.000000000","message":"Is this really the right exception to use for this?\n\nThis will get translated back to a 400 Bad Request, but something more like 413 might be more appropriate.\n\nI\u0027m not sure, hopefully other folks can chime in here.","commit_id":"054fa873dc172fa8d9d69ccf5eba0a60d62866a2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"486a30c769f7b481abdc54b3b2b0aba45049e187","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                \u0027req_size\u0027: req_size, \u0027min_size\u0027: min_size,"},{"line_number":246,"context_line":"                \u0027vol_type\u0027: vol_type[\u0027name\u0027]"},{"line_number":247,"context_line":"            }"},{"line_number":248,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        max_size \u003d extra_specs.get(MAX_SIZE_KEY)"},{"line_number":251,"context_line":"        if max_size and req_size \u003e int(max_size):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_e37e4c18","line":248,"in_reply_to":"3a57f1b5_7d519b35","updated":"2016-02-11 17:52:55.000000000","message":"My thought was this case was most similar to someone specifying a volume size of 0, or trying to create a volume in a consistency group when the requested vol_type doesn\u0027t support the cg, both of which we currently raise an InvalidInput for.\n\nIt\u0027s definitely worth discussing, and I look forward to hearing others\u0027 opinions on this","commit_id":"054fa873dc172fa8d9d69ccf5eba0a60d62866a2"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"0e8b454ead8d8a037ea70907a33e9d95ab24668c","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                    \"for volume type \u0027%(vol_type)s\u0027.\") % {"},{"line_number":245,"context_line":"                \u0027req_size\u0027: req_size, \u0027min_size\u0027: min_size,"},{"line_number":246,"context_line":"                \u0027vol_type\u0027: vol_type[\u0027name\u0027]"},{"line_number":247,"context_line":"            }"},{"line_number":248,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        max_size \u003d extra_specs.get(MAX_SIZE_KEY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_641a8470","line":247,"updated":"2016-02-13 20:22:13.000000000","message":"Eric Harney:\nIs this really the right exception to use for this?\nThis will get translated back to a 400 Bad Request, but something more like 413 might be more appropriate.\nI\u0027m not sure, hopefully other folks can chime in here.\n\nRyan McNair:\nMy thought was this case was most similar to someone specifying a volume size of 0, or trying to create a volume in a consistency group when the requested vol_type doesn\u0027t support the cg, both of which we currently raise an InvalidInput for.\nIt\u0027s definitely worth discussing, and I look forward to hearing others\u0027 opinions on this","commit_id":"81206a0bdc8ba99ce3fa065d20e5af60cbc2e907"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"cfda339f9e79357081e43c53de5dcaba667f6eb2","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                    \"for volume type \u0027%(vol_type)s\u0027.\") % {"},{"line_number":245,"context_line":"                \u0027req_size\u0027: req_size, \u0027min_size\u0027: min_size,"},{"line_number":246,"context_line":"                \u0027vol_type\u0027: vol_type[\u0027name\u0027]"},{"line_number":247,"context_line":"            }"},{"line_number":248,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        max_size \u003d extra_specs.get(MAX_SIZE_KEY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_e06e042e","line":247,"in_reply_to":"dae33548_2ea4a9a4","updated":"2016-03-22 21:14:48.000000000","message":"We already use 413 for exceeding quotas, so I think we\u0027ve decided... not really. :)","commit_id":"81206a0bdc8ba99ce3fa065d20e5af60cbc2e907"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"beed77f43099f1d8486935ea33255f942ccea0a2","unresolved":false,"context_lines":[{"line_number":244,"context_line":"                    \"for volume type \u0027%(vol_type)s\u0027.\") % {"},{"line_number":245,"context_line":"                \u0027req_size\u0027: req_size, \u0027min_size\u0027: min_size,"},{"line_number":246,"context_line":"                \u0027vol_type\u0027: vol_type[\u0027name\u0027]"},{"line_number":247,"context_line":"            }"},{"line_number":248,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"        max_size \u003d extra_specs.get(MAX_SIZE_KEY)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_2ea4a9a4","line":247,"in_reply_to":"dae33548_641a8470","updated":"2016-02-15 17:00:25.000000000","message":"BadRequest or InvalidParam seems ok here.  The 413 seems wrong though, IMO 413 is specific for request length itself no?","commit_id":"81206a0bdc8ba99ce3fa065d20e5af60cbc2e907"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"ec3d5074134c4ea8063d5196c993c279c58e2b11","unresolved":false,"context_lines":[{"line_number":1469,"context_line":"            LOG.error(msg)"},{"line_number":1470,"context_line":"            raise exception.InvalidInput(reason\u003dmsg)"},{"line_number":1471,"context_line":""},{"line_number":1472,"context_line":"        self._validate_volume_size_within_limits(int(volume[\u0027size\u0027]), vol_type)"},{"line_number":1473,"context_line":""},{"line_number":1474,"context_line":"        vol_type_id \u003d vol_type[\u0027id\u0027]"},{"line_number":1475,"context_line":"        vol_type_qos_id \u003d vol_type[\u0027qos_specs_id\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa0719c6_4099b01e","line":1472,"updated":"2016-03-22 21:16:20.000000000","message":"This should assume that the size is an integer already, and do an int() cast/check inside of the validate function.\n\nLess logic here, and it means that it\u0027s more clearly a validation failure when it shows up in the logs.","commit_id":"81206a0bdc8ba99ce3fa065d20e5af60cbc2e907"}]}
