)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"All validation of requests is currently done against the MySQL datastore"},{"line_number":10,"context_line":"models. In order to switch to using datastore extensions for validation"},{"line_number":11,"context_line":"the models need to be refactored a bit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The current approach to guestagent/db/models.py is getting unruly and"},{"line_number":14,"context_line":"is difficult to apply to other datastores."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a8bc5a2_020a7126","line":11,"range":{"start_line":11,"start_character":11,"end_line":11,"end_character":39},"updated":"2016-09-23 02:39:45.000000000","message":"a bit eh?","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":10,"context_line":"models. In order to switch to using datastore extensions for validation"},{"line_number":11,"context_line":"the models need to be refactored a bit."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The current approach to guestagent/db/models.py is getting unruly and"},{"line_number":14,"context_line":"is difficult to apply to other datastores."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change moves the models from the guestagent package to the common"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a8bc5a2_42047916","line":13,"range":{"start_line":13,"start_character":59,"end_line":13,"end_character":65},"updated":"2016-09-23 02:39:45.000000000","message":"amen","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"}],"trove/common/db/models.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"7d8ff6603dd53f86e4901cae1268266077a49e59","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             % {\u0027desc\u0027: desc, \u0027t\u0027: type(value)})"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class DatastoreSchema(Base):"},{"line_number":60,"context_line":"    \"\"\"Represents a database schema.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, name\u003dNone, deserializing\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_d0dc43e6","line":59,"updated":"2015-11-10 16:57:33.000000000","message":"I believe these (this and DatastoreUser) classes should remain abstract. Implementing an ad-hoc set of validation rules for a generic datastore is likely not going to fit any real datastore.\n\nMaybe we could make the base \u0027unvalidated\u0027 schema/user instead, but it would then need to set \u0027_max_schema_name_length\u0027 to \u0027None\u0027...","commit_id":"b8e80859a97a87baece56acd769fafdb4fb72abd"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"99c1bf6c18069405d69bfa70a454f7734b52f1d7","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                             % {\u0027desc\u0027: desc, \u0027t\u0027: type(value)})"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class DatastoreSchema(Base):"},{"line_number":60,"context_line":"    \"\"\"Represents a database schema.\"\"\""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def __init__(self, name\u003dNone, deserializing\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da85f559_26a31551","line":59,"in_reply_to":"da85f559_d0dc43e6","updated":"2015-11-10 17:25:07.000000000","message":"I disagree on them remaining abstract. The idea here is for the Datastore* classes to be the default for datastores unless they implement their own subclass. The only check we have here is for the name length - I will set the default max lengths to None to skip the checks.","commit_id":"b8e80859a97a87baece56acd769fafdb4fb72abd"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"63a8676dd48ca4ceef150b557627f48942b2c174","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    \"\"\"Base model for the datastore schema and user models.\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # (str) name of the datastore manager as seen in the cfg"},{"line_number":58,"context_line":"    _manager \u003d None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def serialize(self):"},{"line_number":61,"context_line":"        return self.__dict__"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_a7834f55","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":12},"updated":"2016-08-04 20:43:41.000000000","message":"My only \u0027worry\u0027 about this patch set is that we now have yet another place with hardcoded \u0027manager name\u0027. It does not seem to be used anywhere. What is it used for?","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"2248ed40f85822a2e43bb6f3f1c9f4f4923d1dcf","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    \"\"\"Base model for the datastore schema and user models.\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # (str) name of the datastore manager as seen in the cfg"},{"line_number":58,"context_line":"    _manager \u003d None"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def serialize(self):"},{"line_number":61,"context_line":"        return self.__dict__"}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_952e0641","line":58,"range":{"start_line":58,"start_character":4,"end_line":58,"end_character":12},"in_reply_to":"bacf61ea_a7834f55","updated":"2016-08-05 15:47:08.000000000","message":"Good catch. This is an old artifact from the first draft.","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_fd48c82f","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2016-09-23 02:39:45.000000000","message":"really?","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":26,"context_line":"provide validation. To add a new datastore create a sub-package (see mysql for"},{"line_number":27,"context_line":"example) and create new child classes inheriting from these generic classes."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As a guideline, for new datastores the following class methods/variables should"},{"line_number":30,"context_line":"be overridden as needed (see their docstrings for additional info):"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"DatastoreModelsBase:"},{"line_number":33,"context_line":"        __init__"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_fd6fe88f","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":67},"updated":"2016-09-23 02:39:45.000000000","message":"so, while you make this statement, this source file contains several implementations for the functions that you say should be overridden.\n\nWould it not be better to remove those implementations, or just pass, or just make them Raise and make this a collection of abstract base classes?","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        \"\"\""},{"line_number":140,"context_line":"        return None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _is_valid_schema_name(self, value):"},{"line_number":143,"context_line":"        \"\"\"Validate a given schema name."},{"line_number":144,"context_line":"        :param value:        Validated schema name."},{"line_number":145,"context_line":"        :type value:         string"},{"line_number":146,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        return True"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def verify_dict(self):"},{"line_number":151,"context_line":"        \"\"\"Check that the object\u0027s dictionary values are valid by reloading"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_7da678c2","line":148,"range":{"start_line":142,"start_character":4,"end_line":148,"end_character":19},"updated":"2016-09-23 02:39:45.000000000","message":"maybe the earlier comment was too extreme, not a pure abc but at least make methods like these raise, and force a per-datastore implementation.","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0eef0af77d40dc7b3dc7dbbd941992ad85255e66","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        \"\"\""},{"line_number":140,"context_line":"        return None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _is_valid_schema_name(self, value):"},{"line_number":143,"context_line":"        \"\"\"Validate a given schema name."},{"line_number":144,"context_line":"        :param value:        Validated schema name."},{"line_number":145,"context_line":"        :type value:         string"},{"line_number":146,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":147,"context_line":"        \"\"\""},{"line_number":148,"context_line":"        return True"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def verify_dict(self):"},{"line_number":151,"context_line":"        \"\"\"Check that the object\u0027s dictionary values are valid by reloading"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a98d1f4_abac60ee","line":148,"range":{"start_line":142,"start_character":4,"end_line":148,"end_character":19},"in_reply_to":"5a8bc5a2_7da678c2","updated":"2016-09-28 18:34:41.000000000","message":"No because then this generic class is unusable by itself.","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.name \u003d self._name"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @property"},{"line_number":159,"context_line":"    def ignored_dbs(self):"},{"line_number":160,"context_line":"        return cfg.get_ignored_dbs()"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def is_ignored(self):"},{"line_number":163,"context_line":"        return self.name in self.ignored_dbs"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_7dd83854","line":160,"range":{"start_line":159,"start_character":2,"end_line":160,"end_character":36},"updated":"2016-09-23 02:39:45.000000000","message":"so here\u0027s an example of where I think this change could go further and take out the code in common/cfg.py in get_configuration_property() which attempts to default to \u0027mysql\u0027.","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0eef0af77d40dc7b3dc7dbbd941992ad85255e66","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        self.name \u003d self._name"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    @property"},{"line_number":159,"context_line":"    def ignored_dbs(self):"},{"line_number":160,"context_line":"        return cfg.get_ignored_dbs()"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def is_ignored(self):"},{"line_number":163,"context_line":"        return self.name in self.ignored_dbs"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a98d1f4_8b96c492","line":160,"range":{"start_line":159,"start_character":2,"end_line":160,"end_character":36},"in_reply_to":"5a8bc5a2_7dd83854","updated":"2016-09-28 18:34:41.000000000","message":"Let\u0027s do that in a separate patch.","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        reserved."},{"line_number":168,"context_line":"        :raises:             ValueError if name is on the reserved list."},{"line_number":169,"context_line":"        \"\"\""},{"line_number":170,"context_line":"        if self.name in self.ignored_dbs:"},{"line_number":171,"context_line":"            raise ValueError(_(\u0027Database name \"%(name)s\" is on the reserved\u0027"},{"line_number":172,"context_line":"                               \u0027list: %(reserved)s.\u0027)"},{"line_number":173,"context_line":"                             % {\u0027name\u0027: self.name,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_3def90e9","line":170,"range":{"start_line":170,"start_character":0,"end_line":170,"end_character":41},"updated":"2016-09-23 02:39:45.000000000","message":"why not call is_ignored() the method is right here, just a short walk according to google maps","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0eef0af77d40dc7b3dc7dbbd941992ad85255e66","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        reserved."},{"line_number":168,"context_line":"        :raises:             ValueError if name is on the reserved list."},{"line_number":169,"context_line":"        \"\"\""},{"line_number":170,"context_line":"        if self.name in self.ignored_dbs:"},{"line_number":171,"context_line":"            raise ValueError(_(\u0027Database name \"%(name)s\" is on the reserved\u0027"},{"line_number":172,"context_line":"                               \u0027list: %(reserved)s.\u0027)"},{"line_number":173,"context_line":"                             % {\u0027name\u0027: self.name,"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a98d1f4_cb90cc98","line":170,"range":{"start_line":170,"start_character":0,"end_line":170,"end_character":41},"in_reply_to":"5a8bc5a2_3def90e9","updated":"2016-09-28 18:34:41.000000000","message":"Right.","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            raise ValueError(_(\"\u0027%s\u0027 is not a valid user name.\") % value)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @property"},{"line_number":320,"context_line":"    def _max_user_name_length(self):"},{"line_number":321,"context_line":"        \"\"\"Return the maximum valid user name length if any."},{"line_number":322,"context_line":"        :returns:            Maximum user name length or None if unlimited."},{"line_number":323,"context_line":"        \"\"\""},{"line_number":324,"context_line":"        return None"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _is_valid_user_name(self, value):"},{"line_number":327,"context_line":"        \"\"\"Validate a given user name."},{"line_number":328,"context_line":"        :param value:        User name to be validated."},{"line_number":329,"context_line":"        :type value:         string"},{"line_number":330,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":331,"context_line":"        \"\"\""},{"line_number":332,"context_line":"        return True"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def _is_valid_host_name(self, value):"},{"line_number":335,"context_line":"        \"\"\"Validate a given host name."},{"line_number":336,"context_line":"        :param value:        Host name to be validated."},{"line_number":337,"context_line":"        :type value:         string"},{"line_number":338,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":339,"context_line":"        \"\"\""},{"line_number":340,"context_line":"        return True"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _is_valid_password(self, value):"},{"line_number":343,"context_line":"        \"\"\"Validate a given password."}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_3dc6b067","line":340,"range":{"start_line":320,"start_character":1,"end_line":340,"end_character":19},"updated":"2016-09-23 02:39:45.000000000","message":"i submit to you that all of these should raise ...","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0eef0af77d40dc7b3dc7dbbd941992ad85255e66","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            raise ValueError(_(\"\u0027%s\u0027 is not a valid user name.\") % value)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"    @property"},{"line_number":320,"context_line":"    def _max_user_name_length(self):"},{"line_number":321,"context_line":"        \"\"\"Return the maximum valid user name length if any."},{"line_number":322,"context_line":"        :returns:            Maximum user name length or None if unlimited."},{"line_number":323,"context_line":"        \"\"\""},{"line_number":324,"context_line":"        return None"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def _is_valid_user_name(self, value):"},{"line_number":327,"context_line":"        \"\"\"Validate a given user name."},{"line_number":328,"context_line":"        :param value:        User name to be validated."},{"line_number":329,"context_line":"        :type value:         string"},{"line_number":330,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":331,"context_line":"        \"\"\""},{"line_number":332,"context_line":"        return True"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"    def _is_valid_host_name(self, value):"},{"line_number":335,"context_line":"        \"\"\"Validate a given host name."},{"line_number":336,"context_line":"        :param value:        Host name to be validated."},{"line_number":337,"context_line":"        :type value:         string"},{"line_number":338,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":339,"context_line":"        \"\"\""},{"line_number":340,"context_line":"        return True"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    def _is_valid_password(self, value):"},{"line_number":343,"context_line":"        \"\"\"Validate a given password."}],"source_content_type":"text/x-python","patch_set":22,"id":"3a98d1f4_0b0554c1","line":340,"range":{"start_line":320,"start_character":1,"end_line":340,"end_character":19},"in_reply_to":"5a8bc5a2_3dc6b067","updated":"2016-09-28 18:34:41.000000000","message":"see earlier","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        :type value:         string"},{"line_number":346,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":347,"context_line":"        \"\"\""},{"line_number":348,"context_line":"        return True"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def _is_valid_database(self, value):"},{"line_number":351,"context_line":"        \"\"\"Validate a given database (serialized schema object)."}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_1d77343b","line":348,"updated":"2016-09-23 02:39:45.000000000","message":"raise","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":355,"context_line":"        :raises:             ValueError if operation not allowed."},{"line_number":356,"context_line":"        \"\"\""},{"line_number":357,"context_line":"        if value in self.databases:"},{"line_number":358,"context_line":"            # valid if the database is not already in the list"},{"line_number":359,"context_line":"            return False"},{"line_number":360,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_9d8264ff","line":357,"updated":"2016-09-23 02:39:45.000000000","message":"return value not in self.databases","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"0eef0af77d40dc7b3dc7dbbd941992ad85255e66","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        :returns:            TRUE if valid, FALSE otherwise."},{"line_number":355,"context_line":"        :raises:             ValueError if operation not allowed."},{"line_number":356,"context_line":"        \"\"\""},{"line_number":357,"context_line":"        if value in self.databases:"},{"line_number":358,"context_line":"            # valid if the database is not already in the list"},{"line_number":359,"context_line":"            return False"},{"line_number":360,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"3a98d1f4_2b3130a3","line":357,"in_reply_to":"5a8bc5a2_9d8264ff","updated":"2016-09-28 18:34:41.000000000","message":"ok","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d842cac4427ba6eb9264c0ca98f96da4eb78623","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a98d1f4_1696f3ef","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2016-09-30 10:34:33.000000000","message":"oh, so you are an employee of the foundation now ...","commit_id":"2717174a23168f9f9500c4cb18731a364ebd7e12"}],"trove/common/db/mysql/data.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2011 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_3dd95022","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2016-09-23 02:39:45.000000000","message":"mildly questionable","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d842cac4427ba6eb9264c0ca98f96da4eb78623","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a98d1f4_16643320","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2016-09-30 10:34:33.000000000","message":"ditto","commit_id":"2717174a23168f9f9500c4cb18731a364ebd7e12"}],"trove/common/db/mysql/models.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_fdad2832","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-09-23 02:39:45.000000000","message":":)","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d842cac4427ba6eb9264c0ca98f96da4eb78623","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a98d1f4_962683cc","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2016-09-30 10:34:33.000000000","message":"ditto","commit_id":"2717174a23168f9f9500c4cb18731a364ebd7e12"}],"trove/guestagent/datastore/experimental/cassandra/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"63a8676dd48ca4ceef150b557627f48942b2c174","unresolved":false,"context_lines":[{"line_number":1120,"context_line":""},{"line_number":1121,"context_line":"        return None"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"    def _check_reserved_keyspace_name(self, name):"},{"line_number":1124,"context_line":"        if name in self.ignore_dbs:"},{"line_number":1125,"context_line":"            raise ValueError(_(\"This keyspace-name is reserved: %s\") % name)"},{"line_number":1126,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_e70c27ee","line":1123,"range":{"start_line":1123,"start_character":8,"end_line":1123,"end_character":37},"updated":"2016-08-04 20:43:41.000000000","message":"This is a minor point. I think we could possibly get rid of these. As far as I can tell they do the same thing as foo.check_reserved()\nI\u0027d rather see these check at one place, but it can be done later...","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"2248ed40f85822a2e43bb6f3f1c9f4f4923d1dcf","unresolved":false,"context_lines":[{"line_number":1120,"context_line":""},{"line_number":1121,"context_line":"        return None"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"    def _check_reserved_keyspace_name(self, name):"},{"line_number":1124,"context_line":"        if name in self.ignore_dbs:"},{"line_number":1125,"context_line":"            raise ValueError(_(\"This keyspace-name is reserved: %s\") % name)"},{"line_number":1126,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_f5c14281","line":1123,"range":{"start_line":1123,"start_character":8,"end_line":1123,"end_character":37},"in_reply_to":"bacf61ea_e70c27ee","updated":"2016-08-05 15:47:08.000000000","message":"Done","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"63a8676dd48ca4ceef150b557627f48942b2c174","unresolved":false,"context_lines":[{"line_number":1134,"context_line":""},{"line_number":1135,"context_line":"        return None"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    def _check_reserved_user_name(self, name):"},{"line_number":1138,"context_line":"        if name in self.ignore_users:"},{"line_number":1139,"context_line":"            raise ValueError(_(\"This user-name is reserved: %s\") % name)"},{"line_number":1140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_27fbdfc2","line":1137,"range":{"start_line":1137,"start_character":8,"end_line":1137,"end_character":33},"updated":"2016-08-04 20:43:41.000000000","message":"ditto","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"2248ed40f85822a2e43bb6f3f1c9f4f4923d1dcf","unresolved":false,"context_lines":[{"line_number":1134,"context_line":""},{"line_number":1135,"context_line":"        return None"},{"line_number":1136,"context_line":""},{"line_number":1137,"context_line":"    def _check_reserved_user_name(self, name):"},{"line_number":1138,"context_line":"        if name in self.ignore_users:"},{"line_number":1139,"context_line":"            raise ValueError(_(\"This user-name is reserved: %s\") % name)"},{"line_number":1140,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"bacf61ea_9539e6a6","line":1137,"range":{"start_line":1137,"start_character":8,"end_line":1137,"end_character":33},"in_reply_to":"bacf61ea_27fbdfc2","updated":"2016-08-05 15:47:08.000000000","message":"Done","commit_id":"f556dc622390734eee06a5c4aa1b82146e3c9495"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"77ff7e9b5f3db8996032c65d9758a76f76ef3beb","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        Grant all non-superuser permissions on a keyspace to a given user."},{"line_number":966,"context_line":"        \"\"\""},{"line_number":967,"context_line":"        if check_reserved:"},{"line_number":968,"context_line":"            models.CassandraUser(user.name).check_reserved()"},{"line_number":969,"context_line":"            models.CassandraSchema(keyspace.name).check_reserved()"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"        for access in self.__NO_SUPERUSER_MODIFIERS:"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_c7273561","line":968,"updated":"2016-08-05 15:54:55.000000000","message":"You don\u0027t need to construct a new user here. The \u0027user\u0027 and \u0027keyspace\u0027 objects are already of type \u0027CassandraUser\u0027 and \u0027CassandraSchema\u0027. Just call the method on them.","commit_id":"d34e0f70a8235a25f088a67c1ba7e037e2025c9f"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"77ff7e9b5f3db8996032c65d9758a76f76ef3beb","unresolved":false,"context_lines":[{"line_number":990,"context_line":"                                       check_reserved\u003dTrue):"},{"line_number":991,"context_line":"        if check_reserved:"},{"line_number":992,"context_line":"            models.CassandraUser(user.name).check_reserved()"},{"line_number":993,"context_line":"            models.CassandraSchema(keyspace.name).check_reserved()"},{"line_number":994,"context_line":""},{"line_number":995,"context_line":"        LOG.debug(\"Revoking all permissions on \u0027%s\u0027 from user \u0027%s\u0027.\""},{"line_number":996,"context_line":"                  % (keyspace.name, user.name))"}],"source_content_type":"text/x-python","patch_set":16,"id":"bacf61ea_a7d5e11c","line":993,"updated":"2016-08-05 15:54:55.000000000","message":"ditto","commit_id":"d34e0f70a8235a25f088a67c1ba7e037e2025c9f"}],"trove/guestagent/datastore/experimental/mongodb/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"9f936127c8a974dfda4c40ad2cdfc6933f82110f","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        with MongoDBClient(self._admin_user()) as client:"},{"line_number":596,"context_line":"            for item in users:"},{"line_number":597,"context_line":"                user \u003d models.MongoDBUser.deserialize(item)"},{"line_number":598,"context_line":"                user.check_create()"},{"line_number":599,"context_line":"                self.create_user(user, client)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def delete_user(self, user):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_5b053912","line":598,"updated":"2015-11-30 19:12:10.000000000","message":"For user operations, if we check on create and delete, should not we also check on grant, revoke, get, change_password and update_attributes?\nI understand this will ultimately be handled in the API, but if we put seat-belts in the guest-agent we should probably put them on all related calls.","commit_id":"c796e99a14f1701d6203bf4665ec1bd25678109b"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"a045ccf4873539a18eb5f667026dbbfebfa8e8ac","unresolved":false,"context_lines":[{"line_number":595,"context_line":"        with MongoDBClient(self._admin_user()) as client:"},{"line_number":596,"context_line":"            for item in users:"},{"line_number":597,"context_line":"                user \u003d models.MongoDBUser.deserialize(item)"},{"line_number":598,"context_line":"                user.check_create()"},{"line_number":599,"context_line":"                self.create_user(user, client)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def delete_user(self, user):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_64086bda","line":598,"in_reply_to":"9a8ffd7b_5b053912","updated":"2015-12-01 15:32:54.000000000","message":"Add it later when we beef out the actual validation code.","commit_id":"c796e99a14f1701d6203bf4665ec1bd25678109b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"9f936127c8a974dfda4c40ad2cdfc6933f82110f","unresolved":false,"context_lines":[{"line_number":634,"context_line":"            for user_info in admin_client.admin.system.users.find():"},{"line_number":635,"context_line":"                user \u003d models.MongoDBUser(name\u003duser_info[\u0027_id\u0027])"},{"line_number":636,"context_line":"                user.roles \u003d user_info[\u0027roles\u0027]"},{"line_number":637,"context_line":"                if user.name not in cfg.get_ignored_users(manager\u003d\u0027mongodb\u0027):"},{"line_number":638,"context_line":"                    users.append(user.serialize())"},{"line_number":639,"context_line":"        LOG.debug(\u0027users \u003d \u0027 + str(users))"},{"line_number":640,"context_line":"        return pagination.paginate_list(users, limit, marker,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_167308b6","line":637,"range":{"start_line":637,"start_character":40,"end_line":637,"end_character":57},"updated":"2015-11-30 19:12:10.000000000","message":"We should probably encapsulate this check in the model object (a call such as \u0027is_ignored\u0027, so that the datastore does not have to be passed in from the guest code).\nAlso code such this is going to be common across different datastores.","commit_id":"c796e99a14f1701d6203bf4665ec1bd25678109b"},{"author":{"_account_id":15321,"name":"Matthew Van Dijk","email":"mvandijk@tesora.com","username":"mvandijk"},"change_message_id":"a045ccf4873539a18eb5f667026dbbfebfa8e8ac","unresolved":false,"context_lines":[{"line_number":634,"context_line":"            for user_info in admin_client.admin.system.users.find():"},{"line_number":635,"context_line":"                user \u003d models.MongoDBUser(name\u003duser_info[\u0027_id\u0027])"},{"line_number":636,"context_line":"                user.roles \u003d user_info[\u0027roles\u0027]"},{"line_number":637,"context_line":"                if user.name not in cfg.get_ignored_users(manager\u003d\u0027mongodb\u0027):"},{"line_number":638,"context_line":"                    users.append(user.serialize())"},{"line_number":639,"context_line":"        LOG.debug(\u0027users \u003d \u0027 + str(users))"},{"line_number":640,"context_line":"        return pagination.paginate_list(users, limit, marker,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_c4f917ca","line":637,"range":{"start_line":637,"start_character":40,"end_line":637,"end_character":57},"in_reply_to":"9a8ffd7b_167308b6","updated":"2015-12-01 15:32:54.000000000","message":"done","commit_id":"c796e99a14f1701d6203bf4665ec1bd25678109b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"9f936127c8a974dfda4c40ad2cdfc6933f82110f","unresolved":false,"context_lines":[{"line_number":729,"context_line":"    def list_databases(self, limit\u003dNone, marker\u003dNone, include_marker\u003dFalse):"},{"line_number":730,"context_line":"        \"\"\"Lists the databases.\"\"\""},{"line_number":731,"context_line":"        db_names \u003d self.list_database_names()"},{"line_number":732,"context_line":"        for hidden in cfg.get_ignored_dbs(manager\u003d\u0027mongodb\u0027):"},{"line_number":733,"context_line":"            if hidden in db_names:"},{"line_number":734,"context_line":"                db_names.remove(hidden)"},{"line_number":735,"context_line":"        databases \u003d [models.MongoDBSchema(db_name).serialize()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_369f2cb6","line":732,"range":{"start_line":732,"start_character":26,"end_line":732,"end_character":41},"updated":"2015-11-30 19:12:10.000000000","message":"ditto","commit_id":"c796e99a14f1701d6203bf4665ec1bd25678109b"}],"trove/tests/unittests/common/test_dbmodels.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"29b9b6b8177a227a8941e47e9c2c999d29977542","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a8bc5a2_fd8608b8","line":1,"range":{"start_line":1,"start_character":15,"end_line":1,"end_character":19},"updated":"2016-09-23 02:39:45.000000000","message":":)","commit_id":"b0e393cc4ad12b9b79d49d304ddede93ac65fa0a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"0d842cac4427ba6eb9264c0ca98f96da4eb78623","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2012 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a98d1f4_0c4fc76b","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":40},"updated":"2016-09-30 10:34:33.000000000","message":"nice ...","commit_id":"2717174a23168f9f9500c4cb18731a364ebd7e12"}]}
