)]}'
{"manila/share/drivers/netapp/dataontap/cluster_mode/lib_base.py":[{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"65b47d2070240765c09b08a5e6554d725d215352","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        self._client \u003d self._get_api_client()"},{"line_number":145,"context_line":"        self._have_cluster_creds \u003d self._client.check_for_cluster_credentials()"},{"line_number":146,"context_line":"        if self._have_cluster_creds is True:"},{"line_number":147,"context_line":"            self._set_cluster_info()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self._revert_to_snapshot_support \u003d self._check_snaprestore_license()"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_2b49b1b6","line":147,"range":{"start_line":147,"start_character":12,"end_line":147,"end_character":36},"updated":"2020-06-10 23:18:51.000000000","message":"You can call the _get_licenses() method from line 189 after this. \n\nSomething like this:\n\n   if self._have_cluster_creds is True:\n       self._set_cluster_info()\n       self._licenses \u003d self._get_licenses()\n   else:\n       LOG.debug(\u0027License info not available without cluster credentials\u0027)\n       self._licenses \u003d []","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"9b57bbcc9932b315a7cd3be6d6b1a206400a04fb","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        self._client \u003d self._get_api_client()"},{"line_number":145,"context_line":"        self._have_cluster_creds \u003d self._client.check_for_cluster_credentials()"},{"line_number":146,"context_line":"        if self._have_cluster_creds is True:"},{"line_number":147,"context_line":"            self._set_cluster_info()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self._revert_to_snapshot_support \u003d self._check_snaprestore_license()"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_7e634dde","line":147,"range":{"start_line":147,"start_character":12,"end_line":147,"end_character":36},"in_reply_to":"ff570b3c_2b49b1b6","updated":"2020-06-12 16:37:05.000000000","message":"Actually, get_licenses need to be called in the else too.\nSo we can just always call:\n\nself._licenses \u003d self._get_licenses()\n\nsince \u0027_get_licenses() also checks the cluster creds.","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"65b47d2070240765c09b08a5e6554d725d215352","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if self._have_cluster_creds is True:"},{"line_number":147,"context_line":"            self._set_cluster_info()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self._revert_to_snapshot_support \u003d self._check_snaprestore_license()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # Performance monitoring library"},{"line_number":152,"context_line":"        self._perf_library \u003d performance.PerformanceLibrary(self._client)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_8bc55d0d","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":76},"updated":"2020-06-10 23:18:51.000000000","message":"Move this into the _get_licenses() method on line 189","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"9b57bbcc9932b315a7cd3be6d6b1a206400a04fb","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        if self._have_cluster_creds is True:"},{"line_number":147,"context_line":"            self._set_cluster_info()"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        self._revert_to_snapshot_support \u003d self._check_snaprestore_license()"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        # Performance monitoring library"},{"line_number":152,"context_line":"        self._perf_library \u003d performance.PerformanceLibrary(self._client)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_9edbc17b","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":76},"in_reply_to":"ff570b3c_8bc55d0d","updated":"2020-06-12 16:37:05.000000000","message":"I don\u0027t know, I prefer letting the method only retrieving licenses, not setting configs. If someday we decide to let the admin configure this capability (e.g. force disabled), will be weird to have it inside get_licenses().","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"65b47d2070240765c09b08a5e6554d725d215352","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    @na_utils.trace"},{"line_number":161,"context_line":"    def check_for_setup_error(self):"},{"line_number":162,"context_line":"        self._licenses \u003d self._get_licenses()"},{"line_number":163,"context_line":"        self._start_periodic_tasks()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _get_vserver(self, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_2bded1d9","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":45},"updated":"2020-06-10 23:18:51.000000000","message":"Right now, with this change, there\u0027ll are two separate calls to the backend to get licenses; one due to line you\u0027re adding: 149 and one here... \n\nSo remove this get_licenses call from here, and move it to do_setup as suggested above.\n\nNeither this method, nor _start_periodic_tasks() makes sense in \"check_for_setup_error\" - this driver routine is to validate any config issues.. But, I don\u0027t expect you to move _start_periodic_tasks in this change. Lets treat that as an orthogonal issue..","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"9b57bbcc9932b315a7cd3be6d6b1a206400a04fb","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    @na_utils.trace"},{"line_number":161,"context_line":"    def check_for_setup_error(self):"},{"line_number":162,"context_line":"        self._licenses \u003d self._get_licenses()"},{"line_number":163,"context_line":"        self._start_periodic_tasks()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def _get_vserver(self, share_server\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_1e833158","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":45},"in_reply_to":"ff570b3c_2bded1d9","updated":"2020-06-12 16:37:05.000000000","message":"+1","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"65b47d2070240765c09b08a5e6554d725d215352","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            msg \u003d \u0027Neither NFS nor CIFS is licensed on %(backend)s\u0027"},{"line_number":206,"context_line":"            msg_args \u003d {\u0027backend\u0027: self._backend_name}"},{"line_number":207,"context_line":"            LOG.error(msg, msg_args)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        return self._licenses"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    @na_utils.trace"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_6bf1e96a","line":208,"range":{"start_line":208,"start_character":0,"end_line":208,"end_character":0},"updated":"2020-06-10 23:18:51.000000000","message":"So you can move lines 268-289 here; and simplify the whole thing.","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":18816,"name":"Maurice Escher","display_name":"carthaca","email":"maurice.escher@sap.com","username":"mapocace"},"change_message_id":"a7347f289f44dac7fc5fafdc32e023378bfc3652","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                return not (e.code \u003d\u003d netapp_api.EAPIERROR and"},{"line_number":282,"context_line":"                            no_license in e.message)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            # since it passed an empty snapshot, it should never get here"},{"line_number":285,"context_line":"            msg \u003d _(\"Caught an unexpected behavior: the fake restore to \""},{"line_number":286,"context_line":"                    \"snapshot request using \u0027fake\u0027 volume and empty string \""},{"line_number":287,"context_line":"                    \"snapshot as argument has not failed.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_9e25ab0d","line":284,"updated":"2020-06-10 13:07:39.000000000","message":"It is not impossible though (I quickly tested with ontap 9.6), but an improbable edge case to have an important volume with name \u0027fake\u0027 and an empty named snapshot in production.\n\nMore safeguarding here would be overkill, I guess.","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":30002,"name":"Douglas Viroel","email":"viroel@gmail.com","username":"dviroel"},"change_message_id":"9b57bbcc9932b315a7cd3be6d6b1a206400a04fb","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                return not (e.code \u003d\u003d netapp_api.EAPIERROR and"},{"line_number":282,"context_line":"                            no_license in e.message)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            # since it passed an empty snapshot, it should never get here"},{"line_number":285,"context_line":"            msg \u003d _(\"Caught an unexpected behavior: the fake restore to \""},{"line_number":286,"context_line":"                    \"snapshot request using \u0027fake\u0027 volume and empty string \""},{"line_number":287,"context_line":"                    \"snapshot as argument has not failed.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_9ec46194","line":284,"in_reply_to":"ff570b3c_8bbc3d6d","updated":"2020-06-12 16:37:05.000000000","message":"+1 for \u0027fake_uuid\u0027 idea.","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"65b47d2070240765c09b08a5e6554d725d215352","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                return not (e.code \u003d\u003d netapp_api.EAPIERROR and"},{"line_number":282,"context_line":"                            no_license in e.message)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            # since it passed an empty snapshot, it should never get here"},{"line_number":285,"context_line":"            msg \u003d _(\"Caught an unexpected behavior: the fake restore to \""},{"line_number":286,"context_line":"                    \"snapshot request using \u0027fake\u0027 volume and empty string \""},{"line_number":287,"context_line":"                    \"snapshot as argument has not failed.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_8bbc3d6d","line":284,"in_reply_to":"ff570b3c_9e25ab0d","updated":"2020-06-10 23:18:51.000000000","message":"Hmmm, good point. Felipe, can you use a more random fake volume name, e.g.:\n\n \"fake_%s\" % uuidutils.generate_uuid().replace(\"-\", \"_\")","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"dd77aa7bd4229772609ea789568979f22ef0b0ec","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                return not (e.code \u003d\u003d netapp_api.EAPIERROR and"},{"line_number":282,"context_line":"                            no_license in e.message)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"            # since it passed an empty snapshot, it should never get here"},{"line_number":285,"context_line":"            msg \u003d _(\"Caught an unexpected behavior: the fake restore to \""},{"line_number":286,"context_line":"                    \"snapshot request using \u0027fake\u0027 volume and empty string \""},{"line_number":287,"context_line":"                    \"snapshot as argument has not failed.\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_b04d33c6","line":284,"in_reply_to":"ff570b3c_9e25ab0d","updated":"2020-06-10 19:42:43.000000000","message":"So it might be better to raise an exception in L289 instead of returning True.\n\nIt will crash the driver, and let the operator check what\u0027s happening, instead of reporting that it has the license applied (which might be wrong).","commit_id":"129e5038bbc4fba556f746e84cafbe6ee27ed916"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"b40626c37b0ccc3867cf1f809d49dc1343133803","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            # the license exists. By the got error, it checks whether license"},{"line_number":275,"context_line":"            # is installed or not."},{"line_number":276,"context_line":"            try:"},{"line_number":277,"context_line":"                self._client.restore_snapshot(\"fake_%s\" % uuidutils.generate_uuid(dashed\u003dFalse), \"\")"},{"line_number":278,"context_line":"            except netapp_api.NaApiError as e:"},{"line_number":279,"context_line":"                no_license \u003d \u0027is not licensed\u0027"},{"line_number":280,"context_line":"                LOG.debug(\u0027Fake restore_snapshot request failed: %s\u0027, e)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_0462bead","line":277,"updated":"2020-06-12 20:02:48.000000000","message":"pep8: E501 line too long (100 \u003e 79 characters)","commit_id":"6d3b11462b6d1c71e58be8e3e402d3573187396d"},{"author":{"_account_id":18058,"name":"Lucio Seki","email":"lseki@redhat.com","username":"lseki"},"change_message_id":"0f79202414257dcbd27ad005be275b295bb3a35a","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        if not self._have_cluster_creds:"},{"line_number":484,"context_line":"            return"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        if share_protocol.lower() not in self._licenses:"},{"line_number":487,"context_line":"            current_licenses \u003d self._get_licenses()"},{"line_number":488,"context_line":"            if share_protocol.lower() not in current_licenses:"},{"line_number":489,"context_line":"                msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_99f642f9","line":486,"range":{"start_line":486,"start_character":0,"end_line":486,"end_character":56},"updated":"2020-06-18 13:10:06.000000000","message":"nit: I wonder if this is still necessary, now that you\u0027re storing the _licenses during do_setup. Maybe a customer could apply the license on-the-fly?\n\nBut it\u0027s not a big performance impact anyway.","commit_id":"6f58af1ae39b4151db5feaa72deecafb9365ca16"},{"author":{"_account_id":16643,"name":"Goutham Pacha Ravi","email":"gouthampravi@gmail.com","username":"gouthamr"},"change_message_id":"a46b057ca418c5c387e169e72d80829d770346b4","unresolved":false,"context_lines":[{"line_number":483,"context_line":"        if not self._have_cluster_creds:"},{"line_number":484,"context_line":"            return"},{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        if share_protocol.lower() not in self._licenses:"},{"line_number":487,"context_line":"            current_licenses \u003d self._get_licenses()"},{"line_number":488,"context_line":"            if share_protocol.lower() not in current_licenses:"},{"line_number":489,"context_line":"                msg_args \u003d {"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_6b6ee901","line":486,"range":{"start_line":486,"start_character":0,"end_line":486,"end_character":56},"in_reply_to":"bf51134e_99f642f9","updated":"2020-06-18 22:54:35.000000000","message":"I agree with this being concerning. It also feels like a vague optimization - something I\u0027ll leave you folks to fix up if you wish in a future patch.","commit_id":"6f58af1ae39b4151db5feaa72deecafb9365ca16"}]}
