)]}'
{"manila/api/v2/share_types.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"7dd1f966b9eea30b22167f9f2c4de0429ac4ebc4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        rtss \u003d constants.ExtraSpecs.REVERT_TO_SNAPSHOT_SUPPORT"},{"line_number":168,"context_line":"        if rtss in specs:"},{"line_number":169,"context_line":"            specs[rtss] \u003d share_types.parse_boolean_extra_spec("},{"line_number":170,"context_line":"                rtss, specs[rtss])"},{"line_number":171,"context_line":"        is_public \u003d share_type.get("},{"line_number":172,"context_line":"            \u0027os-share-type-access:is_public\u0027,"},{"line_number":173,"context_line":"            share_type.get(\u0027share_type_access:is_public\u0027, True),"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_2048705b","line":170,"updated":"2017-01-25 10:02:04.000000000","message":"Hi Yankee. Mountable snapshots feature has merged adding a new optional extra-spec for the share_type_create API, so this patch would need to be updated again adding support to it","commit_id":"8650ad88bdd0916fc9c45413fffa204fe63117ed"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"b14164aa8e990549fefa7e82c4ae3176bdb041f7","unresolved":false,"context_lines":[{"line_number":157,"context_line":"        if dhss in specs:"},{"line_number":158,"context_line":"            specs[dhss] \u003d share_types.parse_boolean_extra_spec("},{"line_number":159,"context_line":"                dhss, specs[dhss])"},{"line_number":160,"context_line":"        if \u0027snapshot_support\u0027 in specs:"},{"line_number":161,"context_line":"            specs[\u0027snapshot_support\u0027] \u003d share_types.parse_boolean_extra_spec("},{"line_number":162,"context_line":"                \u0027snapshot_support\u0027, specs[\u0027snapshot_support\u0027])"},{"line_number":163,"context_line":"        csfss \u003d constants.ExtraSpecs.CREATE_SHARE_FROM_SNAPSHOT_SUPPORT"}],"source_content_type":"text/x-python","patch_set":13,"id":"3a461143_b029de8b","line":160,"range":{"start_line":160,"start_character":11,"end_line":160,"end_character":29},"updated":"2017-01-26 23:00:30.000000000","message":"use constants.ExtraSpecs.SNAPSHOT_SUPPORT here and other places","commit_id":"471b362e05d4c90c5e59761a263f0e9e7ec2f3d4"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"46e137ff979c02f861cf9ac8bde365034adede37","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            share_type \u003d body[\u0027volume_type\u0027]"},{"line_number":154,"context_line":"        name \u003d share_type.get(\u0027name\u0027)"},{"line_number":155,"context_line":"        specs \u003d share_type.get(\u0027extra_specs\u0027, {})"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"        if constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS in specs:"},{"line_number":158,"context_line":"            dhss \u003d constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS"},{"line_number":159,"context_line":"            specs[dhss] \u003d share_types.parse_boolean_extra_spec("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_67c5f73a","line":156,"updated":"2017-01-27 05:52:45.000000000","message":"this block of changes should be wrapped in a try/except like below so that manila exceptions are caught and webob exceptions are raised.","commit_id":"774d618d2df9092a093d362c9775d64ea9dd0ebd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"46e137ff979c02f861cf9ac8bde365034adede37","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            mss \u003d constants.ExtraSpecs.MOUNT_SNAPSHOT_SUPPORT"},{"line_number":179,"context_line":"            specs[mss] \u003d share_types.parse_boolean_extra_spec("},{"line_number":180,"context_line":"                mss, specs[mss])"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        is_public \u003d share_type.get("},{"line_number":183,"context_line":"            \u0027os-share-type-access:is_public\u0027,"},{"line_number":184,"context_line":"            share_type.get(\u0027share_type_access:is_public\u0027, True),"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_62bfa5fb","line":181,"updated":"2017-01-27 05:52:45.000000000","message":"The above change can be done like this:\n \n        try:\n            for spec in set(specs.keys() \u0026 set(share_types.get_boolean_extra_specs()):\n                specs[spec] \u003d share_types.parse_boolean_extra_spec(spec, specs[spec])\n        except exception.InvalidExtraSpec as e:\n            raise webob.exc.HTTPBadRequest(explanation\u003dsix.text_type(e))","commit_id":"774d618d2df9092a093d362c9775d64ea9dd0ebd"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"43bd39055c245284d4ee3d766766c643e48b998e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            share_type \u003d body[\u0027volume_type\u0027]"},{"line_number":154,"context_line":"        name \u003d share_type.get(\u0027name\u0027)"},{"line_number":155,"context_line":"        specs \u003d share_type.get(\u0027extra_specs\u0027, {})"},{"line_number":156,"context_line":"        if specs:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                for key in (set(specs.keys()) \u0026"},{"line_number":159,"context_line":"                            set(share_types.get_boolean_extra_specs())):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_e7050246","line":156,"range":{"start_line":155,"start_character":7,"end_line":156,"end_character":17},"updated":"2017-02-08 12:26:29.000000000","message":"this condition does not make much if the above statement tries to guarantee that it is not None... so I guess something else is causing the problem you observed in your previous patchset. I think this will need more debugging.","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"f36e3cb80dd674dee30f4850c4984f7255920ee4","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            share_type \u003d body[\u0027volume_type\u0027]"},{"line_number":154,"context_line":"        name \u003d share_type.get(\u0027name\u0027)"},{"line_number":155,"context_line":"        specs \u003d share_type.get(\u0027extra_specs\u0027, {})"},{"line_number":156,"context_line":"        if specs:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                for key in (set(specs.keys()) \u0026"},{"line_number":159,"context_line":"                            set(share_types.get_boolean_extra_specs())):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_bff76dd1","line":156,"range":{"start_line":155,"start_character":7,"end_line":156,"end_character":17},"in_reply_to":"1a430d35_8e8529d0","updated":"2017-02-08 17:32:25.000000000","message":"I do not really like handling {} and None differently. The condition will indeed prevent extra operations from running.\n\nI\u0027d rather suggest \"specs \u003d share_type.get(\u0027extra_specs\u0027) or {}\" and the condition in this case as a nit. Either way, I am convinced there is nothing wrong about this now. Thanks Mark.","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            share_type \u003d body[\u0027volume_type\u0027]"},{"line_number":154,"context_line":"        name \u003d share_type.get(\u0027name\u0027)"},{"line_number":155,"context_line":"        specs \u003d share_type.get(\u0027extra_specs\u0027, {})"},{"line_number":156,"context_line":"        if specs:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                for key in (set(specs.keys()) \u0026"},{"line_number":159,"context_line":"                            set(share_types.get_boolean_extra_specs())):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_8e8529d0","line":156,"range":{"start_line":155,"start_character":7,"end_line":156,"end_character":17},"in_reply_to":"1a430d35_e7050246","updated":"2017-02-08 17:17:28.000000000","message":"but the above doesn\u0027t guarantee not None. The {} is only returned when the key is not found, but when extra_specs is actually set to None then it will return None. That causes a NoneType error in the below block, but somehow was OK with existing code. And no reason to do the set intersection code if not specs.","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                            set(share_types.get_boolean_extra_specs())):"},{"line_number":160,"context_line":"                    specs[key] \u003d ("},{"line_number":161,"context_line":"                        share_types.parse_boolean_extra_spec(key, specs[key]))"},{"line_number":162,"context_line":"            except exception.InvalidExtraSpec:"},{"line_number":163,"context_line":"                raise webob.exc.HTTPBadRequest()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        is_public \u003d share_type.get("}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_99a651ac","line":162,"updated":"2017-02-08 17:17:28.000000000","message":"as e","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                    specs[key] \u003d ("},{"line_number":161,"context_line":"                        share_types.parse_boolean_extra_spec(key, specs[key]))"},{"line_number":162,"context_line":"            except exception.InvalidExtraSpec:"},{"line_number":163,"context_line":"                raise webob.exc.HTTPBadRequest()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        is_public \u003d share_type.get("},{"line_number":166,"context_line":"            \u0027os-share-type-access:is_public\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_39955d32","line":163,"updated":"2017-02-08 17:17:28.000000000","message":"expanation\u003de","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        # Note(cknight): Set the default extra spec value for snapshot_support"},{"line_number":175,"context_line":"        # for API versions before it was required."},{"line_number":176,"context_line":"        if set_defaults:"},{"line_number":177,"context_line":"            if constants.ExtraSpecs.SNAPSHOT_SUPPORT not in specs:"},{"line_number":178,"context_line":"                specs[constants.ExtraSpecs.SNAPSHOT_SUPPORT] \u003d True"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_392c7d98","line":177,"range":{"start_line":177,"start_character":53,"end_line":177,"end_character":65},"updated":"2017-02-08 17:17:28.000000000","message":"This existing code fails on None specs, but only \"if set_defaults\".","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            required_extra_specs \u003d ("},{"line_number":182,"context_line":"                share_types.get_valid_required_extra_specs(specs)"},{"line_number":183,"context_line":"            )"},{"line_number":184,"context_line":"            share_types.create(context, name, specs, is_public)"},{"line_number":185,"context_line":"            share_type \u003d share_types.get_share_type_by_name(context, name)"},{"line_number":186,"context_line":"            share_type[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":187,"context_line":"            req.cache_db_share_type(share_type)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_7970c5a4","line":184,"range":{"start_line":184,"start_character":24,"end_line":184,"end_character":30},"updated":"2017-02-08 17:17:28.000000000","message":"but in create() None becomes {} and share_type is set below. So I think the above check for None is correct.","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"ff17fad412bec2d8bd1aed4b88b4726b04ba7df2","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            share_type \u003d body[\u0027volume_type\u0027]"},{"line_number":154,"context_line":"        name \u003d share_type.get(\u0027name\u0027)"},{"line_number":155,"context_line":"        specs \u003d share_type.get(\u0027extra_specs\u0027, {})"},{"line_number":156,"context_line":"        if specs:"},{"line_number":157,"context_line":"            try:"},{"line_number":158,"context_line":"                for key in (set(specs.keys()) \u0026"},{"line_number":159,"context_line":"                            set(share_types.get_boolean_extra_specs())):"},{"line_number":160,"context_line":"                    specs[key] \u003d ("},{"line_number":161,"context_line":"                        share_types.parse_boolean_extra_spec(key, specs[key]))"},{"line_number":162,"context_line":"            except exception.InvalidExtraSpec:"},{"line_number":163,"context_line":"                raise webob.exc.HTTPBadRequest()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        is_public \u003d share_type.get("},{"line_number":166,"context_line":"            \u0027os-share-type-access:is_public\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"df3967d1_0aaab86f","line":163,"range":{"start_line":156,"start_character":8,"end_line":163,"end_character":48},"updated":"2017-08-04 07:24:57.000000000","message":"Hi gouthamr: We allow use of \u003cis\u003e with extra_spec_value\n in share type, including SNAPSHOT_SUPPORT, CREATE_SHARE_FROM_SNAPSHOT_SUPPORT,  REVERT_TO_SNAPSHOT_SUPPORT, MOUNT_SNAPSHOT_SUPPORT,\n except DRIVER_HANDLES_SHARE_SERVERS, because we checked it in https://github.com/openstack/manila/blob/master/manila/share/share_types.py#L253 \nand also use of parse_boolean_extra_spec function to check it.\n\nWe only doesn\u0027t allow use of \u003cis\u003e with DHSS. Because we checked DHSS by bool_from_string function.link: https://github.com/openstack/manila/blob/master/manila/share/share_types.py#L220\n\nIf we want to allow \u003cis\u003e with DHSS,we could use parse_boolean_extra_spec to check it.\n\nIs there a strong reason for use \u0027true\u0027 instead of true?\ncode line 161. Why we just store value of \u0027\u003cis\u003e true\u0027 in share type.\n\n\n\n\ncurl -i -X POST http://192.168.98.191:8786/v2/e23850eeb91d4fa3866af634223e454c/types -H \"X-Openstack-Manila-Api-Version: 2.40\" -H \"X-Auth-Token: gAAAAABZg7gY_KT3sosgAKGysZTCXU7W6T-6MphRoJgBAnwQOq-pcf7ROGXpeFyugegPlzleeXRpih3rW5mKwtK6IQLhSj_uecnvMGz9PjHUwgHwpbQBJlFIOaIZzZ_3GtDxSZQ5I98zMeJzR4CYtQc6x_gMPQlSQ-9Fn3IOiQhIXnKjyFrM4iU\" -H \"Content-Type: application/json\" -H \"Accept: application/json\" -H \"User-Agent: python-manilaclient\" -d \u0027{\"share_type\": {\"extra_specs\": {\"driver_handles_share_servers\": false, \"snapshot_support\": \"\u003cis\u003e true\"}, \"share_type_access:is_public\": true, \"name\": \"zj_det7\"}}\u0027\nHTTP/1.1 200 OK\nDate: Fri, 04 Aug 2017 00:43:02 GMT\nServer: Apache/2.4.18 (Ubuntu)\nx-compute-request-id: req-1e445fff-53d4-4df4-bc79-110cd809bfc6\nX-OpenStack-Manila-API-Version: 2.40\nVary: X-OpenStack-Manila-API-Version\nContent-Length: 549\nContent-Type: application/json\n\n{\"share_type\": {\"required_extra_specs\": {\"driver_handles_share_servers\": false}, \"share_type_access:is_public\": true, \"extra_specs\": {\"snapshot_support\": \"\u003cis\u003e true\", \"driver_handles_share_servers\": \"False\"}, \"id\": \"878393f2-53c4-437a-a9be-71ac56cd3623\", \"name\": \"zj_det7\"}, \"volume_type\": {\"required_extra_specs\": {\"driver_handles_share_servers\": false}, \"share_type_access:is_public\": true, \"extra_specs\": {\"snapshot_support\": \"\u003cis\u003e true\", \"driver_handles_share_servers\": \"False\"}, \"id\": \"878393f2-53c4-437a-a9be-71ac56cd3623\", \"name\": \"zj_det7\"}}","commit_id":"f9bc3a005bc9ca60acb98c3147d00dba071bfd06"}],"manila/share/share_types.py":[{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"a04e3e2231605726be4b44381160bdee23aa2a59","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    return get_share_type_extra_specs(type_id)"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"def get_valid_extra_spec_value(extra_spec_key, extra_spec_value):"},{"line_number":323,"context_line":"    try:"},{"line_number":324,"context_line":"        if not isinstance(extra_spec_value, (six.string_types, bool)):"},{"line_number":325,"context_line":"            raise ValueError"}],"source_content_type":"text/x-python","patch_set":4,"id":"da4df55a_59a5dc9f","line":322,"updated":"2016-12-28 18:38:30.000000000","message":"I don\u0027t see the need of this function since parse_boolean_extra_spec func is already performing the control over the string values. Why we don\u0027t use that function instead? Refactoring if necessary of course.","commit_id":"9761cb0b8eb6e750353b5ed69ffae89098773aa6"},{"author":{"_account_id":6413,"name":"Victoria Martinez de la Cruz","email":"victoria@redhat.com","username":"vkmc"},"change_message_id":"852c838faac214948e4a79c4ddb29b52bc9f2c7d","unresolved":false,"context_lines":[{"line_number":330,"context_line":"           {\u0027key\u0027: extra_spec_key, \u0027value\u0027: extra_spec_value})"},{"line_number":331,"context_line":"    if extra_spec_value is None:"},{"line_number":332,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":333,"context_line":"    if (not isinstance(extra_spec_value, (six.string_types, bool, int))) or \\"},{"line_number":334,"context_line":"            extra_spec_value is \"\":"},{"line_number":335,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":336,"context_line":"    elif not isinstance(extra_spec_value, six.string_types):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_9a84cd0b","line":333,"updated":"2017-01-11 16:06:28.000000000","message":"NIT Avoid using \\, wrap the sentence with () instead","commit_id":"e56b2a5b54c5563d1caed458a09e6d94ebdd96bd"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"7dd1f966b9eea30b22167f9f2c4de0429ac4ebc4","unresolved":false,"context_lines":[{"line_number":332,"context_line":"           {\u0027key\u0027: extra_spec_key, \u0027value\u0027: extra_spec_value})"},{"line_number":333,"context_line":"    if extra_spec_value is None:"},{"line_number":334,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":335,"context_line":"    if (not isinstance(extra_spec_value, (six.string_types, bool, int))) or \\"},{"line_number":336,"context_line":"            extra_spec_value is \"\":"},{"line_number":337,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":338,"context_line":"    elif not isinstance(extra_spec_value, six.string_types):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_059386fb","line":335,"range":{"start_line":335,"start_character":72,"end_line":335,"end_character":77},"updated":"2017-01-25 10:02:04.000000000","message":"don\u0027t use backlashes, surround in parentheses instead","commit_id":"8650ad88bdd0916fc9c45413fffa204fe63117ed"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"b14164aa8e990549fefa7e82c4ae3176bdb041f7","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":335,"context_line":"    if (not isinstance(extra_spec_value, (six.string_types, bool, int))) or ("},{"line_number":336,"context_line":"            extra_spec_value is \"\"):"},{"line_number":337,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":338,"context_line":"    elif not isinstance(extra_spec_value, six.string_types):"},{"line_number":339,"context_line":"        extra_spec_value \u003d six.text_type(extra_spec_value)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a461143_903782af","line":337,"range":{"start_line":337,"start_character":14,"end_line":337,"end_character":32},"updated":"2017-01-26 23:00:30.000000000","message":"InvalidExtraSpec","commit_id":"471b362e05d4c90c5e59761a263f0e9e7ec2f3d4"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"3d9a807da20a9a8a253f9ad87c954142ae581563","unresolved":false,"context_lines":[{"line_number":334,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":335,"context_line":"    if (not isinstance(extra_spec_value, (six.string_types, bool, int))) or ("},{"line_number":336,"context_line":"            extra_spec_value is \"\"):"},{"line_number":337,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":338,"context_line":"    elif not isinstance(extra_spec_value, six.string_types):"},{"line_number":339,"context_line":"        extra_spec_value \u003d six.text_type(extra_spec_value)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_e03ab597","line":337,"range":{"start_line":337,"start_character":14,"end_line":337,"end_character":32},"updated":"2017-01-27 00:40:45.000000000","message":"why isn\u0027t this and exception.InvalidExtraSpec?","commit_id":"82304ec36d71dce136f92dd9a0368bd64b09de78"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"46e137ff979c02f861cf9ac8bde365034adede37","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from manila import exception"},{"line_number":31,"context_line":"from manila.i18n import _"},{"line_number":32,"context_line":"from manila.i18n import _LE"},{"line_number":33,"context_line":"from webob import exc"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"CONF \u003d cfg.CONF"},{"line_number":36,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_e2b475f3","line":33,"updated":"2017-01-27 05:52:45.000000000","message":"I don\u0027t think webob belongs here. pattern i see is to throw manila exception here and catch is if needed in caller","commit_id":"774d618d2df9092a093d362c9775d64ea9dd0ebd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"46e137ff979c02f861cf9ac8bde365034adede37","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        isinstance(extra_spec_value, (six.string_types, bool, int))"},{"line_number":340,"context_line":"        extra_spec_value is not \"\""},{"line_number":341,"context_line":"    except exception.InvalidExtraSpec:"},{"line_number":342,"context_line":"        raise exc.HTTPBadRequest(reason\u003dmsg)"},{"line_number":343,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_42caa96f","line":340,"range":{"start_line":339,"start_character":1,"end_line":340,"end_character":34},"updated":"2017-01-27 05:52:45.000000000","message":"some edit mistake happened here. These lines don\u0027t make sense anymore.","commit_id":"774d618d2df9092a093d362c9775d64ea9dd0ebd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"46e137ff979c02f861cf9ac8bde365034adede37","unresolved":false,"context_lines":[{"line_number":338,"context_line":"    try:"},{"line_number":339,"context_line":"        isinstance(extra_spec_value, (six.string_types, bool, int))"},{"line_number":340,"context_line":"        extra_spec_value is not \"\""},{"line_number":341,"context_line":"    except exception.InvalidExtraSpec:"},{"line_number":342,"context_line":"        raise exc.HTTPBadRequest(reason\u003dmsg)"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    if not isinstance(extra_spec_value, six.string_types):"},{"line_number":345,"context_line":"        extra_spec_value \u003d six.text_type(extra_spec_value)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_02afc194","line":342,"range":{"start_line":341,"start_character":4,"end_line":342,"end_character":44},"updated":"2017-01-27 05:52:45.000000000","message":"I think the patter is to throw InvalidExtraSpec here.  Let the caller map to HTTP exceptions if needed.","commit_id":"774d618d2df9092a093d362c9775d64ea9dd0ebd"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    This method returns the boolean value of an extra spec value.  If"},{"line_number":328,"context_line":"    the value does not conform to the standard boolean pattern, it raises"},{"line_number":329,"context_line":"    an InvalidExtraSpec or a HTTPBadRequest exception depend on type of value."},{"line_number":330,"context_line":"    \"\"\""},{"line_number":331,"context_line":"    msg \u003d (_(\u0027Invalid boolean extra spec %(key)s : %(value)s\u0027) %"},{"line_number":332,"context_line":"           {\u0027key\u0027: extra_spec_key, \u0027value\u0027: extra_spec_value})"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_bcdec40e","line":329,"range":{"start_line":329,"start_character":24,"end_line":329,"end_character":77},"updated":"2017-02-08 00:20:25.000000000","message":"This is used elsewhere.. not just in the API. You shouldn\u0027t raise BadRequest. \nThe way to do it would be to raise InvalidExtraSpec and catch the exception in the API and cast it to a BadRequest. \n\nAlso remember, that our wsgi app is smart enough to do this automatically for you since InvalidExtraSpec has a code set to 400, which is the same as of exc.HTTPBadRequest","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":328,"context_line":"    the value does not conform to the standard boolean pattern, it raises"},{"line_number":329,"context_line":"    an InvalidExtraSpec or a HTTPBadRequest exception depend on type of value."},{"line_number":330,"context_line":"    \"\"\""},{"line_number":331,"context_line":"    msg \u003d (_(\u0027Invalid boolean extra spec %(key)s : %(value)s\u0027) %"},{"line_number":332,"context_line":"           {\u0027key\u0027: extra_spec_key, \u0027value\u0027: extra_spec_value})"},{"line_number":333,"context_line":"    if extra_spec_value is None:"},{"line_number":334,"context_line":"        raise exception.InvalidExtraSpec(reason\u003dmsg)"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"    if (not isinstance(extra_spec_value, (six.string_types, bool, int))) or ("},{"line_number":337,"context_line":"            extra_spec_value is \"\"):"},{"line_number":338,"context_line":"        raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"    elif not isinstance(extra_spec_value, six.string_types):"},{"line_number":340,"context_line":"        extra_spec_value \u003d six.text_type(extra_spec_value)"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_9ced88b9","line":338,"range":{"start_line":331,"start_character":0,"end_line":338,"end_character":49},"updated":"2017-02-08 00:20:25.000000000","message":"Why do you have to do this?\n\nIf you cast it to string and it\u0027s not equal to the regex below it *will* raise an exception.. you don\u0027t need this extra-validation..","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"}],"manila/tests/api/v2/test_share_types.py":[{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"7dd1f966b9eea30b22167f9f2c4de0429ac4ebc4","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            spec_driver_handles_share_servers"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    if create_share_from_snapshot_support is not None:"},{"line_number":107,"context_line":"        extra_specs[constants.ExtraSpecs.CREATE_SHARE_FROM_SNAPSHOT_SUPPORT]\\"},{"line_number":108,"context_line":"            \u003d create_share_from_snapshot_support"},{"line_number":109,"context_line":"    if revert_to_snapshot_support is not None:"},{"line_number":110,"context_line":"        extra_specs[constants.ExtraSpecs.REVERT_TO_SNAPSHOT_SUPPORT] \u003d\\"},{"line_number":111,"context_line":"            revert_to_snapshot_support"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    body \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_859e9605","line":110,"range":{"start_line":107,"start_character":8,"end_line":110,"end_character":71},"updated":"2017-01-25 10:02:04.000000000","message":"don\u0027t use backlashes, surround in parenthesis instead","commit_id":"8650ad88bdd0916fc9c45413fffa204fe63117ed"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"456b92eb9f23f12e9abb4c4839412ee834c74ec5","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        extra_specs \u003d {}"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    if spec_driver_handles_share_servers is not None:"},{"line_number":104,"context_line":"        extra_specs[constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS] \u003d("},{"line_number":105,"context_line":"            spec_driver_handles_share_servers)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    if create_share_from_snapshot_support is not None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a461143_ddedec26","line":104,"range":{"start_line":104,"start_character":72,"end_line":104,"end_character":73},"updated":"2017-01-25 17:30:34.000000000","message":"needs a space here","commit_id":"bac54d137f329e321a0e93c8d75171fd4ddb635c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"456b92eb9f23f12e9abb4c4839412ee834c74ec5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            spec_driver_handles_share_servers)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    if create_share_from_snapshot_support is not None:"},{"line_number":108,"context_line":"        extra_specs[constants.ExtraSpecs.CREATE_SHARE_FROM_SNAPSHOT_SUPPORT]\\"},{"line_number":109,"context_line":"            \u003d create_share_from_snapshot_support"},{"line_number":110,"context_line":"    if revert_to_snapshot_support is not None:"},{"line_number":111,"context_line":"        extra_specs[constants.ExtraSpecs.REVERT_TO_SNAPSHOT_SUPPORT] \u003d("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a461143_bdcf40b2","line":108,"range":{"start_line":108,"start_character":76,"end_line":108,"end_character":77},"updated":"2017-01-25 17:30:34.000000000","message":"do not use backlashes, please surround in parenthesis","commit_id":"bac54d137f329e321a0e93c8d75171fd4ddb635c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"456b92eb9f23f12e9abb4c4839412ee834c74ec5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        extra_specs[constants.ExtraSpecs.CREATE_SHARE_FROM_SNAPSHOT_SUPPORT]\\"},{"line_number":109,"context_line":"            \u003d create_share_from_snapshot_support"},{"line_number":110,"context_line":"    if revert_to_snapshot_support is not None:"},{"line_number":111,"context_line":"        extra_specs[constants.ExtraSpecs.REVERT_TO_SNAPSHOT_SUPPORT] \u003d("},{"line_number":112,"context_line":"            revert_to_snapshot_support)"},{"line_number":113,"context_line":"    if mount_snapshot_support is not None:"},{"line_number":114,"context_line":"        extra_specs[constants.ExtraSpecs.MOUNT_SNAPSHOT_SUPPORT] \u003d("}],"source_content_type":"text/x-python","patch_set":9,"id":"3a461143_3ddd1071","line":111,"range":{"start_line":111,"start_character":70,"end_line":111,"end_character":71},"updated":"2017-01-25 17:30:34.000000000","message":"space here as well","commit_id":"bac54d137f329e321a0e93c8d75171fd4ddb635c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"456b92eb9f23f12e9abb4c4839412ee834c74ec5","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        extra_specs[constants.ExtraSpecs.REVERT_TO_SNAPSHOT_SUPPORT] \u003d("},{"line_number":112,"context_line":"            revert_to_snapshot_support)"},{"line_number":113,"context_line":"    if mount_snapshot_support is not None:"},{"line_number":114,"context_line":"        extra_specs[constants.ExtraSpecs.MOUNT_SNAPSHOT_SUPPORT] \u003d("},{"line_number":115,"context_line":"            mount_snapshot_support)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    body \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a461143_5ddadc79","line":114,"range":{"start_line":114,"start_character":66,"end_line":114,"end_character":67},"updated":"2017-01-25 17:30:34.000000000","message":"space here as well","commit_id":"bac54d137f329e321a0e93c8d75171fd4ddb635c"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"4123b0d14915dd72fa8f19155dcf5f7aea92e968","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def make_create_body(name\u003d\"test_share_1\", extra_specs\u003dNone,"},{"line_number":96,"context_line":"                     spec_driver_handles_share_servers\u003dTrue,"},{"line_number":97,"context_line":"                     create_share_from_snapshot_support\u003dTrue,"},{"line_number":98,"context_line":"                     revert_to_snapshot_support\u003dTrue,"},{"line_number":99,"context_line":"                     mount_snapshot_support\u003dTrue):"},{"line_number":100,"context_line":"    if not extra_specs:"},{"line_number":101,"context_line":"        extra_specs \u003d {}"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a461143_812105b7","line":99,"range":{"start_line":97,"start_character":21,"end_line":99,"end_character":48},"updated":"2017-01-26 18:50:34.000000000","message":"I guess you could make a test with \"\u003cis\u003e\" inputs","commit_id":"471b362e05d4c90c5e59761a263f0e9e7ec2f3d4"},{"author":{"_account_id":14567,"name":"Rodrigo Barbieri","email":"rodrigo.barbieri2010@gmail.com","username":"ganso"},"change_message_id":"87898ab7e2aca140cc7b50e088c3df65bbe7919c","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def make_create_body(name\u003d\"test_share_1\", extra_specs\u003dNone,"},{"line_number":96,"context_line":"                     spec_driver_handles_share_servers\u003dTrue,"},{"line_number":97,"context_line":"                     create_share_from_snapshot_support\u003dTrue,"},{"line_number":98,"context_line":"                     revert_to_snapshot_support\u003dTrue,"},{"line_number":99,"context_line":"                     mount_snapshot_support\u003dTrue):"},{"line_number":100,"context_line":"    if not extra_specs:"},{"line_number":101,"context_line":"        extra_specs \u003d {}"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"3a461143_efe607b3","line":99,"range":{"start_line":97,"start_character":21,"end_line":99,"end_character":48},"in_reply_to":"3a461143_812105b7","updated":"2017-01-27 17:14:48.000000000","message":"disregard this comment, I did not see additional tests below.","commit_id":"471b362e05d4c90c5e59761a263f0e9e7ec2f3d4"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":389,"context_line":"    @ddt.data(make_create_body(\"share_type_1\"),"},{"line_number":390,"context_line":"              make_create_body(spec_driver_handles_share_servers\u003dTrue),"},{"line_number":391,"context_line":"              make_create_body(spec_driver_handles_share_servers\u003dFalse),"},{"line_number":392,"context_line":"              make_create_body(spec_driver_handles_share_servers\u003d\"\u003cis\u003e TRue\"),"},{"line_number":393,"context_line":"              make_create_body(spec_driver_handles_share_servers\u003d\"\u003cIS\u003e False\"),"},{"line_number":394,"context_line":"              make_create_body(create_share_from_snapshot_support\u003d\"\u003cis\u003e TRue\"),"},{"line_number":395,"context_line":"              make_create_body(revert_to_snapshot_support\u003d\"\u003cis\u003e False\"),"},{"line_number":396,"context_line":"              make_create_body(mount_snapshot_support\u003d\"\u003cis\u003e False\"),"},{"line_number":397,"context_line":"              make_create_body(\"share_type_1\", {"},{"line_number":398,"context_line":"                  \"driver_handles_share_servers\": \"\u003cis\u003e true\","},{"line_number":399,"context_line":"                  \"snapshot_support\": \"\u003cIs\u003e trUe\","},{"line_number":400,"context_line":"                  \"create_share_from_snapshot_support\": \"\u003cIS\u003e False\","},{"line_number":401,"context_line":"                  \"revert_to_snapshot_support\": \"\u003cis\u003e false\","},{"line_number":402,"context_line":"                  \"mount_snapshot_support\": \"\u003cis\u003e True\"}))"},{"line_number":403,"context_line":"    def test_create_2_23(self, body):"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types\u0027, version\u003d\"2.23\")"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_7cfa9c44","line":402,"range":{"start_line":392,"start_character":0,"end_line":402,"end_character":58},"updated":"2017-02-08 00:20:25.000000000","message":"don\u0027t modify this test.. create a new test.. \n\nWhat this test is doing is this:\n\n It\u0027s setting the required extra-spec and expecting to get the \"default\" behavior out of the API.. \n\n Until API version 2.23, \"snapshot_support\" was a required extra-spec used to have a default value... that\u0027s what this test is checking for...","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"e2ef07b4fac3d03e78b613f417dcb21f2c7fdb07","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS: True,"},{"line_number":420,"context_line":"                constants.ExtraSpecs.SNAPSHOT_SUPPORT: True,"},{"line_number":421,"context_line":"            }"},{"line_number":422,"context_line":"            expected_extra_specs.update(body[\u0027share_type\u0027][\u0027extra_specs\u0027])"},{"line_number":423,"context_line":"        else:"},{"line_number":424,"context_line":"            expected_extra_specs \u003d body[\u0027share_type\u0027][\u0027extra_specs\u0027]"},{"line_number":425,"context_line":"        share_types.create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_dc6470ba","line":422,"range":{"start_line":422,"start_character":40,"end_line":422,"end_character":73},"updated":"2017-02-07 23:57:52.000000000","message":"The condition above says this param is None. So this update() would fail.  So I\u0027d think this if/else change should be reverted back to as it was.","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":419,"context_line":"                constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS: True,"},{"line_number":420,"context_line":"                constants.ExtraSpecs.SNAPSHOT_SUPPORT: True,"},{"line_number":421,"context_line":"            }"},{"line_number":422,"context_line":"            expected_extra_specs.update(body[\u0027share_type\u0027][\u0027extra_specs\u0027])"},{"line_number":423,"context_line":"        else:"},{"line_number":424,"context_line":"            expected_extra_specs \u003d body[\u0027share_type\u0027][\u0027extra_specs\u0027]"},{"line_number":425,"context_line":"        share_types.create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_fc576c57","line":422,"range":{"start_line":422,"start_character":40,"end_line":422,"end_character":73},"in_reply_to":"1a430d35_dc6470ba","updated":"2017-02-08 00:20:25.000000000","message":"+1. I don\u0027t see the point of the check:\n\n if body[\u0027share_type\u0027][\u0027extra_specs\u0027] is None:","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        for extra_spec in constants.ExtraSpecs.REQUIRED:"},{"line_number":454,"context_line":"            self.assertIn(extra_spec,"},{"line_number":455,"context_line":"                          res_dict[\u0027share_type\u0027][\u0027required_extra_specs\u0027])"},{"line_number":456,"context_line":"        if body[\u0027share_type\u0027][\u0027extra_specs\u0027] is None:"},{"line_number":457,"context_line":"            expected_extra_specs \u003d {"},{"line_number":458,"context_line":"                constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS: True,"},{"line_number":459,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_dcc2b0e8","line":456,"range":{"start_line":456,"start_character":11,"end_line":456,"end_character":52},"updated":"2017-02-08 00:20:25.000000000","message":"when will this be None, apart from the first input in the DDT (line 428)","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            expected_extra_specs \u003d {"},{"line_number":458,"context_line":"                constants.ExtraSpecs.DRIVER_HANDLES_SHARE_SERVERS: True,"},{"line_number":459,"context_line":"            }"},{"line_number":460,"context_line":"            expected_extra_specs.update(body[\u0027share_type\u0027][\u0027extra_specs\u0027])"},{"line_number":461,"context_line":"        else:"},{"line_number":462,"context_line":"            expected_extra_specs \u003d body[\u0027share_type\u0027][\u0027extra_specs\u0027]"},{"line_number":463,"context_line":"        share_types.create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_7ca8dc20","line":460,"range":{"start_line":460,"start_character":12,"end_line":460,"end_character":74},"updated":"2017-02-08 00:20:25.000000000","message":"if it is None, what do you have to append here..","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":462,"context_line":"            expected_extra_specs \u003d body[\u0027share_type\u0027][\u0027extra_specs\u0027]"},{"line_number":463,"context_line":"        share_types.create.assert_called_once_with("},{"line_number":464,"context_line":"            mock.ANY, body[\u0027share_type\u0027][\u0027name\u0027], expected_extra_specs, True)"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    @ddt.data(None,"},{"line_number":467,"context_line":"              make_create_body(\"\"),"},{"line_number":468,"context_line":"              make_create_body(\"n\" * 256),"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_fc6a0cec","line":465,"range":{"start_line":465,"start_character":0,"end_line":465,"end_character":0},"updated":"2017-02-08 00:20:25.000000000","message":"Create a separate test for the cases you\u0027re trying to test. I would try to set any of the extra-specs with an \u003cis\u003e True or \u003cis\u003e False value and see whether the share type is created with the correct True or False values..","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def make_create_body(name\u003d\"test_share_1\", extra_specs\u003dNone,"},{"line_number":96,"context_line":"                     spec_driver_handles_share_servers\u003dTrue,"},{"line_number":97,"context_line":"                     create_share_from_snapshot_support\u003dTrue,"},{"line_number":98,"context_line":"                     revert_to_snapshot_support\u003dTrue,"},{"line_number":99,"context_line":"                     mount_snapshot_support\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_147ce8ea","line":96,"updated":"2017-02-08 17:17:28.000000000","message":"why isn\u0027t \"snapshot_support\" needed too?","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":446,"context_line":"                  \"create_share_from_snapshot_support\": \"\u003cIS\u003e False\","},{"line_number":447,"context_line":"                  \"revert_to_snapshot_support\": \"\u003cis\u003e false\","},{"line_number":448,"context_line":"                  \"mount_snapshot_support\": \"\u003cis\u003e True\"}))"},{"line_number":449,"context_line":"    def test_create_is_request(self, body):"},{"line_number":450,"context_line":"        req \u003d fakes.HTTPRequest.blank(\u0027/v2/fake/types\u0027)"},{"line_number":451,"context_line":"        self.assertEqual(0, len(fake_notifier.NOTIFICATIONS))"},{"line_number":452,"context_line":"        res_dict \u003d self.controller._create(req, body)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_b9aead2b","line":449,"updated":"2017-02-08 17:17:28.000000000","message":"Please add a blank lines so that it is formatted like this: mock/setup, blank line, make call, blank line, assert expected results. The 2 tests above follow this example (others in this file don\u0027t but we\u0027re moving that direction).","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"},{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"8c224bbd5c0dbdb982858aabae4197f7e99a4fed","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        self.assertEqual(1, len(fake_notifier.NOTIFICATIONS))"},{"line_number":454,"context_line":"        self.assertEqual(2, len(res_dict))"},{"line_number":455,"context_line":"        self.assertEqual(\u0027share_type_1\u0027, res_dict[\u0027share_type\u0027][\u0027name\u0027])"},{"line_number":456,"context_line":"        self.assertEqual(\u0027share_type_1\u0027, res_dict[\u0027volume_type\u0027][\u0027name\u0027])"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    @ddt.data(None,"},{"line_number":459,"context_line":"              make_create_body(\"\"),"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a430d35_943d38c6","line":456,"updated":"2017-02-08 17:17:28.000000000","message":"here you need that all the trues come back as True and all the Falses come back as False.","commit_id":"441c58edb96811929be6a9684bb020b93e399cbd"}],"manila/tests/test_context.py":[{"author":{"_account_id":11047,"name":"Mark Sturdevant","email":"mark.sturdevant@ibm.com","username":"markstur"},"change_message_id":"afb8f5522bbda58c06e0c5035e8af5235e3ec496","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                          setattr,"},{"line_number":63,"context_line":"                          ctxt,"},{"line_number":64,"context_line":"                          \u0027read_deleted\u0027,"},{"line_number":65,"context_line":"                          True)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_7feffbe8","line":65,"updated":"2017-02-07 17:37:27.000000000","message":"why was a test removed here?","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"52748bc62810585b23659a0bc0c1d4a2fac8948f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                          setattr,"},{"line_number":63,"context_line":"                          ctxt,"},{"line_number":64,"context_line":"                          \u0027read_deleted\u0027,"},{"line_number":65,"context_line":"                          True)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a430d35_1c47d877","line":65,"in_reply_to":"1a430d35_7feffbe8","updated":"2017-02-08 00:20:25.000000000","message":"Looks like it was a rebase issue. We removed this test in https://review.openstack.org/#/c/426492/","commit_id":"f7a4bbc397bbd7b07133679910de3cc9c5c4d952"}]}
