)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To leverage role based properties protection, \"property_protection_file\""},{"line_number":10,"context_line":"and \"property_protection_rule_format\" should be turned on in `cinder.conf`."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"`property-protections.conf` should be presented, typically, drop this file"},{"line_number":13,"context_line":"in `/etc/cinder/` directory, sample configuration files are provided with"},{"line_number":14,"context_line":"the source."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"9a1a9d01_c84aad83","line":11,"updated":"2015-09-25 15:21:32.000000000","message":"This next sentence is a bit tough to follow","commit_id":"bd687472ab04bb01131987ac27238746a5184132"}],"cinder/api/contrib/volume_image_metadata.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"88365ce3f85f91dd4c878064b56f05ae3c4c40c3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if property_utils.is_property_protection_enabled():"},{"line_number":58,"context_line":"            property_rules \u003d property_utils.PropertyRules(self.policy)"},{"line_number":59,"context_line":"            return property_rules"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            return None"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_all_images_metadata(self, context):"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_dde4d6ac","line":60,"updated":"2015-05-22 17:47:13.000000000","message":"No need of else here...","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8957cac0d5c5918584a837266ad68447dab18121","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if property_utils.is_property_protection_enabled():"},{"line_number":58,"context_line":"            property_rules \u003d property_utils.PropertyRules(self.policy)"},{"line_number":59,"context_line":"            return property_rules"},{"line_number":60,"context_line":"        else:"},{"line_number":61,"context_line":"            return None"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_all_images_metadata(self, context):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_1802dc6f","line":60,"in_reply_to":"7a016987_dde4d6ac","updated":"2015-06-09 05:44:22.000000000","message":"Done","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"},{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"88365ce3f85f91dd4c878064b56f05ae3c4c40c3","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                self.property_rules \u003d self._get_prop_protection_rules()"},{"line_number":187,"context_line":"                if self.property_rules:"},{"line_number":188,"context_line":"                    if self.property_rules.check_property_rules("},{"line_number":189,"context_line":"                            key, \u0027delete\u0027, context):"},{"line_number":190,"context_line":"                        pass"},{"line_number":191,"context_line":"                    else:"},{"line_number":192,"context_line":"                        raise exception.ReservedProperty(property\u003dkey)"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_1ddf0eda","line":189,"updated":"2015-05-22 17:47:13.000000000","message":"Please combine these two conditions with \"and\":\n\nif self.property_rules and not self.property_rules.check_property_rules(key, \u0027delete\u0027, context):\n    raise exception.ReservedProperty(property\u003dkey)","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8957cac0d5c5918584a837266ad68447dab18121","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                self.property_rules \u003d self._get_prop_protection_rules()"},{"line_number":187,"context_line":"                if self.property_rules:"},{"line_number":188,"context_line":"                    if self.property_rules.check_property_rules("},{"line_number":189,"context_line":"                            key, \u0027delete\u0027, context):"},{"line_number":190,"context_line":"                        pass"},{"line_number":191,"context_line":"                    else:"},{"line_number":192,"context_line":"                        raise exception.ReservedProperty(property\u003dkey)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_d83b2437","line":189,"in_reply_to":"7a016987_1ddf0eda","updated":"2015-06-09 05:44:22.000000000","message":"Done","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"5c5011d3a68ff53f923486396bc4b657007d40d5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            result \u003d self.volume_api.get_volume_image_metadata(context,"},{"line_number":94,"context_line":"                                                               volume)"},{"line_number":95,"context_line":"        except exception.VolumeNotFound:"},{"line_number":96,"context_line":"            msg \u003d _(\u0027volume does not exist\u0027)"},{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":98,"context_line":"        except exception.GlanceMetadataNotFound:"},{"line_number":99,"context_line":"            result \u003d []"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_aa738a14","line":96,"updated":"2015-07-13 16:06:48.000000000","message":"I suggest: \"Volume does not exist.\"","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"210b6af16d2d31de8dcea587b09fc85b6640dfc7","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            result \u003d self.volume_api.get_volume_image_metadata(context,"},{"line_number":94,"context_line":"                                                               volume)"},{"line_number":95,"context_line":"        except exception.VolumeNotFound:"},{"line_number":96,"context_line":"            msg \u003d _(\u0027volume does not exist\u0027)"},{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":98,"context_line":"        except exception.GlanceMetadataNotFound:"},{"line_number":99,"context_line":"            result \u003d []"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_e5476449","line":96,"in_reply_to":"9a41bdd9_aa738a14","updated":"2015-07-14 08:39:11.000000000","message":"Done","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            result \u003d self.volume_api.get_volume_image_metadata(context,"},{"line_number":94,"context_line":"                                                               volume)"},{"line_number":95,"context_line":"        except exception.VolumeNotFound:"},{"line_number":96,"context_line":"            msg \u003d _(\u0027volume does not exist.\u0027)"},{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":98,"context_line":"        except exception.GlanceMetadataNotFound:"},{"line_number":99,"context_line":"            result \u003d []"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_e0d2daff","line":96,"updated":"2015-07-27 21:04:49.000000000","message":"Please start with uppercase V.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            result \u003d self.volume_api.get_volume_image_metadata(context,"},{"line_number":94,"context_line":"                                                               volume)"},{"line_number":95,"context_line":"        except exception.VolumeNotFound:"},{"line_number":96,"context_line":"            msg \u003d _(\u0027volume does not exist.\u0027)"},{"line_number":97,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003dmsg)"},{"line_number":98,"context_line":"        except exception.GlanceMetadataNotFound:"},{"line_number":99,"context_line":"            result \u003d []"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_e14652bf","line":96,"in_reply_to":"3a50d1a3_e0d2daff","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        return meta"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _get_prop_protection_rules(self):"},{"line_number":57,"context_line":"        if property_utils.is_property_protection_enabled():"},{"line_number":58,"context_line":"            property_rules \u003d property_utils.PropertyRules(self.policy)"},{"line_number":59,"context_line":"            return property_rules"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"9a1a9d01_685cc14b","line":57,"updated":"2015-09-25 15:21:32.000000000","message":"Could just return on line 58","commit_id":"bd687472ab04bb01131987ac27238746a5184132"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":136,"context_line":"            except (KeyError, TypeError):"},{"line_number":137,"context_line":"                msg \u003d _(\"Malformed request body.\")"},{"line_number":138,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"            self.property_rules \u003d self._get_prop_protection_rules()"},{"line_number":141,"context_line":"            if self.property_rules:"},{"line_number":142,"context_line":"                self._check_policy_for_creation(context, metadata, id)"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a1a9d01_0bf2dfd2","line":139,"updated":"2015-09-25 15:21:32.000000000","message":"Are we using this instance object \"self.property_rules\" elsewhere?  If not we should just move \"self._get_prop_protection_rules()\" into if","commit_id":"bd687472ab04bb01131987ac27238746a5184132"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":176,"context_line":"        context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":177,"context_line":"        if authorize(context):"},{"line_number":178,"context_line":"            try:"},{"line_number":179,"context_line":"                key \u003d body[\u0027os-unset_image_metadata\u0027][\u0027key\u0027]"},{"line_number":180,"context_line":"                self.property_rules \u003d self._get_prop_protection_rules()"},{"line_number":181,"context_line":"                if (self.property_rules and not"},{"line_number":182,"context_line":"                    self.property_rules.check_property_rules("}],"source_content_type":"text/x-python","patch_set":31,"id":"9a1a9d01_4bcf777f","line":179,"updated":"2015-09-25 15:21:32.000000000","message":"Are we using this instance object \"self.property_rules\" elsewhere?","commit_id":"bd687472ab04bb01131987ac27238746a5184132"}],"cinder/common/property_utils.py":[{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"5c5011d3a68ff53f923486396bc4b657007d40d5","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            msg \u003d _(\"Invalid value \u0027%s\u0027 for \""},{"line_number":85,"context_line":"                    \"\u0027property_protection_rule_format\u0027. \""},{"line_number":86,"context_line":"                    \"The permitted values are \""},{"line_number":87,"context_line":"                    \"\u0027roles\u0027 and \u0027policies\u0027\") % self.prop_prot_rule_format"},{"line_number":88,"context_line":"            LOG.error(msg)"},{"line_number":89,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_ea50b260","line":87,"updated":"2015-07-13 16:06:48.000000000","message":"\".\" at EOL","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"210b6af16d2d31de8dcea587b09fc85b6640dfc7","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            msg \u003d _(\"Invalid value \u0027%s\u0027 for \""},{"line_number":85,"context_line":"                    \"\u0027property_protection_rule_format\u0027. \""},{"line_number":86,"context_line":"                    \"The permitted values are \""},{"line_number":87,"context_line":"                    \"\u0027roles\u0027 and \u0027policies\u0027\") % self.prop_prot_rule_format"},{"line_number":88,"context_line":"            LOG.error(msg)"},{"line_number":89,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_a5d71c22","line":87,"in_reply_to":"9a41bdd9_ea50b260","updated":"2015-07-14 08:39:11.000000000","message":"Done","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":16708,"name":"Kendall Nelson","display_name":"Kendall (diablo_rojo)","email":"kennelson11@gmail.com","username":"kjnelson"},"change_message_id":"5c5011d3a68ff53f923486396bc4b657007d40d5","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                        msg \u003d (_("},{"line_number":104,"context_line":"                            \"Malformed property protection rule in \""},{"line_number":105,"context_line":"                            \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027 \""},{"line_number":106,"context_line":"                            \"are mutually exclusive\") %"},{"line_number":107,"context_line":"                            dict(prop\u003dproperty_exp,"},{"line_number":108,"context_line":"                                 op\u003doperation,"},{"line_number":109,"context_line":"                                 perm\u003dpermissions))"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_aa4aaaaa","line":106,"updated":"2015-07-13 16:06:48.000000000","message":"\".\" at EOL","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"210b6af16d2d31de8dcea587b09fc85b6640dfc7","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                        msg \u003d (_("},{"line_number":104,"context_line":"                            \"Malformed property protection rule in \""},{"line_number":105,"context_line":"                            \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027 \""},{"line_number":106,"context_line":"                            \"are mutually exclusive\") %"},{"line_number":107,"context_line":"                            dict(prop\u003dproperty_exp,"},{"line_number":108,"context_line":"                                 op\u003doperation,"},{"line_number":109,"context_line":"                                 perm\u003dpermissions))"}],"source_content_type":"text/x-python","patch_set":21,"id":"9a41bdd9_25cb0c74","line":106,"in_reply_to":"9a41bdd9_aa4aaaaa","updated":"2015-07-14 08:39:11.000000000","message":"Done","commit_id":"0837e98a6e8a955f957bdcc92a965ae3e0fdd303"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2013 Rackspace"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_607a4af3","line":1,"updated":"2015-07-27 21:04:49.000000000","message":"Update to 2015? Is this attribution correct?","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2013 Rackspace"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_810e6e8a","line":1,"in_reply_to":"3a50d1a3_607a4af3","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# we must set manually for compatibility with py26"},{"line_number":31,"context_line":"CONFIG \u003d ConfigParser.SafeConfigParser(dict_type\u003dOrderedDict)"},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":"_ \u003d i18n._"},{"line_number":34,"context_line":"_LE \u003d i18n._LE"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"property_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_405cee7c","line":33,"updated":"2015-07-27 21:04:49.000000000","message":"Please move these to the import line to be consistent:\n\nfrom cinder.i18n import _, _LE","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# we must set manually for compatibility with py26"},{"line_number":31,"context_line":"CONFIG \u003d ConfigParser.SafeConfigParser(dict_type\u003dOrderedDict)"},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":"_ \u003d i18n._"},{"line_number":34,"context_line":"_LE \u003d i18n._LE"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"property_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_21567a5c","line":33,"in_reply_to":"3a50d1a3_405cee7c","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        except Exception as e:"},{"line_number":77,"context_line":"            msg \u003d (_(\"Couldn\u0027t find property protection file %(file)s: \""},{"line_number":78,"context_line":"                     \"%(error)s.\") % {\u0027file\u0027: CONF.property_protection_file,"},{"line_number":79,"context_line":"                                      \u0027error\u0027: e})"},{"line_number":80,"context_line":"            LOG.error(msg)"},{"line_number":81,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_c048feb5","line":79,"updated":"2015-07-27 21:04:49.000000000","message":"Needs six.text_type around e, or better would be to just remove the error piece from the msg text and change LOG.error to LOG.exception.\n\nShould be _LE() since this is only used for the logger.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        except Exception as e:"},{"line_number":77,"context_line":"            msg \u003d (_(\"Couldn\u0027t find property protection file %(file)s: \""},{"line_number":78,"context_line":"                     \"%(error)s.\") % {\u0027file\u0027: CONF.property_protection_file,"},{"line_number":79,"context_line":"                                      \u0027error\u0027: e})"},{"line_number":80,"context_line":"            LOG.error(msg)"},{"line_number":81,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_a427f8b4","line":79,"in_reply_to":"3a50d1a3_c048feb5","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            msg \u003d _(\"Invalid value \u0027%s\u0027 for \""},{"line_number":85,"context_line":"                    \"\u0027property_protection_rule_format\u0027. \""},{"line_number":86,"context_line":"                    \"The permitted values are \""},{"line_number":87,"context_line":"                    \"\u0027roles\u0027 and \u0027policies\u0027.\") % self.prop_prot_rule_format"},{"line_number":88,"context_line":"            LOG.error(msg)"},{"line_number":89,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_40eaae75","line":87,"updated":"2015-07-27 21:04:49.000000000","message":"Only used for LOG.error, so get rid of msg variable and pass string directly to LOG.error call. Then change % to , so self.prop_prot_rule_format is passed as an argument into the logger.\n\nShould be _LE() since this is only used for the logger.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            msg \u003d _(\"Invalid value \u0027%s\u0027 for \""},{"line_number":85,"context_line":"                    \"\u0027property_protection_rule_format\u0027. \""},{"line_number":86,"context_line":"                    \"The permitted values are \""},{"line_number":87,"context_line":"                    \"\u0027roles\u0027 and \u0027policies\u0027.\") % self.prop_prot_rule_format"},{"line_number":88,"context_line":"            LOG.error(msg)"},{"line_number":89,"context_line":"            raise InvalidPropProtectConf()"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_2479a8c8","line":87,"in_reply_to":"3a50d1a3_40eaae75","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                    permissions \u003d [permission.strip() for permission in"},{"line_number":101,"context_line":"                                   permissions.split(\u0027,\u0027)]"},{"line_number":102,"context_line":"                    if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":103,"context_line":"                        msg \u003d (_("},{"line_number":104,"context_line":"                            \"Malformed property protection rule in \""},{"line_number":105,"context_line":"                            \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027 \""},{"line_number":106,"context_line":"                            \"are mutually exclusive.\") %"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_40b86e75","line":103,"updated":"2015-07-27 21:04:49.000000000","message":"Same as above.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                    permissions \u003d [permission.strip() for permission in"},{"line_number":101,"context_line":"                                   permissions.split(\u0027,\u0027)]"},{"line_number":102,"context_line":"                    if \u0027@\u0027 in permissions and \u0027!\u0027 in permissions:"},{"line_number":103,"context_line":"                        msg \u003d (_("},{"line_number":104,"context_line":"                            \"Malformed property protection rule in \""},{"line_number":105,"context_line":"                            \"[%(prop)s] %(op)s\u003d%(perm)s: \u0027@\u0027 and \u0027!\u0027 \""},{"line_number":106,"context_line":"                            \"are mutually exclusive.\") %"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_473956d6","line":103,"in_reply_to":"3a50d1a3_40b86e75","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                    property_dict[operation] \u003d permissions"},{"line_number":113,"context_line":"                else:"},{"line_number":114,"context_line":"                    property_dict[operation] \u003d []"},{"line_number":115,"context_line":"                    LOG.warn("},{"line_number":116,"context_line":"                        _(\u0027Property protection on operation %(operation)s\u0027"},{"line_number":117,"context_line":"                          \u0027 for rule %(rule)s is not found. No role will be\u0027"},{"line_number":118,"context_line":"                          \u0027 allowed to perform this operation.\u0027) %"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_8050b633","line":115,"updated":"2015-07-27 21:04:49.000000000","message":"LOG.warn is deprecated, please use LOG.warning. Should also use _LW() for the text and change % to ,.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                    property_dict[operation] \u003d permissions"},{"line_number":113,"context_line":"                else:"},{"line_number":114,"context_line":"                    property_dict[operation] \u003d []"},{"line_number":115,"context_line":"                    LOG.warn("},{"line_number":116,"context_line":"                        _(\u0027Property protection on operation %(operation)s\u0027"},{"line_number":117,"context_line":"                          \u0027 for rule %(rule)s is not found. No role will be\u0027"},{"line_number":118,"context_line":"                          \u0027 allowed to perform this operation.\u0027) %"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_2743ea43","line":115,"in_reply_to":"3a50d1a3_8050b633","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            return re.compile(rule)"},{"line_number":127,"context_line":"        except Exception as e:"},{"line_number":128,"context_line":"            msg \u003d (_(\"Encountered a malformed property protection rule\""},{"line_number":129,"context_line":"                     \" %(rule)s: %(error)s.\") % {\u0027rule\u0027: rule,"},{"line_number":130,"context_line":"                                                 \u0027error\u0027: e})"},{"line_number":131,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_40462e7c","line":128,"updated":"2015-07-27 21:04:49.000000000","message":"Same as earlier.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        try:"},{"line_number":126,"context_line":"            return re.compile(rule)"},{"line_number":127,"context_line":"        except Exception as e:"},{"line_number":128,"context_line":"            msg \u003d (_(\"Encountered a malformed property protection rule\""},{"line_number":129,"context_line":"                     \" %(rule)s: %(error)s.\") % {\u0027rule\u0027: rule,"},{"line_number":130,"context_line":"                                                 \u0027error\u0027: e})"},{"line_number":131,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_6779f281","line":128,"in_reply_to":"3a50d1a3_40462e7c","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"03a89cc70d498460341ddcd2a6e4904949edde93","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# NOTE(bourke): The default dict_type is collections.OrderedDict in py27, but"},{"line_number":28,"context_line":"# we must set manually for compatibility with py26"},{"line_number":29,"context_line":"CONFIG \u003d ConfigParser.SafeConfigParser(dict_type\u003dOrderedDict)"},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_5a7836c4","line":28,"updated":"2015-07-28 14:00:02.000000000","message":"We don\u0027t care about python2.6 since Kilo","commit_id":"6571f54ecdfec23bc6d76b179cabe684f176d523"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f9af6fbfe794a7114b592c53d18bd45ec85a4aae","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# NOTE(bourke): The default dict_type is collections.OrderedDict in py27, but"},{"line_number":28,"context_line":"# we must set manually for compatibility with py26"},{"line_number":29,"context_line":"CONFIG \u003d ConfigParser.SafeConfigParser(dict_type\u003dOrderedDict)"},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_057a2677","line":28,"in_reply_to":"3a50d1a3_5a7836c4","updated":"2015-07-29 08:29:00.000000000","message":"Done","commit_id":"6571f54ecdfec23bc6d76b179cabe684f176d523"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"744486cfb458b7ecf0cd420a728a9ca881238efc","unresolved":false,"context_lines":[{"line_number":25,"context_line":"from cinder.i18n import _, _LE, _LW"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# NOTE(bourke): The default dict_type is collections.OrderedDict in py27, but"},{"line_number":28,"context_line":"# we must set manually for compatibility with py26"},{"line_number":29,"context_line":"CONFIG \u003d ConfigParser.SafeConfigParser(dict_type\u003dOrderedDict)"},{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_9ab77a84","line":28,"in_reply_to":"3a50d1a3_5a7836c4","updated":"2015-07-29 04:42:31.000000000","message":"Ivan, I will cleanup those in a follow up review, or address it if another update is needed, is that okay? thanks.","commit_id":"6571f54ecdfec23bc6d76b179cabe684f176d523"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"699f49d1b4195b5e74c46641c5c936cbc2262bac","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            return False"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for rule_exp, rule in self.rules:"},{"line_number":131,"context_line":"            if rule_exp.search(str(property_name)):"},{"line_number":132,"context_line":"                break"},{"line_number":133,"context_line":"        else:  # no matching rules"},{"line_number":134,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_b5c92728","line":131,"updated":"2015-07-29 05:17:38.000000000","message":"Use six.text_type instead of str.","commit_id":"6571f54ecdfec23bc6d76b179cabe684f176d523"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"f9af6fbfe794a7114b592c53d18bd45ec85a4aae","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            return False"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        for rule_exp, rule in self.rules:"},{"line_number":131,"context_line":"            if rule_exp.search(str(property_name)):"},{"line_number":132,"context_line":"                break"},{"line_number":133,"context_line":"        else:  # no matching rules"},{"line_number":134,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a50d1a3_e5da9a77","line":131,"in_reply_to":"3a50d1a3_b5c92728","updated":"2015-07-29 08:29:00.000000000","message":"Done","commit_id":"6571f54ecdfec23bc6d76b179cabe684f176d523"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"c7f5c99a2231f44d38869fc3786ae9117286e3df","unresolved":false,"context_lines":[{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    from collections import OrderedDict  # noqa"},{"line_number":17,"context_line":"except ImportError:"},{"line_number":18,"context_line":"    from ordereddict import OrderedDict  # noqa"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_b541f90b","line":18,"updated":"2015-07-29 20:59:51.000000000","message":"I believe, this is not needed any more after dropping py26 support","commit_id":"06368354509e828645551b664824c743991527e9"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"b9a1c7ef56465775c9c20f2a72ad3eb89e65f2b8","unresolved":false,"context_lines":[{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    from collections import OrderedDict  # noqa"},{"line_number":17,"context_line":"except ImportError:"},{"line_number":18,"context_line":"    from ordereddict import OrderedDict  # noqa"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_461b2374","line":18,"in_reply_to":"3a50d1a3_0b50c909","updated":"2015-07-30 03:59:39.000000000","message":"@Ivan, you are right. It says ordereddict is \"A drop-in substitute for Py2.7\u0027s new collections.OrderedDict that works in Python 2.4-2.6.\"","commit_id":"06368354509e828645551b664824c743991527e9"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3af0ea75d2ee6e75d3c067d5ed03a526b2399955","unresolved":false,"context_lines":[{"line_number":15,"context_line":"try:"},{"line_number":16,"context_line":"    from collections import OrderedDict  # noqa"},{"line_number":17,"context_line":"except ImportError:"},{"line_number":18,"context_line":"    from ordereddict import OrderedDict  # noqa"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from oslo_config import cfg"},{"line_number":21,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a50d1a3_0b50c909","line":18,"in_reply_to":"3a50d1a3_b541f90b","updated":"2015-07-30 00:54:29.000000000","message":"@Ivan, this is not related with py26, ordereddict is from the ordereddict package, which is now in the global-requirements.txt.\n\ncollections.OrderedDict is in the py27 standard library. \n\nsome reference documents tell me there will be a smooth transition from collections.OrderedDict to ordereddict.OrderedDict, thus, this may still needed.\n\n\u003e\u003e\u003e import ordereddict\n\u003e\u003e\u003e ordereddict.__file__\n\u0027/usr/local/lib/python2.7/dist-packages/ordereddict.pyc\u0027\n \n$ grep ordereddict global-requirements.txt\nordereddict\n\nI will check this in the more offical documents, and remove this if this is indeed unnecssary.","commit_id":"06368354509e828645551b664824c743991527e9"}],"cinder/tests/api/fakes.py":[{"author":{"_account_id":14428,"name":"Bharat Kumar Kobagana","email":"bharath.kobagana@gmail.com","username":"bharatkk"},"change_message_id":"88365ce3f85f91dd4c878064b56f05ae3c4c40c3","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @classmethod"},{"line_number":123,"context_line":"    def roles(cls, *args, **kwargs):"},{"line_number":124,"context_line":"        if args is not None:"},{"line_number":125,"context_line":"            if args[0].find(\u0027v1\u0027) \u003d\u003d 0:"},{"line_number":126,"context_line":"                kwargs[\u0027base_url\u0027] \u003d \u0027http://localhost/v1\u0027"},{"line_number":127,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"7a016987_fd5c324c","line":124,"updated":"2015-05-22 17:47:13.000000000","message":"\"if args:\" is enough","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"8957cac0d5c5918584a837266ad68447dab18121","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @classmethod"},{"line_number":123,"context_line":"    def roles(cls, *args, **kwargs):"},{"line_number":124,"context_line":"        if args is not None:"},{"line_number":125,"context_line":"            if args[0].find(\u0027v1\u0027) \u003d\u003d 0:"},{"line_number":126,"context_line":"                kwargs[\u0027base_url\u0027] \u003d \u0027http://localhost/v1\u0027"},{"line_number":127,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3afb71cf_78055078","line":124,"in_reply_to":"7a016987_fd5c324c","updated":"2015-06-09 05:44:22.000000000","message":"Done","commit_id":"f6be1670dce5dbd877d37ba8c4c75974c8694cee"}],"cinder/tests/unit/api/contrib/test_volume_image_props_protection.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            }"},{"line_number":176,"context_line":"        }"},{"line_number":177,"context_line":"        req \u003d fakes.HTTPRequest.roles(\u0027/v2/fake/volumes/1/action\u0027,"},{"line_number":178,"context_line":"                                      roles\u003d\u0027spl_role\u0027)"},{"line_number":179,"context_line":"        req.method \u003d \"POST\""},{"line_number":180,"context_line":"        req.body \u003d jsonutils.dumps(body)"},{"line_number":181,"context_line":"        req.headers[\"content-type\"] \u003d \"application/json\""}],"source_content_type":"text/x-python","patch_set":31,"id":"9a1a9d01_4bdc57e4","line":178,"updated":"2015-09-25 15:21:32.000000000","message":"We do these next 3 lines a decent amount of times (saying it\u0027s a post, formatting JSON, and setting content type) - may be small helper function","commit_id":"bd687472ab04bb01131987ac27238746a5184132"}],"cinder/tests/unit/api/fakes.py":[{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"02c884059be45db0ac23d04ec87c1a97be00c16b","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    @classmethod"},{"line_number":123,"context_line":"    def roles(cls, *args, **kwargs):"},{"line_number":124,"context_line":"        if args:"},{"line_number":125,"context_line":"            if args[0].find(\u0027v1\u0027) \u003d\u003d 0:"},{"line_number":126,"context_line":"                kwargs[\u0027base_url\u0027] \u003d \u0027http://localhost/v1\u0027"},{"line_number":127,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a1a9d01_089425e0","line":124,"updated":"2015-09-25 15:21:32.000000000","message":"Is it important that \u0027v1\u0027 is at the start of args[0]?  If not we could use \"in\" instead of \"find\".\n\nAlso we could just set the string \"v1\" or \"v2\" in the if statement and move the common code setting kwargs[\u0027base_url\"] out of if","commit_id":"bd687472ab04bb01131987ac27238746a5184132"}],"cinder/tests/unit/test_property_utils.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"5177521f83e9f9ec0edf1109b5c7f7480fe74b33","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_661342b9","line":1,"updated":"2015-07-27 21:04:49.000000000","message":"Should not have a copyright for OpenStack Foundation unless contributed by a direct employee.","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"84492943fdb907f228f63adc7ec30e01d0b76e8d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a50d1a3_c76486ba","line":1,"in_reply_to":"3a50d1a3_661342b9","updated":"2015-07-28 07:13:22.000000000","message":"Done","commit_id":"e487eb396a05f0202249ff7b60cab0764502d6d7"}]}
