)]}'
{"cinder/tests/unit/volume/drivers/test_nfs.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"058c1d7b9aa45fc54f5c59f66da89469133cdb3b","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"            [mock.call(self.configuration.nfs_shares_config)])"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    def test_setup_should_not_throw_error_if_host_and_share_set(self):"},{"line_number":1070,"context_line":"        \"\"\"do_setup should throw error if shares file does not exist.\"\"\""},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"        drv \u003d nfs.NfsDriver(configuration\u003dself.configuration)"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_0e1f6c5c","line":1070,"updated":"2016-08-18 19:28:49.000000000","message":"Docstring does not match test case.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f65ca4b55e9c7ce6453258efa17bf028fe7b1f57","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"            [mock.call(self.configuration.nfs_shares_config)])"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    def test_setup_should_not_throw_error_if_host_and_share_set(self):"},{"line_number":1070,"context_line":"        \"\"\"do_setup should throw error if shares file does not exist.\"\"\""},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"        drv \u003d nfs.NfsDriver(configuration\u003dself.configuration)"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_ad5a2e4e","line":1070,"in_reply_to":"3ac371cc_0e1f6c5c","updated":"2016-08-22 16:55:40.000000000","message":"Done","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"058c1d7b9aa45fc54f5c59f66da89469133cdb3b","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1096,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1097,"context_line":"            drv.do_setup(self.context)"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_ae85785a","line":1096,"updated":"2016-08-18 19:28:49.000000000","message":"Missing space after file.*.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f65ca4b55e9c7ce6453258efa17bf028fe7b1f57","unresolved":false,"context_lines":[{"line_number":1093,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1094,"context_line":""},{"line_number":1095,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1096,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1097,"context_line":"            drv.do_setup(self.context)"},{"line_number":1098,"context_line":""},{"line_number":1099,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_2d359ef6","line":1096,"in_reply_to":"3ac371cc_ae85785a","updated":"2016-08-22 16:55:40.000000000","message":"This is actually the right syntax for what I am trying to catch.  Adding in the space causes the test cases to fail.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"058c1d7b9aa45fc54f5c59f66da89469133cdb3b","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1112,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1113,"context_line":"            drv.do_setup(self.context)"},{"line_number":1114,"context_line":""},{"line_number":1115,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_eea810de","line":1112,"updated":"2016-08-18 19:28:49.000000000","message":"Missing space after \"file.*\".","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f65ca4b55e9c7ce6453258efa17bf028fe7b1f57","unresolved":false,"context_lines":[{"line_number":1109,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1112,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1113,"context_line":"            drv.do_setup(self.context)"},{"line_number":1114,"context_line":""},{"line_number":1115,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_8d3c92e3","line":1112,"in_reply_to":"3ac371cc_eea810de","updated":"2016-08-22 16:55:40.000000000","message":"Same as above.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"058c1d7b9aa45fc54f5c59f66da89469133cdb3b","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"            [mock.call(self.configuration.nfs_shares_config)])"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def test_setup_throw_error_if_shares_file_doesnt_exist_no_share_host(self):"},{"line_number":1119,"context_line":"        \"\"\"do_setup should throw error if shares file does not exist.\"\"\""},{"line_number":1120,"context_line":""},{"line_number":1121,"context_line":"        drv \u003d nfs.NfsDriver(configuration\u003dself.configuration)"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_8e619cd6","line":1119,"updated":"2016-08-18 19:28:49.000000000","message":"This docstring is identical to the one on lines 1103 and 1087.  There should be a difference between these two tests.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f65ca4b55e9c7ce6453258efa17bf028fe7b1f57","unresolved":false,"context_lines":[{"line_number":1116,"context_line":"            [mock.call(self.configuration.nfs_shares_config)])"},{"line_number":1117,"context_line":""},{"line_number":1118,"context_line":"    def test_setup_throw_error_if_shares_file_doesnt_exist_no_share_host(self):"},{"line_number":1119,"context_line":"        \"\"\"do_setup should throw error if shares file does not exist.\"\"\""},{"line_number":1120,"context_line":""},{"line_number":1121,"context_line":"        drv \u003d nfs.NfsDriver(configuration\u003dself.configuration)"},{"line_number":1122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_cd268acd","line":1119,"in_reply_to":"3ac371cc_8e619cd6","updated":"2016-08-22 16:55:40.000000000","message":"Done","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"058c1d7b9aa45fc54f5c59f66da89469133cdb3b","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1127,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1128,"context_line":"            drv.do_setup(self.context)"},{"line_number":1129,"context_line":""},{"line_number":1130,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"3ac371cc_6eb54030","line":1127,"updated":"2016-08-18 19:28:49.000000000","message":"Same.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f65ca4b55e9c7ce6453258efa17bf028fe7b1f57","unresolved":false,"context_lines":[{"line_number":1124,"context_line":"        mock_os_path_exists.return_value \u003d False"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        with self.assertRaisesRegex(exception.NfsException,"},{"line_number":1127,"context_line":"                                    \"NFS config file.*doesn\u0027t exist\"):"},{"line_number":1128,"context_line":"            drv.do_setup(self.context)"},{"line_number":1129,"context_line":""},{"line_number":1130,"context_line":"        mock_os_path_exists.assert_has_calls("}],"source_content_type":"text/x-python","patch_set":2,"id":"1ac06dbe_ad218eb6","line":1127,"in_reply_to":"3ac371cc_6eb54030","updated":"2016-08-22 16:55:40.000000000","message":"Same comment as above.","commit_id":"ed2f8676fe9ad7b5c7ee92807a72d615ceb53e9d"}],"cinder/volume/drivers/nfs.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"94616ed9cbea1eb97058146e7fb23705b82843bc","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        super(NfsDriver, self).do_setup(context)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        config \u003d self.configuration.nfs_shares_config"},{"line_number":115,"context_line":"        if not config:"},{"line_number":116,"context_line":"            msg \u003d (_(\"There\u0027s no NFS config file configured (%s)\") %"},{"line_number":117,"context_line":"                   \u0027nfs_shares_config\u0027)"},{"line_number":118,"context_line":"            LOG.warning(msg)"},{"line_number":119,"context_line":"            raise exception.NfsException(msg)"},{"line_number":120,"context_line":"        if not os.path.exists(config):"},{"line_number":121,"context_line":"            msg \u003d (_(\"NFS config file at %(config)s doesn\u0027t exist\") %"},{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_bdc14b50","line":119,"range":{"start_line":115,"start_character":0,"end_line":119,"end_character":45},"updated":"2016-07-13 09:19:43.000000000","message":"We will still raise in case \"not nfs_shares_config\"?","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"e84dd0c96ebba8a0236d1c34b35f6a563c56c27c","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        super(NfsDriver, self).do_setup(context)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        config \u003d self.configuration.nfs_shares_config"},{"line_number":115,"context_line":"        if not config:"},{"line_number":116,"context_line":"            msg \u003d (_(\"There\u0027s no NFS config file configured (%s)\") %"},{"line_number":117,"context_line":"                   \u0027nfs_shares_config\u0027)"},{"line_number":118,"context_line":"            LOG.warning(msg)"},{"line_number":119,"context_line":"            raise exception.NfsException(msg)"},{"line_number":120,"context_line":"        if not os.path.exists(config):"},{"line_number":121,"context_line":"            msg \u003d (_(\"NFS config file at %(config)s doesn\u0027t exist\") %"},{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_718ed07a","line":119,"range":{"start_line":115,"start_character":0,"end_line":119,"end_character":45},"in_reply_to":"1aa78d24_49ce9f5a","updated":"2016-07-13 18:00:30.000000000","message":"This should not be checked if the nas_host/nas_share_path config method is being used.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"aa9700c622f5ec24ddbf0efa079c9417c2d5b40d","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        super(NfsDriver, self).do_setup(context)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        config \u003d self.configuration.nfs_shares_config"},{"line_number":115,"context_line":"        if not config:"},{"line_number":116,"context_line":"            msg \u003d (_(\"There\u0027s no NFS config file configured (%s)\") %"},{"line_number":117,"context_line":"                   \u0027nfs_shares_config\u0027)"},{"line_number":118,"context_line":"            LOG.warning(msg)"},{"line_number":119,"context_line":"            raise exception.NfsException(msg)"},{"line_number":120,"context_line":"        if not os.path.exists(config):"},{"line_number":121,"context_line":"            msg \u003d (_(\"NFS config file at %(config)s doesn\u0027t exist\") %"},{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_49ce9f5a","line":119,"range":{"start_line":115,"start_character":0,"end_line":119,"end_character":45},"in_reply_to":"1aa78d24_bdc14b50","updated":"2016-07-13 13:32:11.000000000","message":"Yes.  I did not change this case as, by default a path is configured so this case is less likely to happen and I wanted to minimize code churn.  I can, however, change this case if you think it is valuable.  It would only be this if the user explicitly set it to nothing.  So, I guess that would be an argument to change this as well.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"94616ed9cbea1eb97058146e7fb23705b82843bc","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_dd741737","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"updated":"2016-07-13 09:19:43.000000000","message":"Actually if someone provided incorrect path to the file I\u0027d rather raise an exception anyway instead of silently ignoring it. Hiding that may lead to making it easier to make configuration mistakes.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ea7b54333aae8a89fdb9483daa5ff63c91a37c67","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_2f4de599","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"in_reply_to":"1aa78d24_11aaecd2","updated":"2016-07-14 08:42:18.000000000","message":"Maybe what\u0027s Eric is saying in a response above is more reasonable approach? Just ignore nfs_shares_config option if nas_host or nas_share_path is set?\n\nChanging the default of an option would require a release note BTW.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e34231b188f0b27a4f881902cd3a1043ce74fd6f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_f7b8b0ea","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"in_reply_to":"1aa78d24_2f4de599","updated":"2016-08-02 20:43:29.000000000","message":"That seems like a reasonable approach.  If both nas_host and nas_share_path are set then ignore the nfs_shares_config option.  That seems nice and simple and wouldn\u0027t change the default configuration or default behavior.\n\nI will give that a try.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"aa9700c622f5ec24ddbf0efa079c9417c2d5b40d","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_8947e7a1","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"in_reply_to":"1aa78d24_7df52381","updated":"2016-07-13 13:32:11.000000000","message":"So, you are proposing that we default it to none and then not raise if it is not configured?  That sounds like a reasonable approach.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":10058,"name":"Erlon R. Cruz","email":"erlon.rodrigues.cruz@canonical.com","username":"sombrafam"},"change_message_id":"04e4e834037805b64098988dd8beb19f8c13363b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_11aaecd2","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"in_reply_to":"1aa78d24_8947e7a1","updated":"2016-07-13 17:59:47.000000000","message":"I agree with Michal. We should check for \u0027config.nfs_shares_config and os.path.exists(config.nfs_shares_config)\u0027 or \u0027nas_host and nas_share_path\u0027, setting the defaults to None.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"7f49468beb2877117c9bda2195ddf40cdab07344","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                   {\u0027config\u0027: config})"},{"line_number":123,"context_line":"            LOG.warning(msg)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"            nas_host \u003d getattr(self.configuration,"},{"line_number":126,"context_line":"                               \u0027nas_host\u0027,"},{"line_number":127,"context_line":"                               None)"},{"line_number":128,"context_line":"            nas_share_path \u003d getattr(self.configuration,"},{"line_number":129,"context_line":"                                     \u0027nas_share_path\u0027,"},{"line_number":130,"context_line":"                                     None)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"            if ((not nas_host) or (not nas_share_path)):"},{"line_number":133,"context_line":"                # It is valid to have just the nas_host and nas_share_path"},{"line_number":134,"context_line":"                # configured with not shares file.  If one of the options,"},{"line_number":135,"context_line":"                # however, is missing we should raise an exception as there"},{"line_number":136,"context_line":"                # isn\u0027t enough information to export shares."},{"line_number":137,"context_line":"                LOG.error(_LE(\"nas_host and nas_share_path must be configured \""},{"line_number":138,"context_line":"                              \"if no NFS config file exists.\"))"},{"line_number":139,"context_line":"                raise exception.NfsException(msg)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.shares \u003d {}  # address : options"},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_7df52381","line":139,"range":{"start_line":125,"start_character":0,"end_line":139,"end_character":49},"in_reply_to":"1aa78d24_dd741737","updated":"2016-07-13 09:21:37.000000000","message":"So the worse thing IMO is that we default the nfs_shares_config to a certain path, when it isn\u0027t actually needed. It should be defaulted to None IMO.","commit_id":"1ea49374029a78afa90dfa94aa65fa891859cdfe"}]}
