)]}'
{"smaug/services/protection/protectable_plugin.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"9fdd8cdc7d5f6ad35aa0d15eb7300a32a63196c9","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    \"\"\"Base abstract class for protectable plugin."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    \"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def __init__(self, context\u003dNone):"},{"line_number":24,"context_line":"        self._context \u003d context"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def instance(self, context):"},{"line_number":27,"context_line":"        return self.__class__(context)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @abc.abstractmethod"},{"line_number":30,"context_line":"    def get_resource_type(self):"},{"line_number":31,"context_line":"        \"\"\"Return the resource type that this plugin supports."}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_71a3ed4f","line":28,"range":{"start_line":22,"start_character":0,"end_line":28,"end_character":0},"updated":"2016-02-28 14:11:14.000000000","message":"What are these?","commit_id":"e4e058ced870d545e757d859761c03feab206de4"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"609824a1f5d7a032ccaa51f720033becdab72ec1","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    \"\"\"Base abstract class for protectable plugin."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    \"\"\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    def __init__(self, context\u003dNone):"},{"line_number":24,"context_line":"        self._context \u003d context"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def instance(self, context):"},{"line_number":27,"context_line":"        return self.__class__(context)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    @abc.abstractmethod"},{"line_number":30,"context_line":"    def get_resource_type(self):"},{"line_number":31,"context_line":"        \"\"\"Return the resource type that this plugin supports."}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_dbfac674","line":28,"range":{"start_line":22,"start_character":0,"end_line":28,"end_character":0},"in_reply_to":"9aed3d3a_71a3ed4f","updated":"2016-02-29 08:09:08.000000000","message":"We need some info from request context, such as project_id, auth_token, to setup the client for querying resources from given service.\nPlease look at another patch which implements volume protectable plugin: https://review.openstack.org/#/c/285611/","commit_id":"e4e058ced870d545e757d859761c03feab206de4"}],"smaug/services/protection/protectable_registry.py":[{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"b88adc386838790f4bc37e63553e77df0cad0ec6","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":"protectable_opts \u003d ["},{"line_number":24,"context_line":"    cfg.ListOpt(\u0027protectable_plugins\u0027,"},{"line_number":25,"context_line":"                default\u003d[\u0027smaug.protectable.project\u0027,"},{"line_number":26,"context_line":"                         \u0027smaug.protectable.server\u0027,"},{"line_number":27,"context_line":"                         \u0027smaug.protectable.volume\u0027,"},{"line_number":28,"context_line":"                         ],"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_ff09a92d","line":25,"range":{"start_line":25,"start_character":26,"end_line":25,"end_character":43},"updated":"2016-02-22 02:21:34.000000000","message":"I think prefix \u0027smaug.protectable\u0027 can moved here. The entry_points name smaug.protectables in setup.cfg describe them clearly.","commit_id":"0544fcdec1e5757aaab29cadfdcb0d5fdfb63c73"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"b88adc386838790f4bc37e63553e77df0cad0ec6","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        \"\"\"Load all protectable plugins configured and register them."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        for plugin_name in cfg.CONF.protectable_plugins:"},{"line_number":52,"context_line":"            try:"},{"line_number":53,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protectables\","},{"line_number":54,"context_line":"                                              plugin_name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"bae84128_9f85fd5a","line":51,"range":{"start_line":51,"start_character":36,"end_line":51,"end_character":55},"updated":"2016-02-22 02:21:34.000000000","message":"IMO, all supported protectable plugins configured in setup.cfg entry_points smaug.protectables  should be loaded. Why do we need configue them in conf file again? Do we have scenes that supported protectable plugins needn\u0027t be loaded?","commit_id":"0544fcdec1e5757aaab29cadfdcb0d5fdfb63c73"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"f7c6ef048a2361fa439c79b566eda8c01b7fcf39","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, cntx):"},{"line_number":38,"context_line":"        self._context \u003d cntx"},{"line_number":39,"context_line":"        self._protectable_map \u003d {}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __del__(self):"},{"line_number":42,"context_line":"        del(self._instance_map[self._context])"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_d45c397f","line":39,"range":{"start_line":39,"start_character":14,"end_line":39,"end_character":28},"updated":"2016-02-29 16:48:03.000000000","message":"In the protectable_registry test it assumes _protectable_map is  a global var not needed to instantiate please fix here or in the test","commit_id":"55e69ee6e47f8ceb3d74d0ac055b17da1e87f796"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"ef8a4c4e86e91b6d008e1869298a1f3ac67b1b33","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, cntx):"},{"line_number":38,"context_line":"        self._context \u003d cntx"},{"line_number":39,"context_line":"        self._protectable_map \u003d {}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def __del__(self):"},{"line_number":42,"context_line":"        del(self._instance_map[self._context])"}],"source_content_type":"text/x-python","patch_set":6,"id":"9aed3d3a_f94aed53","line":39,"range":{"start_line":39,"start_character":14,"end_line":39,"end_character":28},"in_reply_to":"9aed3d3a_d45c397f","updated":"2016-03-01 08:13:09.000000000","message":"Done. Please check again.","commit_id":"55e69ee6e47f8ceb3d74d0ac055b17da1e87f796"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"4f5de72fe5dfb97b378600beb061fd80af8024e9","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        return [type for type in six.iterkeys(cls._plugin_map)]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"},{"line_number":87,"context_line":"    def get_resource_plugin(cls, resource_type):"},{"line_number":88,"context_line":"        \"\"\"Get the plugin with the specified type.\"\"\""},{"line_number":89,"context_line":"        return cls._plugin_map.get(resource_type)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def list_resources(self, resource_type):"},{"line_number":92,"context_line":"        \"\"\"List resource instances of given type."}],"source_content_type":"text/x-python","patch_set":7,"id":"7af24918_86ddfc72","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":49},"updated":"2016-03-01 15:44:52.000000000","message":"Resource plugins are defined by the provider.","commit_id":"6fb65ae6568f7316c7b929b2643b857aabd0e803"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"626a06865f0537483ed1dd9be2fc99fe950e9e4c","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        return [type for type in six.iterkeys(cls._plugin_map)]"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    @classmethod"},{"line_number":87,"context_line":"    def get_resource_plugin(cls, resource_type):"},{"line_number":88,"context_line":"        \"\"\"Get the plugin with the specified type.\"\"\""},{"line_number":89,"context_line":"        return cls._plugin_map.get(resource_type)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def list_resources(self, resource_type):"},{"line_number":92,"context_line":"        \"\"\"List resource instances of given type."}],"source_content_type":"text/x-python","patch_set":7,"id":"7af24918_b8c64247","line":89,"range":{"start_line":86,"start_character":0,"end_line":89,"end_character":49},"in_reply_to":"7af24918_86ddfc72","updated":"2016-03-07 00:25:56.000000000","message":"Done. Already renamed to an explicit name.","commit_id":"6fb65ae6568f7316c7b929b2643b857aabd0e803"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"9035b6f51e24805413f07ab115a3b40b3f6e34f2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        cls._plugin_map[plugin.get_resource_type()] \u003d plugin"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def instance(cls, cntx):"},{"line_number":63,"context_line":"        if cntx in cls._instance_map:"},{"line_number":64,"context_line":"            return cls._instance_map[cntx]"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3afc51ec_b18c7f80","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":16},"updated":"2016-03-14 09:09:07.000000000","message":"Please change the name to create_instance","commit_id":"7178a5814cb3f45cfb2973c7d96f21508dde5915"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"9035b6f51e24805413f07ab115a3b40b3f6e34f2","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    @classmethod"},{"line_number":62,"context_line":"    def instance(cls, cntx):"},{"line_number":63,"context_line":"        if cntx in cls._instance_map:"},{"line_number":64,"context_line":"            return cls._instance_map[cntx]"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        instance \u003d cls(cntx)"},{"line_number":67,"context_line":"        cls._instance_map[cntx] \u003d instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afc51ec_31ceafb4","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":42},"updated":"2016-03-14 09:09:07.000000000","message":"No need for the cache. The only thing that gets duplicated is a pointer to the context object which is very light.","commit_id":"7178a5814cb3f45cfb2973c7d96f21508dde5915"}]}
