)]}'
{"setup.cfg":[{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    sqlalchemy \u003d oslo_db.sqlalchemy.migration"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"smaug.protections \u003d"},{"line_number":42,"context_line":"    BANK \u003d smaug.services.protection.plugins.swift_bank_plugin:SwiftBankPlugin"},{"line_number":43,"context_line":"    VOLUME \u003d smaug.services.protection.plugins.cinder_backup_plugin:CinderBackupPlugin"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"[build_sphinx]"}],"source_content_type":"text/x-ttcn-cfg","patch_set":4,"id":"7af24918_b3f8074b","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":8},"updated":"2016-03-02 09:23:55.000000000","message":"I am not sure this should be UPPER case \n\nI think the name should be \nsmaug-swift-bank-plugin","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"smaug.protections \u003d"},{"line_number":42,"context_line":"    BANK \u003d smaug.services.protection.plugins.swift_bank_plugin:SwiftBankPlugin"},{"line_number":43,"context_line":"    VOLUME \u003d smaug.services.protection.plugins.cinder_backup_plugin:CinderBackupPlugin"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"[build_sphinx]"},{"line_number":46,"context_line":"source-dir \u003d doc/source"}],"source_content_type":"text/x-ttcn-cfg","patch_set":4,"id":"7af24918_d394b3e3","line":43,"range":{"start_line":43,"start_character":4,"end_line":43,"end_character":10},"updated":"2016-03-02 09:23:55.000000000","message":"Consider changing to \nsmaug-volume-protection-plugin","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"27132add6f8570811a4967f848b8493770bb8c24","unresolved":false,"context_lines":[{"line_number":38,"context_line":"smaug.database.migration_backend \u003d"},{"line_number":39,"context_line":"    sqlalchemy \u003d oslo_db.sqlalchemy.migration"},{"line_number":40,"context_line":"smaug.protections \u003d"},{"line_number":41,"context_line":"    BANK \u003d smaug.services.protection.plugins.swift_bank_plugin:SwiftBankPlugin"},{"line_number":42,"context_line":"    VOLUME \u003d smaug.services.protection.plugins.cinder_backup_plugin:CinderBackupPlugin"},{"line_number":43,"context_line":"smaug.provider \u003d"},{"line_number":44,"context_line":"    provider-registry \u003d smaug.services.protection.provider:ProviderRegistry"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"1af94dfe_1cde2c11","line":41,"range":{"start_line":41,"start_character":4,"end_line":41,"end_character":8},"updated":"2016-03-16 13:45:01.000000000","message":"Please see my comments in \nhttps://review.openstack.org/#/c/281618/4/setup.cfg\n \n\nI think the name should be \nswift-bank-plugin","commit_id":"4ef3724dcf159024403b96cae60ff6d9bd1563ae"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"27132add6f8570811a4967f848b8493770bb8c24","unresolved":false,"context_lines":[{"line_number":38,"context_line":"smaug.database.migration_backend \u003d"},{"line_number":39,"context_line":"    sqlalchemy \u003d oslo_db.sqlalchemy.migration"},{"line_number":40,"context_line":"smaug.protections \u003d"},{"line_number":41,"context_line":"    BANK \u003d smaug.services.protection.plugins.swift_bank_plugin:SwiftBankPlugin"},{"line_number":42,"context_line":"    VOLUME \u003d smaug.services.protection.plugins.cinder_backup_plugin:CinderBackupPlugin"},{"line_number":43,"context_line":"smaug.provider \u003d"},{"line_number":44,"context_line":"    provider-registry \u003d smaug.services.protection.provider:ProviderRegistry"}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"1af94dfe_9c551c52","line":41,"range":{"start_line":41,"start_character":37,"end_line":41,"end_character":44},"updated":"2016-03-16 13:45:01.000000000","message":"smaug.services.protection.bank_plugins.swift_bank_plugin.SwiftBankPlugin","commit_id":"4ef3724dcf159024403b96cae60ff6d9bd1563ae"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"27132add6f8570811a4967f848b8493770bb8c24","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    sqlalchemy \u003d oslo_db.sqlalchemy.migration"},{"line_number":40,"context_line":"smaug.protections \u003d"},{"line_number":41,"context_line":"    BANK \u003d smaug.services.protection.plugins.swift_bank_plugin:SwiftBankPlugin"},{"line_number":42,"context_line":"    VOLUME \u003d smaug.services.protection.plugins.cinder_backup_plugin:CinderBackupPlugin"},{"line_number":43,"context_line":"smaug.provider \u003d"},{"line_number":44,"context_line":"    provider-registry \u003d smaug.services.protection.provider:ProviderRegistry"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-ttcn-cfg","patch_set":8,"id":"1af94dfe_7ccdb05c","line":42,"range":{"start_line":42,"start_character":4,"end_line":42,"end_character":10},"updated":"2016-03-16 13:45:01.000000000","message":"ditto \ncinder-volume-protection-plugin","commit_id":"4ef3724dcf159024403b96cae60ff6d9bd1563ae"}],"smaug/common/utils.py":[{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"e40575e086986f43da5cc008baf4534d12ffa6f0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"LOG \u003d logging.getLogger(__name__)\r"},{"line_number":19,"context_line":"\r"},{"line_number":20,"context_line":"\r"},{"line_number":21,"context_line":"def load_plugin(namespace, plugin_name):\r"},{"line_number":22,"context_line":"    try:\r"},{"line_number":23,"context_line":"        # Try to resolve plugin by name\r"},{"line_number":24,"context_line":"        mgr \u003d driver.DriverManager(namespace, plugin_name)\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_5f541120","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":40},"updated":"2016-03-22 12:46:38.000000000","message":"Consider merging smaug.common.utils into smaug.utils.","commit_id":"4a3380d9da2dca8e9372f119837f010c687891fe"},{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"f6e08df61df6d51a9d463b56aa2ba39ddaa113af","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        plugin_class \u003d mgr.driver\r"},{"line_number":26,"context_line":"    except RuntimeError as e1:\r"},{"line_number":27,"context_line":"        # fallback to class name\r"},{"line_number":28,"context_line":"        try:\r"},{"line_number":29,"context_line":"            plugin_class \u003d importutils.import_class(plugin_name)\r"},{"line_number":30,"context_line":"        except ImportError as e2:\r"},{"line_number":31,"context_line":"            LOG.exception(_LE(\"Error loading plugin by name, %s\"), e1)\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_089c33bf","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":11},"updated":"2016-03-22 03:32:08.000000000","message":"why need this try? if goes here, the param \u0027plugin_name\u0027 may be not right for \u0027import_class\u0027.","commit_id":"4a3380d9da2dca8e9372f119837f010c687891fe"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"0035fa6a2c4110135af301a63038e99cc8e3ad15","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        plugin_class \u003d mgr.driver\r"},{"line_number":26,"context_line":"    except RuntimeError as e1:\r"},{"line_number":27,"context_line":"        # fallback to class name\r"},{"line_number":28,"context_line":"        try:\r"},{"line_number":29,"context_line":"            plugin_class \u003d importutils.import_class(plugin_name)\r"},{"line_number":30,"context_line":"        except ImportError as e2:\r"},{"line_number":31,"context_line":"            LOG.exception(_LE(\"Error loading plugin by name, %s\"), e1)\r"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_71cafa6f","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":11},"in_reply_to":"fa0719c6_089c33bf","updated":"2016-03-22 06:42:42.000000000","message":"I think this try means the plugin_name is not a stevedore alias name,because the DriverManager throw a exception.So it maybe is a class path,why not try again use \u0027import_class\u0027?\nLOG.exception(_LE(\"Error loading plugin by name, %s\"), e1)\nLOG.exception(_LE(\"Error loading plugin by class, %s\"), e2)\nI think the log has show why we try again","commit_id":"4a3380d9da2dca8e9372f119837f010c687891fe"}],"smaug/services/protection/manager.py":[{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 *args, **kwargs):"},{"line_number":48,"context_line":"        super(ProtectionManager, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        # TODO(wangliuan)  more params and use profiler.trace_cls"},{"line_number":50,"context_line":"        self.provider_registry \u003d importutils.import_object("},{"line_number":51,"context_line":"            \u0027smaug.services.protection.provider.ProviderRegistry\u0027)"},{"line_number":52,"context_line":"        self.flow_engine \u003d None"},{"line_number":53,"context_line":"        # TODO(wangliuan)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_13329b10","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":58},"updated":"2016-03-02 09:23:55.000000000","message":"This should be able to load by alias or class \n\nLook at the load_driver in Neutron or Dragonflow","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"05827f532303d5ca1f14b80bd9068e12838ce477","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                 *args, **kwargs):"},{"line_number":48,"context_line":"        super(ProtectionManager, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        # TODO(wangliuan)  more params and use profiler.trace_cls"},{"line_number":50,"context_line":"        self.provider_registry \u003d importutils.import_object("},{"line_number":51,"context_line":"            \u0027smaug.services.protection.provider.ProviderRegistry\u0027)"},{"line_number":52,"context_line":"        self.flow_engine \u003d None"},{"line_number":53,"context_line":"        # TODO(wangliuan)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_1f9edc62","line":50,"range":{"start_line":50,"start_character":8,"end_line":50,"end_character":58},"in_reply_to":"7af24918_13329b10","updated":"2016-03-03 02:49:55.000000000","message":"Done","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":15069,"name":"zhonghuali","email":"lizhonghua.li@huawei.com","username":"sloblee"},"change_message_id":"b978c6e61f10fe798c9e4ccd6f91217a9775ac2c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        super(ProtectionManager, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        # TODO(wangliuan)  more params and use profiler.trace_cls"},{"line_number":50,"context_line":"        self.provider_registry \u003d importutils.import_object("},{"line_number":51,"context_line":"            \u0027smaug.services.protection.provider.ProviderRegistry\u0027)"},{"line_number":52,"context_line":"        self.flow_engine \u003d None"},{"line_number":53,"context_line":"        # TODO(wangliuan)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_bf21f3fd","line":51,"range":{"start_line":51,"start_character":13,"end_line":51,"end_character":18},"updated":"2016-03-02 08:51:57.000000000","message":"could you consider to move it into config file?","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"05827f532303d5ca1f14b80bd9068e12838ce477","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        super(ProtectionManager, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        # TODO(wangliuan)  more params and use profiler.trace_cls"},{"line_number":50,"context_line":"        self.provider_registry \u003d importutils.import_object("},{"line_number":51,"context_line":"            \u0027smaug.services.protection.provider.ProviderRegistry\u0027)"},{"line_number":52,"context_line":"        self.flow_engine \u003d None"},{"line_number":53,"context_line":"        # TODO(wangliuan)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_7f856005","line":51,"range":{"start_line":51,"start_character":13,"end_line":51,"end_character":18},"in_reply_to":"7af24918_332a372d","updated":"2016-03-03 02:49:55.000000000","message":"Done","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        super(ProtectionManager, self).__init__(*args, **kwargs)"},{"line_number":49,"context_line":"        # TODO(wangliuan)  more params and use profiler.trace_cls"},{"line_number":50,"context_line":"        self.provider_registry \u003d importutils.import_object("},{"line_number":51,"context_line":"            \u0027smaug.services.protection.provider.ProviderRegistry\u0027)"},{"line_number":52,"context_line":"        self.flow_engine \u003d None"},{"line_number":53,"context_line":"        # TODO(wangliuan)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_332a372d","line":51,"range":{"start_line":51,"start_character":13,"end_line":51,"end_character":18},"in_reply_to":"7af24918_bf21f3fd","updated":"2016-03-02 09:23:55.000000000","message":"I agree and I think that we should load this using stevedore \nalias\n\nLet me know if you need pointers to code that are using that","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"a5a347744e155534920d2412167f7320cbc4fab8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        :param plan: Define that protection plan should be done"},{"line_number":70,"context_line":"        \"\"\""},{"line_number":71,"context_line":"        LOG.info(_LI(\"Starting protection service:protect action\"))"},{"line_number":72,"context_line":"        LOG.debug(\u0027restoration :%s tpye:%s\u0027, plan,"},{"line_number":73,"context_line":"                  type(plan))"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # TODO(wangliuan)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1af94dfe_192483ad","line":72,"range":{"start_line":72,"start_character":19,"end_line":72,"end_character":30},"updated":"2016-03-16 12:00:10.000000000","message":"/restortion/protecting or back/s","commit_id":"681e2732e8ff233ffbb709c39d3166105ed4d566"}],"smaug/services/protection/provider.py":[{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"bb686d71f1eb728828fada1aeab285066c5e7659","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        if CONF.enabled_providers:"},{"line_number":77,"context_line":"            for provider in CONF.enabled_providers:"},{"line_number":78,"context_line":"                CONF.register_opts(provider_opt, group\u003dprovider)"},{"line_number":79,"context_line":"                plugins \u003d getattr(CONF, provider).plugin"},{"line_number":80,"context_line":"                self.providers[provider] \u003d PluggableProtectionProvider(plugins)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_providers(self, list_option\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_eb7a1823","line":79,"updated":"2016-02-18 06:56:44.000000000","message":"Please add a fault-tolerant check for the situation of the given provider not configured actually in conf.","commit_id":"66d9a2968183fdda700aff54ebbd82fb67dc31fd"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"bb686d71f1eb728828fada1aeab285066c5e7659","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def list_providers(self, list_option\u003dNone):"},{"line_number":83,"context_line":"        if not list_option:"},{"line_number":84,"context_line":"            return self.providers.keys()"},{"line_number":85,"context_line":"        # TODO(wangliuan) use list_option"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def show_provider(self, provider_id):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_8be0acce","line":84,"range":{"start_line":84,"start_character":19,"end_line":84,"end_character":40},"updated":"2016-02-18 06:56:44.000000000","message":"Please use six.iterkeys to build a list explicitly, cause keys() returns different types in PY2 and PY3.","commit_id":"66d9a2968183fdda700aff54ebbd82fb67dc31fd"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"7061d169ee86f2f511ff61e06523337f0f5d1f99","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    def _load_plugins(self, plugins):"},{"line_number":47,"context_line":"        for plugin in plugins:"},{"line_number":48,"context_line":"            plugin_type \u003d str(plugin.split(\u0027:\u0027)[0])"},{"line_number":49,"context_line":"            plugin_obj \u003d importutils.import_object(plugin.split(\u0027:\u0027)[-1])"},{"line_number":50,"context_line":"            self._plugin_map[plugin_type] \u003d plugin_obj"},{"line_number":51,"context_line":"            if plugin_type.lower() \u003d\u003d PLUGIN_BANK:"},{"line_number":52,"context_line":"                self._bank_plugin \u003d plugin_obj"}],"source_content_type":"text/x-python","patch_set":3,"id":"bae84128_e00585c2","line":49,"range":{"start_line":49,"start_character":12,"end_line":49,"end_character":73},"updated":"2016-02-22 06:51:57.000000000","message":"I think plugin loading mechanism should use stevedore \nBy class or by alias. You can refer to the Protectable plugin  loading implementation in this patch. https://review.openstack.org/#/c/281783/\n\nThe Plugin should be resisted in the smaug  setup.cfg","commit_id":"a17cc19025d23d79b313f47755b2c42a7884ff6a"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"PLUGIN_BANK \u003d \u0027bank\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class PluggableProtectionProvider(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_b39be771","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":11},"updated":"2016-03-02 09:23:55.000000000","message":"This should be in a common place assailable by the Bank and the protection provider","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"05827f532303d5ca1f14b80bd9068e12838ce477","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"PLUGIN_BANK \u003d \u0027bank\u0027"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"class PluggableProtectionProvider(object):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_5f918446","line":31,"range":{"start_line":31,"start_character":0,"end_line":31,"end_character":11},"in_reply_to":"7af24918_b39be771","updated":"2016-03-03 02:49:55.000000000","message":"Done","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _load_plugins(self, plugins):"},{"line_number":53,"context_line":"        for plugin_name in plugins:"},{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protections\","},{"line_number":56,"context_line":"                                              plugin_name,"},{"line_number":57,"context_line":"                                              invoke_on_load\u003dTrue).driver"},{"line_number":58,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_339d175a","line":55,"range":{"start_line":55,"start_character":46,"end_line":55,"end_character":65},"updated":"2016-03-02 09:23:55.000000000","message":"Do we all ways want to load all plugins even if the admin did not Configure them in any Provider ?","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"05827f532303d5ca1f14b80bd9068e12838ce477","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _load_plugins(self, plugins):"},{"line_number":53,"context_line":"        for plugin_name in plugins:"},{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protections\","},{"line_number":56,"context_line":"                                              plugin_name,"},{"line_number":57,"context_line":"                                              invoke_on_load\u003dTrue).driver"},{"line_number":58,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_dfcc746c","line":55,"range":{"start_line":55,"start_character":46,"end_line":55,"end_character":65},"in_reply_to":"7af24918_339d175a","updated":"2016-03-03 02:49:55.000000000","message":"we just load the plugin that the admin configure in Provider","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"519f3eab48c664985b29bd6cf47ddf65583b42f8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def _load_plugins(self, plugins):"},{"line_number":53,"context_line":"        for plugin_name in plugins:"},{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protections\","},{"line_number":56,"context_line":"                                              plugin_name,"},{"line_number":57,"context_line":"                                              invoke_on_load\u003dTrue).driver"},{"line_number":58,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_48881ce8","line":55,"range":{"start_line":55,"start_character":46,"end_line":55,"end_character":65},"in_reply_to":"7af24918_dfcc746c","updated":"2016-03-07 16:07:33.000000000","message":"unless i am missing some thing you are loafing the all smaug.protections namespace","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19346,"name":"yinwei","email":"yinweiishere@icloud.com","username":"yinwei"},"change_message_id":"ac3934dfda5c0ceadb3dc6d5f88690e70c1227ee","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        for plugin_name in plugins:"},{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protections\","},{"line_number":56,"context_line":"                                              plugin_name,"},{"line_number":57,"context_line":"                                              invoke_on_load\u003dTrue).driver"},{"line_number":58,"context_line":"            except Exception:"},{"line_number":59,"context_line":"                LOG.exception(_LE(\"Load protection plugin %s failed.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_cdfee06a","line":56,"updated":"2016-03-02 02:22:26.000000000","message":"Is here plugin_name or plugin_type? If it\u0027s plugin_name, each plugin with different name, then we should NOT set _plugin_map[plugin_name].  We should set _plugin_map[plugin_type] \u003d plugin, through this way, GraphWalkerListener knows which protection plugin to use for each resource node.","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"192bb07a170ec160dcd0f2cb7ddd19247dc11d21","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        for plugin_name in plugins:"},{"line_number":54,"context_line":"            try:"},{"line_number":55,"context_line":"                plugin \u003d driver.DriverManager(\"smaug.protections\","},{"line_number":56,"context_line":"                                              plugin_name,"},{"line_number":57,"context_line":"                                              invoke_on_load\u003dTrue).driver"},{"line_number":58,"context_line":"            except Exception:"},{"line_number":59,"context_line":"                LOG.exception(_LE(\"Load protection plugin %s failed.\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_a65c5126","line":56,"in_reply_to":"7af24918_cdfee06a","updated":"2016-03-02 03:41:52.000000000","message":"If we set the provider like this \"plugin\u003dOS:CINDER:VOLUME\",I think the plugin_name\u003dplugin_type.If we don\u0027t set this way,it\u0027s just a plugin_name.The GraphWalkerListener should traverse the plugin_map ,and the \"get_supported_resources_types\" method of plugin will return the supported resources types","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":15069,"name":"zhonghuali","email":"lizhonghua.li@huawei.com","username":"sloblee"},"change_message_id":"b978c6e61f10fe798c9e4ccd6f91217a9775ac2c","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    LOG.error(_LE(\"Invalid provider:%s,plugins is None \"),"},{"line_number":107,"context_line":"                              provider_name)"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                provider_id \u003d str(uuid.uuid4())"},{"line_number":110,"context_line":"                try:"},{"line_number":111,"context_line":"                    provider \u003d PluggableProtectionProvider(provider_id,"},{"line_number":112,"context_line":"                                                           provider_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_ea3a9797","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":38},"updated":"2016-03-02 08:51:57.000000000","message":"have one question here: if the id is generated by system every time, how to choose the right provider after system restarted in restore scenario?","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"519f3eab48c664985b29bd6cf47ddf65583b42f8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    LOG.error(_LE(\"Invalid provider:%s,plugins is None \"),"},{"line_number":107,"context_line":"                              provider_name)"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                provider_id \u003d str(uuid.uuid4())"},{"line_number":110,"context_line":"                try:"},{"line_number":111,"context_line":"                    provider \u003d PluggableProtectionProvider(provider_id,"},{"line_number":112,"context_line":"                                                           provider_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_68351845","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":38},"in_reply_to":"7af24918_5f62243f","updated":"2016-03-07 16:07:33.000000000","message":"Yes i think for now we should mandate that the administrator provide a unique key  i am not sure it must be a UUID \n\nWhen we provide ADMIN API it will generate this UUID","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":19720,"name":"wangliuan","email":"wangliuan2016@163.com","username":"wangliuan"},"change_message_id":"05827f532303d5ca1f14b80bd9068e12838ce477","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    LOG.error(_LE(\"Invalid provider:%s,plugins is None \"),"},{"line_number":107,"context_line":"                              provider_name)"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                provider_id \u003d str(uuid.uuid4())"},{"line_number":110,"context_line":"                try:"},{"line_number":111,"context_line":"                    provider \u003d PluggableProtectionProvider(provider_id,"},{"line_number":112,"context_line":"                                                           provider_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_5f62243f","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":38},"in_reply_to":"7af24918_73f4bf86","updated":"2016-03-03 02:49:55.000000000","message":"You mean the admin will give a unique ID in the provider configuration?","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":13070,"name":"Eran Gampel","email":"eran@gampel.net","username":"Gampel"},"change_message_id":"d39e0817b78315e75aba9bcf2c11ce597e1e6b22","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    LOG.error(_LE(\"Invalid provider:%s,plugins is None \"),"},{"line_number":107,"context_line":"                              provider_name)"},{"line_number":108,"context_line":"                    continue"},{"line_number":109,"context_line":"                provider_id \u003d str(uuid.uuid4())"},{"line_number":110,"context_line":"                try:"},{"line_number":111,"context_line":"                    provider \u003d PluggableProtectionProvider(provider_id,"},{"line_number":112,"context_line":"                                                           provider_name,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_73f4bf86","line":109,"range":{"start_line":109,"start_character":34,"end_line":109,"end_character":38},"in_reply_to":"7af24918_ea3a9797","updated":"2016-03-02 09:23:55.000000000","message":"I agree I think that Provider UUID should be configured or generated by the admin one time when he setup the Provider \n\nFor the first phase it could be part of the provider configuration","commit_id":"9f17c695c60e32f5ad8492234e89825d2b0a12a4"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"8ab65422e4f5827822a6e887061afd866030c221","unresolved":false,"context_lines":[{"line_number":30,"context_line":"               help\u003d\u0027the provider id\u0027)"},{"line_number":31,"context_line":"]"},{"line_number":32,"context_line":"CONF \u003d cfg.CONF"},{"line_number":33,"context_line":"CONF.register_opts(provider_opt)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_20f32775","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":32},"updated":"2016-03-21 15:51:27.000000000","message":"Why register the provider_opt to the global CONF?\nOther than that, all good.","commit_id":"4a3380d9da2dca8e9372f119837f010c687891fe"},{"author":{"_account_id":20883,"name":"Yuval Brik","email":"yuval@brik.org.il","username":"yuvalbr"},"change_message_id":"e40575e086986f43da5cc008baf4534d12ffa6f0","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                    LOG.exception(_LE(\"Load provider: %s failed.\"),"},{"line_number":147,"context_line":"                                  provider_name)"},{"line_number":148,"context_line":"                else:"},{"line_number":149,"context_line":"                    self.providers.append(provider)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def list_providers(self, list_option\u003dNone):"},{"line_number":152,"context_line":"        if not list_option:"},{"line_number":153,"context_line":"            return [dict(id\u003dprovider.id, name\u003dprovider.name,"},{"line_number":154,"context_line":"                         description\u003dprovider.description)"},{"line_number":155,"context_line":"                    for provider in self.providers]"},{"line_number":156,"context_line":"        # It seems that we don\u0027t need list_option"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def show_provider(self, provider_id):"},{"line_number":159,"context_line":"        provider_node \u003d [provider for provider in self.providers"},{"line_number":160,"context_line":"                         if provider.id \u003d\u003d provider_id]"},{"line_number":161,"context_line":"        if provider_node:"},{"line_number":162,"context_line":"            return provider_node[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa0719c6_3fecc88e","line":162,"range":{"start_line":149,"start_character":0,"end_line":162,"end_character":35},"updated":"2016-03-22 12:46:38.000000000","message":"We can hold the providers in a dictionary where the key is provider_id.","commit_id":"4a3380d9da2dca8e9372f119837f010c687891fe"}]}
