)]}'
{"trove/common/strategies/cluster/experimental/pxc/taskmanager.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"93bac69090c556df13aac7c5df629af6e45c4575","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                new_instances):"},{"line_number":157,"context_line":"        \"\"\"Check for existing instances root enabled\"\"\""},{"line_number":158,"context_line":"        for instance in existing_instances:"},{"line_number":159,"context_line":"            if ext_models.Root.load(context, instance.id):"},{"line_number":160,"context_line":"                for new_instance in new_instances:"},{"line_number":161,"context_line":"                    ext_models.RootHistory.create(context, new_instance.id,"},{"line_number":162,"context_line":"                                                  context.user)"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_45a511a0","line":159,"updated":"2016-02-17 17:16:47.000000000","message":"I think this can return after the first success or else it unnecessarily runs multiple times.","commit_id":"75151857e8acf72eec1033a9a6ef93cc74ea14ed"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"0124ac0d92a54de73ba5d5ec0dd8757f86d352f3","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                new_instances):"},{"line_number":157,"context_line":"        \"\"\"Check for existing instances root enabled\"\"\""},{"line_number":158,"context_line":"        for instance in existing_instances:"},{"line_number":159,"context_line":"            if ext_models.Root.load(context, instance.id):"},{"line_number":160,"context_line":"                for new_instance in new_instances:"},{"line_number":161,"context_line":"                    ext_models.RootHistory.create(context, new_instance.id,"},{"line_number":162,"context_line":"                                                  context.user)"}],"source_content_type":"text/x-python","patch_set":22,"id":"dae33548_3e5d7b79","line":159,"in_reply_to":"dae33548_45a511a0","updated":"2016-02-17 18:32:44.000000000","message":"oh yeah its a little overkill here now that i look at it again.","commit_id":"75151857e8acf72eec1033a9a6ef93cc74ea14ed"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"73a2de27ecd6638d796d08d303807a89e08b5482","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                for new_instance in new_instances:"},{"line_number":161,"context_line":"                    ext_models.RootHistory.create(context, new_instance.id,"},{"line_number":162,"context_line":"                                                  context.user)"},{"line_number":163,"context_line":"                    return"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    def grow_cluster(self, context, cluster_id, new_instance_ids):"},{"line_number":166,"context_line":"        LOG.debug(\"Begin pxc grow_cluster for id: %s.\" % cluster_id)"}],"source_content_type":"text/x-python","patch_set":23,"id":"dae33548_783c2ec8","line":163,"updated":"2016-02-17 22:15:08.000000000","message":"this should be at the end of the if not the inner for loop so that all the new instances are set.","commit_id":"c1ef0e8724984fd09d74bdbcba71dd50beb486f6"}],"trove/extensions/common/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            is_root_enabled \u003d models.ClusterRoot.load(context, instance_id)"},{"line_number":98,"context_line":"        except exception.UnprocessableEntity:"},{"line_number":99,"context_line":"            raise exception.UnprocessableEntity("},{"line_number":100,"context_line":"                \"Cluster %s is not ready.\" % instance_id)"},{"line_number":101,"context_line":"        return wsgi.Result(views.RootEnabledView(is_root_enabled).data(), 200)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def cluster_root_index(self, req, tenant_id, cluster_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_9223b855","line":100,"range":{"start_line":98,"start_character":8,"end_line":100,"end_character":57},"updated":"2016-02-08 18:15:01.000000000","message":"I don\u0027t think this is necessary. The single-instance version also does not raise an \u0027Instance not ready\u0027 error.","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            is_root_enabled \u003d models.ClusterRoot.load(context, instance_id)"},{"line_number":98,"context_line":"        except exception.UnprocessableEntity:"},{"line_number":99,"context_line":"            raise exception.UnprocessableEntity("},{"line_number":100,"context_line":"                \"Cluster %s is not ready.\" % instance_id)"},{"line_number":101,"context_line":"        return wsgi.Result(views.RootEnabledView(is_root_enabled).data(), 200)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def cluster_root_index(self, req, tenant_id, cluster_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_6e6bacb7","line":100,"range":{"start_line":98,"start_character":8,"end_line":100,"end_character":57},"in_reply_to":"5a5ae5dd_9223b855","updated":"2016-02-08 21:44:22.000000000","message":"It does raise an error of \"Instance is not ready.\" if the instance is in BUILD state or something. This changes the exception sent back as Cluster not as Instance.\n\n\nhttps://github.com/openstack/trove/blob/00c1e12909940c50aba8181cf7083d19728bcfa3/trove/extensions/common/models.py#L36","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        LOG.info(_LI(\"req : \u0027%s\u0027\\n\\n\") % req)"},{"line_number":119,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":120,"context_line":"        user_name \u003d context.user"},{"line_number":121,"context_line":"        if body:"},{"line_number":122,"context_line":"            password \u003d body[\u0027password\u0027] if \u0027password\u0027 in body else None"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            password \u003d None"},{"line_number":125,"context_line":"        root \u003d models.ClusterRoot.create(context, instance_id, user_name,"},{"line_number":126,"context_line":"                                         password, cluster_instances)"},{"line_number":127,"context_line":"        return wsgi.Result(views.RootCreatedView(root).data(), 200)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_52ac608b","line":124,"range":{"start_line":121,"start_character":8,"end_line":124,"end_character":27},"updated":"2016-02-08 18:15:01.000000000","message":"This could be encapsulated in a utility method in the base (\u0027_get_password_from_body\u0027). It could be then reused both here and in the base.","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        LOG.info(_LI(\"req : \u0027%s\u0027\\n\\n\") % req)"},{"line_number":119,"context_line":"        context \u003d req.environ[wsgi.CONTEXT_KEY]"},{"line_number":120,"context_line":"        user_name \u003d context.user"},{"line_number":121,"context_line":"        if body:"},{"line_number":122,"context_line":"            password \u003d body[\u0027password\u0027] if \u0027password\u0027 in body else None"},{"line_number":123,"context_line":"        else:"},{"line_number":124,"context_line":"            password \u003d None"},{"line_number":125,"context_line":"        root \u003d models.ClusterRoot.create(context, instance_id, user_name,"},{"line_number":126,"context_line":"                                         password, cluster_instances)"},{"line_number":127,"context_line":"        return wsgi.Result(views.RootCreatedView(root).data(), 200)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_6ec72c96","line":124,"range":{"start_line":121,"start_character":8,"end_line":124,"end_character":27},"in_reply_to":"5a5ae5dd_52ac608b","updated":"2016-02-08 21:44:22.000000000","message":"Done","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"}],"trove/extensions/vertica/service.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class VerticaRootController(ClusterRootController):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _get_cluster_instance_id(self, tenant_id, cluster_id):"},{"line_number":27,"context_line":"        args \u003d {\u0027tenant_id\u0027: tenant_id, \u0027cluster_id\u0027: cluster_id}"},{"line_number":28,"context_line":"        cluster_instances \u003d DBInstance.find_all(**args).all()"},{"line_number":29,"context_line":"        instance_ids \u003d [db_instance.id for db_instance in cluster_instances]"},{"line_number":30,"context_line":"        args \u003d {\u0027tenant_id\u0027: tenant_id, \u0027cluster_id\u0027: cluster_id, \u0027type\u0027:"},{"line_number":31,"context_line":"                \u0027master\u0027}"},{"line_number":32,"context_line":"        master_instance \u003d DBInstance.find_by(**args)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_1502520a","line":29,"range":{"start_line":27,"start_character":8,"end_line":29,"end_character":76},"updated":"2016-02-08 18:15:01.000000000","message":"This piece seems to be the identical to the base implementation. Could be pulled up into a utility method (_find_cluster_node_ids or something).","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"class VerticaRootController(ClusterRootController):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _get_cluster_instance_id(self, tenant_id, cluster_id):"},{"line_number":27,"context_line":"        args \u003d {\u0027tenant_id\u0027: tenant_id, \u0027cluster_id\u0027: cluster_id}"},{"line_number":28,"context_line":"        cluster_instances \u003d DBInstance.find_all(**args).all()"},{"line_number":29,"context_line":"        instance_ids \u003d [db_instance.id for db_instance in cluster_instances]"},{"line_number":30,"context_line":"        args \u003d {\u0027tenant_id\u0027: tenant_id, \u0027cluster_id\u0027: cluster_id, \u0027type\u0027:"},{"line_number":31,"context_line":"                \u0027master\u0027}"},{"line_number":32,"context_line":"        master_instance \u003d DBInstance.find_by(**args)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_0ec238e9","line":29,"range":{"start_line":27,"start_character":8,"end_line":29,"end_character":76},"in_reply_to":"5a5ae5dd_1502520a","updated":"2016-02-08 21:44:22.000000000","message":"Done","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"}],"trove/tests/scenario/groups/cluster_actions_group.py":[{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"339abb85cd815bd1211000edf93a5eedb3457285","unresolved":false,"context_lines":[{"line_number":52,"context_line":"          runs_after\u003d[cluster_root_enable])"},{"line_number":53,"context_line":"    def cluster_grow(self):"},{"line_number":54,"context_line":"        \"\"\"Grow cluster.\"\"\""},{"line_number":55,"context_line":"        self.test_runner.run_cluster_grow()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @test(depends_on\u003d[cluster_grow, add_initial_cluster_data])"},{"line_number":58,"context_line":"    def verify_initial_cluster_data_after_grow(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_5f93a64f","line":55,"updated":"2016-01-13 06:06:13.000000000","message":"should verify after grow and shrink that the root user is enabled and available for connection.","commit_id":"e192da0e785d173161a70d51297b12c67ce9577b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.test_runner.run_verify_cluster_root_enable()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test(depends_on\u003d[cluster_create],"},{"line_number":57,"context_line":"          runs_after\u003d[verify_cluster_root_enable])"},{"line_number":58,"context_line":"    def cluster_grow(self):"},{"line_number":59,"context_line":"        \"\"\"Grow cluster.\"\"\""},{"line_number":60,"context_line":"        self.test_runner.run_cluster_grow()"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_55e68a44","line":57,"range":{"start_line":57,"start_character":22,"end_line":57,"end_character":48},"updated":"2016-02-08 18:15:01.000000000","message":"This must also run after \u0027verify_initial_cluster_data\u0027. You need to add it to the list.","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.test_runner.run_verify_cluster_root_enable()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    @test(depends_on\u003d[cluster_create],"},{"line_number":57,"context_line":"          runs_after\u003d[verify_cluster_root_enable])"},{"line_number":58,"context_line":"    def cluster_grow(self):"},{"line_number":59,"context_line":"        \"\"\"Grow cluster.\"\"\""},{"line_number":60,"context_line":"        self.test_runner.run_cluster_grow()"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_ee4c7c9f","line":57,"range":{"start_line":57,"start_character":22,"end_line":57,"end_character":48},"in_reply_to":"5a5ae5dd_55e68a44","updated":"2016-02-08 21:44:22.000000000","message":"Done","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"}],"trove/tests/scenario/helpers/sql_helper.py":[{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return (\u0027%(protocol)s://%(user)s:%(password)s@%(host)s/%(database)s\u0027"},{"line_number":58,"context_line":"                % credentials)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _get_root_connection_string(self, host):"},{"line_number":61,"context_line":"        if self.port:"},{"line_number":62,"context_line":"            host \u003d \"%s:%d\" % (host, self.port)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        root_creds \u003d {\u0027protocol\u0027: self.protocol,"},{"line_number":65,"context_line":"                      \u0027host\u0027: host,"},{"line_number":66,"context_line":"                      \u0027user\u0027: self.credentials_root.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":67,"context_line":"                      \u0027password\u0027: self.credentials_root.get(\u0027password\u0027, \u0027\u0027),"},{"line_number":68,"context_line":"                      \u0027database\u0027: self.credentials_root.get(\u0027database\u0027, \u0027\u0027)}"},{"line_number":69,"context_line":"        return (\u0027%(protocol)s://%(user)s:%(password)s@%(host)s/%(database)s\u0027"},{"line_number":70,"context_line":"                % root_creds)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    # Add data overrides"},{"line_number":73,"context_line":"    def add_actual_data(self, data_label, data_start, data_size, host,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_f5b536ec","line":70,"range":{"start_line":60,"start_character":4,"end_line":70,"end_character":29},"updated":"2016-02-08 18:15:01.000000000","message":"This is too much unnecessary duplication, just create \u0027_build_connection_string(self, creds)\u0027 and call it in \u0027_get_connection_string\u0027 and \u0027_get_root_connection_string\u0027","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        return (\u0027%(protocol)s://%(user)s:%(password)s@%(host)s/%(database)s\u0027"},{"line_number":58,"context_line":"                % credentials)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _get_root_connection_string(self, host):"},{"line_number":61,"context_line":"        if self.port:"},{"line_number":62,"context_line":"            host \u003d \"%s:%d\" % (host, self.port)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        root_creds \u003d {\u0027protocol\u0027: self.protocol,"},{"line_number":65,"context_line":"                      \u0027host\u0027: host,"},{"line_number":66,"context_line":"                      \u0027user\u0027: self.credentials_root.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":67,"context_line":"                      \u0027password\u0027: self.credentials_root.get(\u0027password\u0027, \u0027\u0027),"},{"line_number":68,"context_line":"                      \u0027database\u0027: self.credentials_root.get(\u0027database\u0027, \u0027\u0027)}"},{"line_number":69,"context_line":"        return (\u0027%(protocol)s://%(user)s:%(password)s@%(host)s/%(database)s\u0027"},{"line_number":70,"context_line":"                % root_creds)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    # Add data overrides"},{"line_number":73,"context_line":"    def add_actual_data(self, data_label, data_start, data_size, host,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_c76f23c2","line":70,"range":{"start_line":60,"start_character":4,"end_line":70,"end_character":29},"in_reply_to":"5a5ae5dd_f5b536ec","updated":"2016-02-08 21:44:22.000000000","message":"Done","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"86eef26f3070fcd4efd1467bcc0cf272b9766b35","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        data_table \u003d self._get_schema_table(schema_name, table_name)"},{"line_number":141,"context_line":"        return client.execute(data_table.select()).fetchall()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_root_connection(self, host, *args, **kwargs):"},{"line_number":144,"context_line":"        root_client \u003d self.create_root_client(host, *args, **kwargs)"},{"line_number":145,"context_line":"        root_client.execute(\"SELECT 1;\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_f8420b0e","line":145,"range":{"start_line":143,"start_character":4,"end_line":145,"end_character":40},"updated":"2016-02-08 18:15:01.000000000","message":"I may have an alternative approach which would not require an additional \u0027create_root_client\u0027 method and would work with generated passwords as well (i.e. with the old root-enable style).\n\nIt should be not necessary to store the root credentials here in the helper as the \u0027root-enable\u0027 calls return both the username and password.\nI short, I am proposing to make the existing get/create client calls more flexible by allowing them to accept optional credentials rather than adding a whole new client into the test.\n\nThis method could be just changed into \u0027def ping(host, user, password, *args, **kwargs)\u0027.\nThe \u0027create_client\u0027 could take optional \u0027user\u0027 and \u0027password\u0027 parameters (it already accepts *args and **kwargs). Everything would work as it does not if the creds were not specified.\n\ndef create_client(self, host, user\u003dNone, password\u003dNone, *args, **kwargs):\n    return sqlalchemy.create_engine(self._get_connection_string(host, user\u003duser, password\u003dpassword))\n\ndef ping(self, host, user\u003dNone, password\u003dNone, *args, **kwargs):\n    client \u003d self.get_client(host, user\u003duser, password\u003dpassword, *args, **kwargs)\n    client.execute(\u0027SELECT 1;\u0027)\n\n\nThe callers would just call \u0027ping\u0027 giving it the return values from the enable call...\n\nYou still can keep \u0027get_credentials_root\u0027 for initialized instance tests, you could then just ping the initialized instance with those credentials.\n\nAnother advantage of this approach is that the \u0027ping\u0027 call would now be universal - could be used with any user (even to test, say, that default user access have been disabled etc).","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"425080b51495bcac50e826672ab1cc040cfa558b","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        data_table \u003d self._get_schema_table(schema_name, table_name)"},{"line_number":141,"context_line":"        return client.execute(data_table.select()).fetchall()"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_root_connection(self, host, *args, **kwargs):"},{"line_number":144,"context_line":"        root_client \u003d self.create_root_client(host, *args, **kwargs)"},{"line_number":145,"context_line":"        root_client.execute(\"SELECT 1;\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_27bdd701","line":145,"range":{"start_line":143,"start_character":4,"end_line":145,"end_character":40},"in_reply_to":"5a5ae5dd_f8420b0e","updated":"2016-02-08 21:44:22.000000000","message":"Are you suggesting that it be changed now? I\u0027ll look into this but i\u0027m not sure its as simple as just passing in the return values of the enable call.","commit_id":"491f76a20938e99023c2decbce23870a4ab3e342"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"ffee9922f19583d89c953e464f2f1282af5e072a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        return sqlalchemy.create_engine("},{"line_number":50,"context_line":"            self._build_connection_string(host, self.credentials))"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def create_root_client(self, host, *args, **kwargs):"},{"line_number":53,"context_line":"        return sqlalchemy.create_engine("},{"line_number":54,"context_line":"            self._build_connection_string(host, self.credentials_root))"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_90db8aed","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":26},"updated":"2016-02-10 02:06:27.000000000","message":"It seems like this is not being used anywhere.","commit_id":"7f40526d9e796bba0a37d1002b460a72f388d3a2"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"ffee9922f19583d89c953e464f2f1282af5e072a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return client.execute(data_table.select()).fetchall()"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def ping(self, host, *args, **kwargs):"},{"line_number":140,"context_line":"        root_client \u003d self.create_client(host, *args, **kwargs)"},{"line_number":141,"context_line":"        root_client.execute(\"SELECT 1;\")"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_2b04ab13","line":140,"range":{"start_line":140,"start_character":27,"end_line":140,"end_character":40},"updated":"2016-02-10 02:06:27.000000000","message":"This should be calling \u0027get_client\u0027 instead (like other data operations do).\nIt happens to be a pass-through in the SQL helper, but that\u0027s not necessarily the case for other helpers as well. (Redis helper, for instance, has to do some caching to avoid running out of available sockets).","commit_id":"7f40526d9e796bba0a37d1002b460a72f388d3a2"}],"trove/tests/scenario/runners/cluster_actions_runners.py":[{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"339abb85cd815bd1211000edf93a5eedb3457285","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        root_credentials \u003d self.test_helper.get_helper_credentials_root()"},{"line_number":106,"context_line":"        self.auth_client.root.create_cluster_root("},{"line_number":107,"context_line":"            self.cluster_id, root_credentials.get(\u0027password\u0027, \u0027\u0027))"},{"line_number":108,"context_line":"        root_enabled_test \u003d self.auth_client.root.is_cluster_root_enabled("},{"line_number":109,"context_line":"            self.cluster_id)"},{"line_number":110,"context_line":"        self.assert_true(root_enabled_test.rootEnabled)"},{"line_number":111,"context_line":"        cluster \u003d self.auth_client.clusters.get(self.cluster_id)"},{"line_number":112,"context_line":"        self.test_helper.test_root_connection(cluster.ip[0])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def run_add_initial_cluster_data(self, data_type\u003dDataType.tiny):"},{"line_number":115,"context_line":"        self.assert_add_cluster_data(data_type, self.cluster_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_7fdc6a12","line":112,"range":{"start_line":108,"start_character":8,"end_line":112,"end_character":60},"updated":"2016-01-13 06:06:13.000000000","message":"pull this into an assert_cluster_root_enabled() method so that it can be called from multiple places.","commit_id":"e192da0e785d173161a70d51297b12c67ce9577b"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"ffee9922f19583d89c953e464f2f1282af5e072a","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def run_cluster_root_enable(self, expected_task_name\u003dNone,"},{"line_number":105,"context_line":"                                expected_http_code\u003d200):"},{"line_number":106,"context_line":"        root_credentials \u003d self.test_helper.get_helper_credentials_root()"},{"line_number":107,"context_line":"        self.auth_client.root.create_cluster_root("},{"line_number":108,"context_line":"            self.cluster_id, root_credentials.get(\u0027password\u0027, \u0027\u0027))"},{"line_number":109,"context_line":"        self._assert_cluster_action(self.cluster_id, expected_task_name,"},{"line_number":110,"context_line":"                                    expected_http_code)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_0bd3ef39","line":107,"range":{"start_line":107,"start_character":30,"end_line":107,"end_character":49},"updated":"2016-02-10 02:06:27.000000000","message":"I was originally thinking you could store the return value in a local variable that could be then referenced in the verify method.\nI guess this works as well with one exception. What happens if the root credentials specifies \u0027None\u0027 password (i.e. enable-root without password)? I believe, a random password should be returned. The verify method will then fail because it will use password\u003d\u0027\u0027 (line 121).\nStoring the returned creds in a local variable should mitigate this problem.\n\nAside from that, I think this method should at least compare the returned creds to the expected values and assert they are indeed the same...","commit_id":"7f40526d9e796bba0a37d1002b460a72f388d3a2"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"76942a40f71674f88b4d6c12ff1cadadd6b69193","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def run_cluster_root_enable(self, expected_task_name\u003dNone,"},{"line_number":105,"context_line":"                                expected_http_code\u003d200):"},{"line_number":106,"context_line":"        root_credentials \u003d self.test_helper.get_helper_credentials_root()"},{"line_number":107,"context_line":"        self.auth_client.root.create_cluster_root("},{"line_number":108,"context_line":"            self.cluster_id, root_credentials.get(\u0027password\u0027, \u0027\u0027))"},{"line_number":109,"context_line":"        self._assert_cluster_action(self.cluster_id, expected_task_name,"},{"line_number":110,"context_line":"                                    expected_http_code)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_4bfc873e","line":107,"range":{"start_line":107,"start_character":30,"end_line":107,"end_character":49},"in_reply_to":"3a57f1b5_0bd3ef39","updated":"2016-02-10 02:11:16.000000000","message":"See what I had in mind: https://github.com/openstack/trove/blob/master/trove/tests/scenario/runners/root_actions_runners.py#L56\n\n* I guess, I should extend the root tests to make use of the ping() method as well once this merges.","commit_id":"7f40526d9e796bba0a37d1002b460a72f388d3a2"},{"author":{"_account_id":4240,"name":"Craig Vyvial","email":"cp16net@gmail.com","username":"cp16net"},"change_message_id":"5482061a3ea29337d895b0d17fcaf6e17b92f27f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def run_cluster_root_enable(self, expected_task_name\u003dNone,"},{"line_number":105,"context_line":"                                expected_http_code\u003d200):"},{"line_number":106,"context_line":"        root_credentials \u003d self.test_helper.get_helper_credentials_root()"},{"line_number":107,"context_line":"        self.auth_client.root.create_cluster_root("},{"line_number":108,"context_line":"            self.cluster_id, root_credentials.get(\u0027password\u0027, \u0027\u0027))"},{"line_number":109,"context_line":"        self._assert_cluster_action(self.cluster_id, expected_task_name,"},{"line_number":110,"context_line":"                                    expected_http_code)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a57f1b5_32b2534d","line":107,"range":{"start_line":107,"start_character":30,"end_line":107,"end_character":49},"in_reply_to":"3a57f1b5_4bfc873e","updated":"2016-02-12 07:32:38.000000000","message":"yeah i see what you mean. i\u0027ll get this fixed and then i think we are all on the same page here.","commit_id":"7f40526d9e796bba0a37d1002b460a72f388d3a2"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"7259cb0ea21af4d5c1661f15666179df8dc5eb05","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                expected_http_code\u003d200):"},{"line_number":106,"context_line":"        root_credentials \u003d self.test_helper.get_helper_credentials_root()"},{"line_number":107,"context_line":"        self.current_root_creds \u003d self.auth_client.root.create_cluster_root("},{"line_number":108,"context_line":"            self.cluster_id, root_credentials.get(\u0027password\u0027, \u0027\u0027))"},{"line_number":109,"context_line":"        self.assert_equal(root_credentials.get(\u0027name\u0027, \u0027\u0027),"},{"line_number":110,"context_line":"                          self.current_root_creds[0])"},{"line_number":111,"context_line":"        self.assert_equal(root_credentials.get(\u0027password\u0027, \u0027\u0027),"}],"source_content_type":"text/x-python","patch_set":18,"id":"dae33548_27c19e81","line":108,"range":{"start_line":108,"start_character":62,"end_line":108,"end_character":64},"updated":"2016-02-14 01:03:59.000000000","message":"I would just access the values by index. Defaulting to \u0027\u0027 does not really make much sense in this context.\nThe helper defines the contract for root credentials (that it defines both name and password). Having either of them undefined (at least the password should be None \u003d\u003e use the random value) is likely a coding error...","commit_id":"c48d990cd9ddc70d4bf16fa4acd4445e5d739c90"},{"author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"change_message_id":"7259cb0ea21af4d5c1661f15666179df8dc5eb05","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                                    expected_http_code)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def run_verify_cluster_root_enable(self):"},{"line_number":117,"context_line":"        root_enabled_test \u003d self.auth_client.root.is_cluster_root_enabled("},{"line_number":118,"context_line":"            self.cluster_id)"},{"line_number":119,"context_line":"        self.assert_true(root_enabled_test.rootEnabled)"},{"line_number":120,"context_line":"        cluster \u003d self.auth_client.clusters.get(self.cluster_id)"}],"source_content_type":"text/x-python","patch_set":18,"id":"dae33548_e75cd6ef","line":117,"updated":"2016-02-14 01:03:59.000000000","message":"One additional thing I would do here is wrapping it in something like:\n\nif self.current_root_creds:\n    \u003ccode\u003e\nelse:\n    raise SkipTest(\"Root not enabled.\")\n\n* You will have to initialize the variable to {} in the init method.\n\nThe reason for this is that, unfortunately, the proboscis framework does not treat \u0027SkipTest\u0027 as a failure meaning that all tests dependent on a skipped test still run.\n\nIf a datastore overrides this test runner to skip \u0027run_cluster_root_enable\u0027 because it does not support cluster root, the \u0027run_verify_cluster_root_enable\u0027 will still run (although it depends on the previous method).","commit_id":"c48d990cd9ddc70d4bf16fa4acd4445e5d739c90"}]}
