)]}'
{"manila/api/v2/share_types.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"ecedb3c6aba15d9ab57dced91770bff20b36754f","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        \"\"\"Return a single share type item.\"\"\""},{"line_number":69,"context_line":"        context \u003d req.environ[\u0027manila.context\u0027]"},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            share_type \u003d share_types.get_show_type(context, id)"},{"line_number":72,"context_line":"        except exception.NotFound:"},{"line_number":73,"context_line":"            msg \u003d _(\"Share type not found.\")"},{"line_number":74,"context_line":"            raise exc.HTTPNotFound(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_b633d4f5","line":71,"range":{"start_line":71,"start_character":37,"end_line":71,"end_character":50},"updated":"2017-12-12 08:15:57.000000000","message":"It looks a little wired about this name. How about we just add the method in this place instead of add a new function in https://review.openstack.org/#/c/522126/7/manila/share/share_types.py?","commit_id":"33a16e245396644b748de31bfed9866bf74c64f0"}],"manila/share/share_types.py":[{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"1673e6168b8a42d9f915e7c2b71d6a6067f3ee79","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    return db.share_type_get(ctxt, id, expected_fields\u003dexpected_fields)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"def get_share_type_by_name(context, name):"},{"line_number":136,"context_line":"    \"\"\"Retrieves single share type by name.\"\"\""},{"line_number":137,"context_line":"    if name is None:"},{"line_number":138,"context_line":"        msg \u003d _(\"name cannot be None\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_b4bcd8dc","line":135,"range":{"start_line":135,"start_character":4,"end_line":135,"end_character":42},"updated":"2017-11-22 06:53:04.000000000","message":"It looks like we don\u0027t have to change all the get_share_type_by_name behaviors,  we don\u0027t have to add share_types[\u0027required_extra_specs\u0027]  in some places: such as:\nhttps://github.com/openstack/manila/blob/master/manila/share/share_types.py#L144","commit_id":"c4db7c94e034c47dd6013bdc59b35f27b6b6621d"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"1673e6168b8a42d9f915e7c2b71d6a6067f3ee79","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        raise exception.InvalidShareType(reason\u003dmsg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    required_extra_specs \u003d {}"},{"line_number":142,"context_line":"    share_types \u003d db.share_type_get_by_name(context, name)"},{"line_number":143,"context_line":"    try:"},{"line_number":144,"context_line":"        required_extra_specs \u003d get_valid_required_extra_specs("},{"line_number":145,"context_line":"            share_types[\u0027extra_specs\u0027])"},{"line_number":146,"context_line":"    except exception.InvalidExtraSpec:"},{"line_number":147,"context_line":"        LOG.exception(\u0027Share type %(share_type)s has invalid required\u0027"},{"line_number":148,"context_line":"                      \u0027 extra specs.\u0027, {\u0027share_type\u0027: name})"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    share_types[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":151,"context_line":"    return share_types"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def get_share_type_by_name_or_id(context, share_type\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_d4d5dc44","line":151,"range":{"start_line":142,"start_character":4,"end_line":151,"end_character":22},"updated":"2017-11-22 06:53:04.000000000","message":"It looks like we have double get_valid_required_extra_specs in this place, please see the following links.\n\nhttps://github.com/openstack/manila/blob/master/manila/api/v2/share_types.py#L176\nhttps://github.com/openstack/manila/blob/master/manila/api/v2/share_types.py#L173","commit_id":"c4db7c94e034c47dd6013bdc59b35f27b6b6621d"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"b6c236e0f8c1a0df413f5a5037dd8c6b65d1e76e","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    share_types \u003d {}"},{"line_number":169,"context_line":"    try:"},{"line_number":170,"context_line":"        share_types \u003d get_share_type_by_name(ctxt, name)"},{"line_number":171,"context_line":"        required_extra_specs \u003d get_valid_required_extra_specs("},{"line_number":172,"context_line":"            share_types[\u0027extra_specs\u0027])"},{"line_number":173,"context_line":"        share_types[\u0027required_extra_specs\u0027] \u003d required_extra_specs"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_6825feaa","line":170,"range":{"start_line":170,"start_character":8,"end_line":170,"end_character":19},"updated":"2017-11-22 18:55:11.000000000","message":"Should this variable be \u0027share_type\u0027 rather than \u0027share_types\u0027?","commit_id":"08583b4c0923d8fc1233617bdaabbdf787e89a23"},{"author":{"_account_id":25456,"name":"junboli","email":"junbo85.li@gmail.com","username":"junboli"},"change_message_id":"8fbb76cd161b7fa5be8b4bdd9707a91fad7126a7","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    share_types \u003d {}"},{"line_number":169,"context_line":"    try:"},{"line_number":170,"context_line":"        share_types \u003d get_share_type_by_name(ctxt, name)"},{"line_number":171,"context_line":"        required_extra_specs \u003d get_valid_required_extra_specs("},{"line_number":172,"context_line":"            share_types[\u0027extra_specs\u0027])"},{"line_number":173,"context_line":"        share_types[\u0027required_extra_specs\u0027] \u003d required_extra_specs"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff82abbf_20bdbfd7","line":170,"range":{"start_line":170,"start_character":8,"end_line":170,"end_character":19},"in_reply_to":"ff82abbf_6825feaa","updated":"2017-11-23 08:00:55.000000000","message":"Yes, should be share_type. Thanks.","commit_id":"08583b4c0923d8fc1233617bdaabbdf787e89a23"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"ecedb3c6aba15d9ab57dced91770bff20b36754f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    return db.share_type_get(ctxt, id, expected_fields\u003dexpected_fields)"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"def get_show_type(ctxt, id, expected_fields\u003dNone):"},{"line_number":137,"context_line":"    share_type \u003d get_share_type(ctxt, id)"},{"line_number":138,"context_line":"    required_extra_specs \u003d {}"},{"line_number":139,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_931fc26a","line":136,"range":{"start_line":136,"start_character":28,"end_line":136,"end_character":48},"updated":"2017-12-12 08:15:57.000000000","message":"Doesn\u0027t work?","commit_id":"33a16e245396644b748de31bfed9866bf74c64f0"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"ecedb3c6aba15d9ab57dced91770bff20b36754f","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        required_extra_specs \u003d get_valid_required_extra_specs("},{"line_number":141,"context_line":"            share_type[\u0027extra_specs\u0027])"},{"line_number":142,"context_line":"    except exception.InvalidExtraSpec:"},{"line_number":143,"context_line":"        LOG.exception(\u0027Share type %(share_type)s has invalid required\u0027"},{"line_number":144,"context_line":"                      \u0027 extra specs.\u0027, {\u0027share_type_id\u0027: id})"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    share_type[\u0027required_extra_specs\u0027] \u003d required_extra_specs"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_73331e15","line":143,"range":{"start_line":143,"start_character":36,"end_line":143,"end_character":46},"updated":"2017-12-12 08:15:57.000000000","message":"share_type_id?","commit_id":"33a16e245396644b748de31bfed9866bf74c64f0"},{"author":{"_account_id":15100,"name":"zhongjun","email":"jun.zhongjun2@gmail.com","username":"zhongjun2"},"change_message_id":"ecedb3c6aba15d9ab57dced91770bff20b36754f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            share_type[\u0027extra_specs\u0027])"},{"line_number":142,"context_line":"    except exception.InvalidExtraSpec:"},{"line_number":143,"context_line":"        LOG.exception(\u0027Share type %(share_type)s has invalid required\u0027"},{"line_number":144,"context_line":"                      \u0027 extra specs.\u0027, {\u0027share_type_id\u0027: id})"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    share_type[\u0027required_extra_specs\u0027] \u003d required_extra_specs"},{"line_number":147,"context_line":"    return share_type"}],"source_content_type":"text/x-python","patch_set":7,"id":"df87a7cf_135df245","line":144,"range":{"start_line":144,"start_character":41,"end_line":144,"end_character":54},"updated":"2017-12-12 08:15:57.000000000","message":"There isn\u0027t a parameter named \u0027share_type_id\u0027 in message \u0027Share type %(share_type)s has invalid required.....\u0027","commit_id":"33a16e245396644b748de31bfed9866bf74c64f0"}]}
