)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9a237f7a3a82cc3a83cdf729e475376579bc4393","unresolved":false,"context_lines":[{"line_number":10,"context_line":"message for a default datastore exception will be used."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I0b7856864bfecfe3173e42cf098ad759ec8334a2"},{"line_number":13,"context_line":"Closes-Bug: ##1331408"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7aa08908_540a19d3","line":13,"updated":"2016-06-17 13:17:58.000000000","message":"only one # ...","commit_id":"199db2b2cea0ef28cdcfe22342eee4072999b00f"}],"trove/common/exception.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"c43ed01ba65dd2cd3d7dc5f0d7e27635e42baadc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    message \u003d _(\"Datastore version \u0027%(version)s\u0027 is not active.\")"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_78aa2672","line":144,"range":{"start_line":144,"start_character":6,"end_line":144,"end_character":39},"updated":"2016-06-21 20:26:52.000000000","message":"I think this should say \"DatastoreDefaultNotFound\" the extra Datastore before NotFound is redundant.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d78b11e6ea1041c32ba3622ce0209ec07d096f7","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    message \u003d _(\"Datastore version \u0027%(version)s\u0027 is not active.\")"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_b73ab434","line":144,"range":{"start_line":144,"start_character":6,"end_line":144,"end_character":39},"in_reply_to":"3aaa91ec_78aa2672","updated":"2016-06-22 12:32:09.000000000","message":"Well, DefaultNotFound would imply that a Default wasn\u0027t defined (which is the other exception). I would rather have a comment that says this exception means that a Default Datastore was specified but that Default can\u0027t be found.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"5ed6943baeec314053e7bbee9b073e6a2c51fc98","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    message \u003d _(\"Datastore version \u0027%(version)s\u0027 is not active.\")"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_0ec28e33","line":144,"range":{"start_line":144,"start_character":6,"end_line":144,"end_character":39},"in_reply_to":"3aaa91ec_b73ab434","updated":"2016-06-22 14:30:39.000000000","message":"Well, I think of the \u0027Datastore\u0027 at the beginning as a prefix (since it\u0027s on all the exceptions).  That would make the \u0027actual\u0027 exception \u0027DefaultDatastoreNotFound,\u0027 which I think is fairly descriptive.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"c43ed01ba65dd2cd3d7dc5f0d7e27635e42baadc","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_18dde242","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":41},"updated":"2016-06-21 20:26:52.000000000","message":"Since the datastore is already specified, \"Please specify datastore.\" isn\u0027t needed anymore.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d78b11e6ea1041c32ba3622ce0209ec07d096f7","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_971218b3","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":41},"in_reply_to":"3aaa91ec_18dde242","updated":"2016-06-22 12:32:09.000000000","message":"No, the user didn\u0027t specify one and the system tried to use the default which was missing.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"5ed6943baeec314053e7bbee9b073e6a2c51fc98","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_ce1d2611","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":41},"in_reply_to":"3aaa91ec_971218b3","updated":"2016-06-22 14:30:39.000000000","message":"Right Amrith - this only gets displayed if the user doesn\u0027t pass in a datastore and it can\u0027t find the default.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"5ed6943baeec314053e7bbee9b073e6a2c51fc98","unresolved":false,"context_lines":[{"line_number":144,"context_line":"class DatastoreDefaultDatastoreNotFound(TroveError):"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    message \u003d _(\"Please specify datastore. Default datastore \""},{"line_number":147,"context_line":"                \"\u0027%(datastore)s\u0027 cannot be found.\")"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"class DatastoreDefaultDatastoreNotDefined(TroveError):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_2edcaa11","line":147,"updated":"2016-06-22 14:30:39.000000000","message":"I also tried to keep the messages as close to the original as possible, for continuity.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"}],"trove/datastore/models.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"9a237f7a3a82cc3a83cdf729e475376579bc4393","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if (id_or_name \u003d\u003d"},{"line_number":348,"context_line":"                    cfg.get_configuration_property(\u0027default_datastore\u0027)):"},{"line_number":349,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"},{"line_number":350,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_f472257b","line":347,"updated":"2016-06-17 13:17:58.000000000","message":"In the context of the specific bug, if default datastore is mysql and the user issued the command:\n\ntrove create mysql --datastore mysql ...\n\nWouldn\u0027t you give the wrong error message?","commit_id":"199db2b2cea0ef28cdcfe22342eee4072999b00f"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"8318755a8a4fad047ceefda5dd7f8e58ff769cb2","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if (id_or_name \u003d\u003d"},{"line_number":348,"context_line":"                    cfg.get_configuration_property(\u0027default_datastore\u0027)):"},{"line_number":349,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"},{"line_number":350,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_aa7f94dd","line":347,"in_reply_to":"7aa08908_f472257b","updated":"2016-06-17 13:51:42.000000000","message":"Not sure, depends on what the user wants. I wouldn\u0027t say it\u0027s wrong because mysql would be the default. If the user wants to know what the default is then they could look in the conf.","commit_id":"199db2b2cea0ef28cdcfe22342eee4072999b00f"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"ef2511e19e78ce7f14dd10002eab1df57fd3c53e","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if (id_or_name \u003d\u003d"},{"line_number":348,"context_line":"                        cfg.get_configuration_property(\u0027default_datastore\u0027)):"},{"line_number":349,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"},{"line_number":350,"context_line":"                else:"},{"line_number":351,"context_line":"                    raise exception.DatastoreNotFound(datastore\u003did_or_name)"},{"line_number":352,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_4f1d5fbd","line":349,"updated":"2016-06-17 14:25:35.000000000","message":"oh?\n\nSo if a user configures a default datastore of mysql and attempts to launch mysql by explicitly specifying it, you would provide the error:\n\n\"Please specify datastore. Default datastore cannot be found.\"\n\nto which the user would respond: I did ...","commit_id":"012b1697cde0bd1fa92cc01d9f510176deacc737"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"2be4b14cbbd3fe937a082168fe5625ef94bc6570","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if cfg.get_configuration_property(\u0027default_datastore\u0027):"},{"line_number":348,"context_line":"                    raise exception.DatastoreNotFound(datastore\u003did_or_name)"},{"line_number":349,"context_line":"                else:"},{"line_number":350,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a9d85d2_3d8ddb7b","line":347,"range":{"start_line":347,"start_character":19,"end_line":347,"end_character":70},"updated":"2016-06-21 14:52:34.000000000","message":"I can see a problem with this, if the user miss typed the datastore and the default wasn\u0027t set he would receive the DatastoreDefaultDatastoreNotFound error. Is there a way to check if the user specified a datastore? That would make this easier.","commit_id":"af417a2ffb593c4577ded7958a7d9adf242ae336"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"c8bbf3eb6eb17b9fc5ebdf98cdcad04707bb701c","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if cfg.get_configuration_property(\u0027default_datastore\u0027):"},{"line_number":348,"context_line":"                    raise exception.DatastoreNotFound(datastore\u003did_or_name)"},{"line_number":349,"context_line":"                else:"},{"line_number":350,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_6cbefb00","line":347,"range":{"start_line":347,"start_character":19,"end_line":347,"end_character":70},"in_reply_to":"5a9d85d2_3208652c","updated":"2016-06-21 16:08:40.000000000","message":"I think this might be too low-level.  At this point we\u0027re already trying to load the ds - we might need to trap this where it\u0027s being called.  I\u0027ll do a bit more research.","commit_id":"af417a2ffb593c4577ded7958a7d9adf242ae336"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"92e17d4123b6dd2de3a9673f4561e8c3c9daa1be","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if cfg.get_configuration_property(\u0027default_datastore\u0027):"},{"line_number":348,"context_line":"                    raise exception.DatastoreNotFound(datastore\u003did_or_name)"},{"line_number":349,"context_line":"                else:"},{"line_number":350,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a9d85d2_722cad02","line":347,"range":{"start_line":347,"start_character":19,"end_line":347,"end_character":70},"in_reply_to":"5a9d85d2_3d8ddb7b","updated":"2016-06-21 15:54:10.000000000","message":"If the default datastore is specified but not available, the same message is given. Also, you\u0027re correct.  If you specify the wrong datastore, it\u0027ll give you a message about the default ds missing:\n\n  $ trove create myinst 2 --size 1 --datastore myyysl\n  ERROR: Please specify datastore. Default datastore cannot be found. (HTTP 400)","commit_id":"af417a2ffb593c4577ded7958a7d9adf242ae336"},{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"0c608e449e1a52525bd59db80faed2eff9117557","unresolved":false,"context_lines":[{"line_number":344,"context_line":"            try:"},{"line_number":345,"context_line":"                return cls(DBDatastore.find_by(name\u003did_or_name))"},{"line_number":346,"context_line":"            except exception.ModelNotFoundError:"},{"line_number":347,"context_line":"                if cfg.get_configuration_property(\u0027default_datastore\u0027):"},{"line_number":348,"context_line":"                    raise exception.DatastoreNotFound(datastore\u003did_or_name)"},{"line_number":349,"context_line":"                else:"},{"line_number":350,"context_line":"                    raise exception.DatastoreDefaultDatastoreNotFound()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a9d85d2_3208652c","line":347,"range":{"start_line":347,"start_character":19,"end_line":347,"end_character":70},"in_reply_to":"5a9d85d2_722cad02","updated":"2016-06-21 16:01:27.000000000","message":"To make all these problems go away, all we need to know is if the user wants to use the default or not. \n\nif \u003cuser wants to use default datastore\u003e: \n    raise DatastoreDefaultDatastoreNotFound()\nelse:\n    raise DatastoreNotFound()","commit_id":"af417a2ffb593c4577ded7958a7d9adf242ae336"}],"trove/tests/unittests/datastore/test_datastore.py":[{"author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"change_message_id":"c43ed01ba65dd2cd3d7dc5f0d7e27635e42baadc","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        datastore \u003d Datastore.load(self.ds_name)"},{"line_number":33,"context_line":"        self.assertEqual(self.ds_name, datastore.name)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @patch.object(datastore_models, \u0027CONF\u0027)"},{"line_number":36,"context_line":"    def test_create_failure_with_datastore_default(self, mock_conf):"},{"line_number":37,"context_line":"        mock_conf.default_datastore \u003d \u0027bad_ds\u0027"},{"line_number":38,"context_line":"        self.assertRaisesRegexp(exception.DatastoreDefaultDatastoreNotFound,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_6720c94a","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":43},"updated":"2016-06-21 20:26:52.000000000","message":"Nice! I was trying to figure out how to do this, I was looking at oslo_config fixtures for a while.","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"153a6f181f0dfd1fc1e5eed55eebb2cc7b6e3ec5","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        datastore \u003d Datastore.load(self.ds_name)"},{"line_number":33,"context_line":"        self.assertEqual(self.ds_name, datastore.name)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @patch.object(datastore_models, \u0027CONF\u0027)"},{"line_number":36,"context_line":"    def test_create_failure_with_datastore_default(self, mock_conf):"},{"line_number":37,"context_line":"        mock_conf.default_datastore \u003d \u0027bad_ds\u0027"},{"line_number":38,"context_line":"        self.assertRaisesRegexp(exception.DatastoreDefaultDatastoreNotFound,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_786951be","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":43},"in_reply_to":"3aaa91ec_2e4aeac5","updated":"2016-06-22 15:30:00.000000000","message":"You can actually use our own (from \u0027trove_testtools\u0027) to mck any configuration property:\n\n\u0027self.patch_conf_property(\u0027datastore_models\u0027, \u0027bad_ds\u0027)\u0027","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"},{"author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"change_message_id":"5ed6943baeec314053e7bbee9b073e6a2c51fc98","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        datastore \u003d Datastore.load(self.ds_name)"},{"line_number":33,"context_line":"        self.assertEqual(self.ds_name, datastore.name)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @patch.object(datastore_models, \u0027CONF\u0027)"},{"line_number":36,"context_line":"    def test_create_failure_with_datastore_default(self, mock_conf):"},{"line_number":37,"context_line":"        mock_conf.default_datastore \u003d \u0027bad_ds\u0027"},{"line_number":38,"context_line":"        self.assertRaisesRegexp(exception.DatastoreDefaultDatastoreNotFound,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3aaa91ec_2e4aeac5","line":35,"range":{"start_line":35,"start_character":4,"end_line":35,"end_character":43},"in_reply_to":"3aaa91ec_6720c94a","updated":"2016-06-22 14:30:39.000000000","message":"Yeah, it probably took me the most time to figure out that one line above.  Sometimes I hate mock :)","commit_id":"74804acd3a843c2133db8d87dab2c947909f60eb"}]}
