)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"5257f3068c57efb61d783cfbc0542fd04f60be52","unresolved":false,"context_lines":[{"line_number":26,"context_line":"against many different backends)."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ifc02505c4c8ebd4a1ca56e14f76c0989576875c3"},{"line_number":29,"context_line":"Partially-Closes-Bug: 1339206"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"baada198_43df9066","line":29,"updated":"2014-07-30 12:00:21.000000000","message":"nit: AFAIK, this should be Partial-Bug: #1339206, as Partially-Closes-Bug isn\u0027t handled by Infra","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"}],"oslo/db/exception.py":[{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"e11177519fb3a38cd38d8ec2cf47f94b66bb46e7","unresolved":false,"context_lines":[{"line_number":168,"context_line":"class BackendNotAvailable(Exception):"},{"line_number":169,"context_line":"    \"\"\"Error raised when a particular database backend is not available"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    within a test suite."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_57c47e91","line":171,"updated":"2014-08-27 12:42:00.000000000","message":"I think we can provide a message template such as: {backend} is not available: {original_message}, to describe inability of a backend.","commit_id":"f3ba44c62ac708c2f11990d1e1f59dd5f7510f6f"}],"oslo/db/sqlalchemy/provision.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"_urls_by_backend \u003d {}"},{"line_number":226,"context_line":"_engines_by_backend \u003d {}"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"def _base_engine_for_backend(drivername):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_a17dcbb4","line":226,"updated":"2014-07-30 10:02:26.000000000","message":"hmm, this seems to be used only in _base_engine_for_backend(). do we really need it? or you were going to somehow cache Engine instances?","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"_urls_by_backend \u003d {}"},{"line_number":226,"context_line":"_engines_by_backend \u003d {}"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"def _base_engine_for_backend(drivername):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_8e7d21b5","line":226,"in_reply_to":"baada198_a17dcbb4","updated":"2014-08-07 23:26:22.000000000","message":"we need it as it is called a lot, and im just going to refactor this so that it is clearer.","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        try:"},{"line_number":232,"context_line":"            eng \u003d utils.ensure_backend_available(_urls_by_backend[drivername])"},{"line_number":233,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":234,"context_line":"            del _urls_by_backend[drivername]"},{"line_number":235,"context_line":"            raise"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            _engines_by_backend[drivername] \u003d eng"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_410b0f24","line":234,"updated":"2014-07-30 10:02:26.000000000","message":"nit: not sure it\u0027s safe to remove keys from a dict while iterating over it (we\u0027re not iterating rigth, but the caller of this method does - _configured_engines())","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        try:"},{"line_number":232,"context_line":"            eng \u003d utils.ensure_backend_available(_urls_by_backend[drivername])"},{"line_number":233,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":234,"context_line":"            del _urls_by_backend[drivername]"},{"line_number":235,"context_line":"            raise"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            _engines_by_backend[drivername] \u003d eng"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ce46397e","line":234,"in_reply_to":"baada198_410b0f24","updated":"2014-08-07 23:26:22.000000000","message":"going to change this around completely","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    \"\"\"Initial startup feature will scan the environment for configured URLs"},{"line_number":245,"context_line":"    and place them into the list of URLs we will use for provisioning."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    This searches through OS_TEST_DBAPI_ADMIN_CONNECTION for URLs.  If"},{"line_number":248,"context_line":"    not present, we set up URLs based on the \"opportunstic\" convention,"},{"line_number":249,"context_line":"    e.g. username+password \u003d \"openstack_citest\"."},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_a1e14b9d","line":247,"updated":"2014-07-30 10:02:26.000000000","message":"just a note: OS_TEST_DBAPI_ADMIN_CONNECTION env variable hasn\u0027t been used outside oslo-incubator and my WIP patches in Nova, so you can pick any name you like for it :)","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    \"\"\"Initial startup feature will scan the environment for configured URLs"},{"line_number":245,"context_line":"    and place them into the list of URLs we will use for provisioning."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    This searches through OS_TEST_DBAPI_ADMIN_CONNECTION for URLs.  If"},{"line_number":248,"context_line":"    not present, we set up URLs based on the \"opportunstic\" convention,"},{"line_number":249,"context_line":"    e.g. username+password \u003d \"openstack_citest\"."},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4e5a2952","line":247,"in_reply_to":"baada198_a1e14b9d","updated":"2014-08-07 23:26:22.000000000","message":"i have no better ideas :)","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"bc4e17bb210394a7327dc7682986a9e4903194fb","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    else:"},{"line_number":260,"context_line":"        configured_urls \u003d ["},{"line_number":261,"context_line":"            ProvisionImpl.impl(drivername).create_opportunistic_driver_url()"},{"line_number":262,"context_line":"            for drivername in \"sqlite\", \"postgresql\", \"mysql\""},{"line_number":263,"context_line":"        ]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    for url_str in configured_urls:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_fab213e7","line":262,"updated":"2014-07-30 06:08:27.000000000","message":"The .impl dispatch is clever - but if I understand this correctly an alternative would be to just declare vanilla classes above (specific to each opportunistic test case), and then list those class names here rather than drivernames.\n\nI\u0027m trying to get my head around the resulting impl instances...  Say I wanted both mysql+mysqldb and mysql+mysqlconnector test cases, that only differed in URL, I think I still need to create a dedicated impl class for each and inherit from a common base (or each other) in the usual way - is that correct?\n\ntl;dr: I\u0027m afraid I\u0027m dubious that the decorator approach is bringing clarity to what is basically filter(lambda c: ensure_backend_available(c.url), list_of_classes) :/","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    else:"},{"line_number":260,"context_line":"        configured_urls \u003d ["},{"line_number":261,"context_line":"            ProvisionImpl.impl(drivername).create_opportunistic_driver_url()"},{"line_number":262,"context_line":"            for drivername in \"sqlite\", \"postgresql\", \"mysql\""},{"line_number":263,"context_line":"        ]"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    for url_str in configured_urls:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_e8ea1476","line":262,"in_reply_to":"baada198_fab213e7","updated":"2014-08-07 23:26:22.000000000","message":"a previous version of this change didn\u0027t have ProvisionImpl and instead had a whole list of various functions for each kind of database backend and each various feature.  It proved to be very difficult to find all the functions that were relevant to a particular backend, and it was actually a reinvention of polymorphism.   So I consolidated the various per-DB backend functions into Impl classes and it\u0027s a lot cleaner.  \n\nas for MySQLdb vs. MySQLConnector, at the moment the system as implemented here is assuming that a ProvisionImpl will work across all DBAPIs.   If we want to expand this to allow variance between DBAPIs, then yes we\u0027d want subclasses for each, but we\u0027d also have to get more elaborate as to how we are doing these \"opportunistic\" drivers.   I find the whole idea kind of odd but that\u0027s what other OS projects are looking for.\n\nThe subclass-per-DBAPI concept comes from SQLAlchemy and you can get some background in section 20.3 of my AOSA chapter: http://aosabook.org/en/sqlalchemy.html\n\nas for filter(lambda c: ...), I guess \"list of classes\" means you render out the XYZImpl classes directly.   Again this lacks abstraction, so I will alter this so that you don\u0027t have to see the three hardcoded strings which should make it clearer.","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"bc4e17bb210394a7327dc7682986a9e4903194fb","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        m \u003d re.match(r\u0027([^+]+?)(?:\\+(.+))?$\u0027, url.drivername)"},{"line_number":268,"context_line":"        dbname, drivertype \u003d m.group(1, 2)"},{"line_number":269,"context_line":"        _urls_by_backend[dbname] \u003d url"},{"line_number":270,"context_line":"_setup_env_urls()"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def _create_cmd(args):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ba517bdb","line":270,"updated":"2014-07-30 06:08:27.000000000","message":"There seems to be 3 functions here coordinating via a _urls_by_backend global.\n\nRather than use the global, is the flow clearer/simpler if these 3 are rolled into _configured_engines()?  In particular, I think the throwing/catching BackendNotAvailable might collapse down to a single try/except, and there would no longer be a need to modify the global during _base_engine_for_backend (which otherwise sounds like it should be side-effect-free).\n\n(this also means _setup_env_urls() is effectively delayed until _configured_engines is called, which means we do less on a naive import of this module)","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        m \u003d re.match(r\u0027([^+]+?)(?:\\+(.+))?$\u0027, url.drivername)"},{"line_number":268,"context_line":"        dbname, drivertype \u003d m.group(1, 2)"},{"line_number":269,"context_line":"        _urls_by_backend[dbname] \u003d url"},{"line_number":270,"context_line":"_setup_env_urls()"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"def _create_cmd(args):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_2e209599","line":270,"in_reply_to":"baada198_ba517bdb","updated":"2014-08-07 23:26:22.000000000","message":"Well just relying on _configured_engines() means all the engines are pinged, and if someone is running just one test against SQLite, I don\u0027t want that to happen.  The idea here is that nothing connects to anything until it is definitely asked for.\n\nthat said it seems there is a lot of discomfort over these two dictionaries so I\u0027m working out a rearrangement that makes the intent/organization clearer.","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"bc4e17bb210394a7327dc7682986a9e4903194fb","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def _drop_cmd(args):"},{"line_number":286,"context_line":"    for engine in _configured_engines():"},{"line_number":287,"context_line":"        for ident in args.instances:"},{"line_number":288,"context_line":"            ProvisionImpl.impl("},{"line_number":289,"context_line":"                engine.dialect.name).drop_named_database(engine, ident)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_fa46937d","line":286,"updated":"2014-07-30 06:08:27.000000000","message":"Both callers of _configured_engines() immediately call ProvisionImpl.impl(engine.dialect.name) - I suggest refactoring _configured_engines() to do that directly.\n\n(And presumably renaming _configured_engines since it wouldn\u0027t be returning engines any more)","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"def _drop_cmd(args):"},{"line_number":286,"context_line":"    for engine in _configured_engines():"},{"line_number":287,"context_line":"        for ident in args.instances:"},{"line_number":288,"context_line":"            ProvisionImpl.impl("},{"line_number":289,"context_line":"                engine.dialect.name).drop_named_database(engine, ident)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_6e6e0d00","line":286,"in_reply_to":"baada198_fa46937d","updated":"2014-08-07 23:26:22.000000000","message":"good idea I will do something like that...except that ProvisionImpl doesn\u0027t hold onto an Engine, that isn\u0027t part of its state, will need to see if i can work something out there.","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":12363,"name":"Oleksii Chuprykov","email":"a.chuprikoff@gmail.com","username":"ochuprykov"},"change_message_id":"a956fc26e9c8e4f7fe07e8669910c79437fc2bbc","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def create_named_database(self, engine, ident):"},{"line_number":137,"context_line":"        with engine.connect() as conn:"},{"line_number":138,"context_line":"            conn.execute(\"CREATE DATABASE %s\" % ident)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def drop_named_database(self, engine, ident):"},{"line_number":141,"context_line":"        with engine.connect() as conn:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_fdb3ad97","line":138,"updated":"2014-07-31 15:23:36.000000000","message":"I think it is possible to get ProgrammingError or something like it if ident will contain single quotes.","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"f896a601cecb11aa2e1c4d5468b97109960eef79","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def create_named_database(self, engine, ident):"},{"line_number":137,"context_line":"        with engine.connect() as conn:"},{"line_number":138,"context_line":"            conn.execute(\"CREATE DATABASE %s\" % ident)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def drop_named_database(self, engine, ident):"},{"line_number":141,"context_line":"        with engine.connect() as conn:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_c32e0aab","line":138,"in_reply_to":"baada198_fdb3ad97","updated":"2014-07-31 15:59:00.000000000","message":"ident values are generated in  _random_ident() and can contain only ascii lowercase letters, so it\u0027s the kind of input we can trust","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea76cf44614da8db22ac7c5852b27e02494655cb","unresolved":false,"context_lines":[{"line_number":223,"context_line":""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"_urls_by_backend \u003d {}"},{"line_number":226,"context_line":"_engines_by_backend \u003d {}"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"def _base_engine_for_backend(drivername):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_00861c65","line":226,"updated":"2014-08-01 08:39:53.000000000","message":"hmm, this seems to be used only in _base_engine_for_backend(). do we really need it? or you were going to somehow cache Engine instances?","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea76cf44614da8db22ac7c5852b27e02494655cb","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        try:"},{"line_number":232,"context_line":"            eng \u003d utils.ensure_backend_available(_urls_by_backend[drivername])"},{"line_number":233,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":234,"context_line":"            del _urls_by_backend[drivername]"},{"line_number":235,"context_line":"            raise"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            _engines_by_backend[drivername] \u003d eng"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_407c9471","line":234,"updated":"2014-08-01 08:39:53.000000000","message":"nit: not sure it\u0027s safe to remove keys from a dict while iterating over it (we\u0027re not iterating rigth, but the caller of this method does - _configured_engines())","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"79f68cd39b7542d04dc1a6c6ec2ab1ce2978001a","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        try:"},{"line_number":232,"context_line":"            eng \u003d utils.ensure_backend_available(_urls_by_backend[drivername])"},{"line_number":233,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":234,"context_line":"            del _urls_by_backend[drivername]"},{"line_number":235,"context_line":"            raise"},{"line_number":236,"context_line":"        else:"},{"line_number":237,"context_line":"            _engines_by_backend[drivername] \u003d eng"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_30b63cdc","line":234,"in_reply_to":"baada198_407c9471","updated":"2014-08-07 15:27:26.000000000","message":"hm wonder why this didnt raise for me when testing, because it is invalid.  need a list() around the iterator","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea76cf44614da8db22ac7c5852b27e02494655cb","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    \"\"\"Initial startup feature will scan the environment for configured URLs"},{"line_number":245,"context_line":"    and place them into the list of URLs we will use for provisioning."},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    This searches through OS_TEST_DBAPI_ADMIN_CONNECTION for URLs.  If"},{"line_number":248,"context_line":"    not present, we set up URLs based on the \"opportunstic\" convention,"},{"line_number":249,"context_line":"    e.g. username+password \u003d \"openstack_citest\"."},{"line_number":250,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a04f3034","line":247,"updated":"2014-08-01 08:39:53.000000000","message":"just a note: OS_TEST_DBAPI_ADMIN_CONNECTION env variable hasn\u0027t been used outside oslo-incubator and my WIP patches in Nova, so you can pick any name you like for it :)","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"e11177519fb3a38cd38d8ec2cf47f94b66bb46e7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class ProvisionedDatabase(object):"},{"line_number":40,"context_line":"    \"\"\"Represent a single database node that can be used for testing in"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    a serialized fashion."}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_7a215ffb","line":39,"updated":"2014-08-27 12:42:00.000000000","message":"Where do you use it?","commit_id":"f3ba44c62ac708c2f11990d1e1f59dd5f7510f6f"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"491dff490a2909b73f2418b01afc623449d8bdf5","unresolved":false,"context_lines":[{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class ProvisionedDatabase(object):"},{"line_number":40,"context_line":"    \"\"\"Represent a single database node that can be used for testing in"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    a serialized fashion."}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_033b9ed1","line":39,"in_reply_to":"1abeadc6_7a215ffb","updated":"2014-08-27 16:51:20.000000000","message":"this will change if/when we switch to testresources but on this approach right here https://review.openstack.org/gitweb?p\u003dopenstack/oslo.db.git;a\u003dblob;f\u003doslo/db/sqlalchemy/test_base.py;h\u003dce553f801922db4349909025e5c851879e3b2f8b;hb\u003df3ba44c62ac708c2f11990d1e1f59dd5f7510f6f#l55","commit_id":"f3ba44c62ac708c2f11990d1e1f59dd5f7510f6f"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"f4d828d6ad1f6b805aab29f3f57d8b3cd2b90117","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":"import re"},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":"import string"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from six import moves"}],"source_content_type":"text/x-python","patch_set":33,"id":"baa201ad_6d532be2","line":24,"updated":"2014-10-17 13:14:48.000000000","message":"nit: six should be in the third group of imports","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"07b0948ea1fb14e5bf2c0ec924dcf1d19a1f129b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import os"},{"line_number":22,"context_line":"import random"},{"line_number":23,"context_line":"import re"},{"line_number":24,"context_line":"import six"},{"line_number":25,"context_line":"import string"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from six import moves"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa7fdbe_5b0da23d","line":24,"in_reply_to":"baa201ad_6d532be2","updated":"2014-10-22 17:02:53.000000000","message":"Done","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"}],"oslo/db/sqlalchemy/session.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":443,"context_line":"    if \"sqlite\" in connection_dict.drivername:"},{"line_number":444,"context_line":"        if sqlite_fk:"},{"line_number":445,"context_line":"            engine_args[\"listeners\"] \u003d [SqliteForeignKeysListener()]"},{"line_number":446,"context_line":"        if connection_dict.database is None:"},{"line_number":447,"context_line":"            engine_args[\"poolclass\"] \u003d StaticPool"},{"line_number":448,"context_line":"            engine_args[\"connect_args\"] \u003d {\u0027check_same_thread\u0027: False}"},{"line_number":449,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c6c1f54f","line":446,"updated":"2014-07-30 10:02:26.000000000","message":"shouldn\u0027t we also check for :memory: case here?","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":443,"context_line":"    if \"sqlite\" in connection_dict.drivername:"},{"line_number":444,"context_line":"        if sqlite_fk:"},{"line_number":445,"context_line":"            engine_args[\"listeners\"] \u003d [SqliteForeignKeysListener()]"},{"line_number":446,"context_line":"        if connection_dict.database is None:"},{"line_number":447,"context_line":"            engine_args[\"poolclass\"] \u003d StaticPool"},{"line_number":448,"context_line":"            engine_args[\"connect_args\"] \u003d {\u0027check_same_thread\u0027: False}"},{"line_number":449,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_577398e7","line":446,"in_reply_to":"baada198_c6c1f54f","updated":"2014-08-07 23:26:22.000000000","message":"will do","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea76cf44614da8db22ac7c5852b27e02494655cb","unresolved":false,"context_lines":[{"line_number":443,"context_line":"    if \"sqlite\" in connection_dict.drivername:"},{"line_number":444,"context_line":"        if sqlite_fk:"},{"line_number":445,"context_line":"            engine_args[\"listeners\"] \u003d [SqliteForeignKeysListener()]"},{"line_number":446,"context_line":"        if connection_dict.database is None:"},{"line_number":447,"context_line":"            engine_args[\"poolclass\"] \u003d StaticPool"},{"line_number":448,"context_line":"            engine_args[\"connect_args\"] \u003d {\u0027check_same_thread\u0027: False}"},{"line_number":449,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a0e1f02c","line":446,"updated":"2014-08-01 08:39:53.000000000","message":"nit: shouldn\u0027t we also check for :memory: case here?","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"79f68cd39b7542d04dc1a6c6ec2ab1ce2978001a","unresolved":false,"context_lines":[{"line_number":443,"context_line":"    if \"sqlite\" in connection_dict.drivername:"},{"line_number":444,"context_line":"        if sqlite_fk:"},{"line_number":445,"context_line":"            engine_args[\"listeners\"] \u003d [SqliteForeignKeysListener()]"},{"line_number":446,"context_line":"        if connection_dict.database is None:"},{"line_number":447,"context_line":"            engine_args[\"poolclass\"] \u003d StaticPool"},{"line_number":448,"context_line":"            engine_args[\"connect_args\"] \u003d {\u0027check_same_thread\u0027: False}"},{"line_number":449,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_3012bcb3","line":446,"in_reply_to":"baada198_a0e1f02c","updated":"2014-08-07 15:27:26.000000000","message":"ah if .database is actually the string :memory: huh.   yeah OK.","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"}],"oslo/db/sqlalchemy/test_base.py":[{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"8a206d6f4a1bd8f6880dbae06449f2d1e289e142","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    DRIVER \u003d abc.abstractproperty(lambda: None)"},{"line_number":106,"context_line":"    DBNAME \u003d PASSWORD \u003d USERNAME \u003d \u0027openstack_citest\u0027"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def setUp(self):"},{"line_number":109,"context_line":"        self._provisioning_engine \u003d provision.get_engine("}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_84a534b7","side":"PARENT","line":106,"updated":"2014-08-19 08:14:49.000000000","message":"This already in use in Ironic (at least). See https://github.com/openstack/ironic/blob/master/ironic/tests/db/sqlalchemy/test_migrations.py#L270-L278","commit_id":"fc0a082ab567ff47c1c1e7879474dfba74006e90"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"ce30371eab0afeabeac8d2add38ae3f4de059867","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    DRIVER \u003d abc.abstractproperty(lambda: None)"},{"line_number":106,"context_line":"    DBNAME \u003d PASSWORD \u003d USERNAME \u003d \u0027openstack_citest\u0027"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def setUp(self):"},{"line_number":109,"context_line":"        self._provisioning_engine \u003d provision.get_engine("}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_56273bb6","side":"PARENT","line":106,"in_reply_to":"1abeadc6_10731016","updated":"2014-08-19 15:39:18.000000000","message":"Done","commit_id":"fc0a082ab567ff47c1c1e7879474dfba74006e90"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"581d7785cd488b6b93228445fd3501af08bbe136","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    \"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    DRIVER \u003d abc.abstractproperty(lambda: None)"},{"line_number":106,"context_line":"    DBNAME \u003d PASSWORD \u003d USERNAME \u003d \u0027openstack_citest\u0027"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    def setUp(self):"},{"line_number":109,"context_line":"        self._provisioning_engine \u003d provision.get_engine("}],"source_content_type":"text/x-python","patch_set":22,"id":"1abeadc6_10731016","side":"PARENT","line":106,"in_reply_to":"1abeadc6_84a534b7","updated":"2014-08-19 13:55:10.000000000","message":"I\u0027m confused by what I see there.   They seem to be using oslo.db but then they have their own _is_backend_avail function, oslo.db already has this.   the module makes use of MySQLOpportunisticTestCase and PostgresqlOpportunisticTestCase which are still here, it should continue to function.   I\u0027m not sure why they are adding assertions regarding oslo.db\u0027s own functionality.","commit_id":"fc0a082ab567ff47c1c1e7879474dfba74006e90"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"e11177519fb3a38cd38d8ec2cf47f94b66bb46e7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    # these names are deprecated, and are not used by DbFixture."},{"line_number":38,"context_line":"    # they are here for backwards compatibility with test suites that"},{"line_number":39,"context_line":"    # are referring to them directly."},{"line_number":40,"context_line":"    DBNAME \u003d PASSWORD \u003d USERNAME \u003d \u0027openstack_citest\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __init__(self, test):"},{"line_number":43,"context_line":"        super(DbFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_7accff61","line":40,"updated":"2014-08-27 12:42:00.000000000","message":"We don\u0027t need it if the driver is \u0027sqlite\u0027.","commit_id":"f3ba44c62ac708c2f11990d1e1f59dd5f7510f6f"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"491dff490a2909b73f2418b01afc623449d8bdf5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    # these names are deprecated, and are not used by DbFixture."},{"line_number":38,"context_line":"    # they are here for backwards compatibility with test suites that"},{"line_number":39,"context_line":"    # are referring to them directly."},{"line_number":40,"context_line":"    DBNAME \u003d PASSWORD \u003d USERNAME \u003d \u0027openstack_citest\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def __init__(self, test):"},{"line_number":43,"context_line":"        super(DbFixture, self).__init__()"}],"source_content_type":"text/x-python","patch_set":25,"id":"1abeadc6_5f81e88d","line":40,"in_reply_to":"1abeadc6_7accff61","updated":"2014-08-27 16:51:20.000000000","message":"these three are needed for tests that refer to these names directly, I had to add them back in, see https://github.com/openstack/ironic/blob/master/ironic/tests/db/sqlalchemy/test_migrations.py#L270-L278","commit_id":"f3ba44c62ac708c2f11990d1e1f59dd5f7510f6f"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d39474cb411315cfaf8eae3f5f2d9f7328704805","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def cleanUp(self):"},{"line_number":55,"context_line":"        self.test.engine \u003d None"},{"line_number":56,"context_line":"        self.provision.dispose()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def setUp(self):"},{"line_number":59,"context_line":"        super(DbFixture, self).setUp()"}],"source_content_type":"text/x-python","patch_set":30,"id":"da9df570_4b6fabc5","line":56,"updated":"2014-09-23 21:01:27.000000000","message":"This is buggy - its not upcalling. Better still is to not define cleanUp at all - use addCleanup as below.","commit_id":"14383a1bda408a423918730c973268ea317b6783"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1c9496731509a49abbbae15c2ca9e65a3990040e","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def cleanUp(self):"},{"line_number":55,"context_line":"        self.test.engine \u003d None"},{"line_number":56,"context_line":"        self.provision.dispose()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def setUp(self):"},{"line_number":59,"context_line":"        super(DbFixture, self).setUp()"}],"source_content_type":"text/x-python","patch_set":30,"id":"baa201ad_6ca76650","line":56,"in_reply_to":"da9df570_4b6fabc5","updated":"2014-09-29 20:13:39.000000000","message":"Done","commit_id":"14383a1bda408a423918730c973268ea317b6783"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d39474cb411315cfaf8eae3f5f2d9f7328704805","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        super(DbFixture, self).setUp()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            self.provision \u003d provision.ProvisionedDatabase(self.DRIVER)"},{"line_number":63,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":64,"context_line":"            msg \u003d \u0027%s backend is not available.\u0027 % self.DRIVER"},{"line_number":65,"context_line":"            return self.test.skip(msg)"}],"source_content_type":"text/x-python","patch_set":30,"id":"da9df570_8b96f392","line":62,"updated":"2014-09-23 21:01:27.000000000","message":"add in\n self.addCleanup(self.provision.dispose)","commit_id":"14383a1bda408a423918730c973268ea317b6783"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1c9496731509a49abbbae15c2ca9e65a3990040e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        super(DbFixture, self).setUp()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            self.provision \u003d provision.ProvisionedDatabase(self.DRIVER)"},{"line_number":63,"context_line":"        except exception.BackendNotAvailable:"},{"line_number":64,"context_line":"            msg \u003d \u0027%s backend is not available.\u0027 % self.DRIVER"},{"line_number":65,"context_line":"            return self.test.skip(msg)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baa201ad_8c63aa19","line":62,"in_reply_to":"da9df570_8b96f392","updated":"2014-09-29 20:13:39.000000000","message":"Done","commit_id":"14383a1bda408a423918730c973268ea317b6783"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"d39474cb411315cfaf8eae3f5f2d9f7328704805","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            msg \u003d \u0027%s backend is not available.\u0027 % self.DRIVER"},{"line_number":65,"context_line":"            return self.test.skip(msg)"},{"line_number":66,"context_line":"        else:"},{"line_number":67,"context_line":"            self.test.engine \u003d self.provision.engine"},{"line_number":68,"context_line":"            self.test.sessionmaker \u003d session.get_maker(self.test.engine)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"da9df570_4b7deb6d","line":67,"updated":"2014-09-23 21:01:27.000000000","message":"add in\n self.addCleanup(setattr, self, \u0027engine\u0027, None)","commit_id":"14383a1bda408a423918730c973268ea317b6783"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"1c9496731509a49abbbae15c2ca9e65a3990040e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            msg \u003d \u0027%s backend is not available.\u0027 % self.DRIVER"},{"line_number":65,"context_line":"            return self.test.skip(msg)"},{"line_number":66,"context_line":"        else:"},{"line_number":67,"context_line":"            self.test.engine \u003d self.provision.engine"},{"line_number":68,"context_line":"            self.test.sessionmaker \u003d session.get_maker(self.test.engine)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"baa201ad_cc6db206","line":67,"in_reply_to":"da9df570_4b7deb6d","updated":"2014-09-29 20:13:39.000000000","message":"Done","commit_id":"14383a1bda408a423918730c973268ea317b6783"}],"oslo/db/sqlalchemy/utils.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def get_connect_string(backend, database, user\u003dNone, passwd\u003dNone,"},{"line_number":664,"context_line":"                       host\u003d\u0027localhost\u0027):"},{"line_number":665,"context_line":"    \"\"\"Get database connection"},{"line_number":666,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_014f576b","side":"PARENT","line":663,"updated":"2014-07-30 10:02:26.000000000","message":"These two functions were meant to be public. I haven\u0027t checked, if they are really used in consuming projects, but IMO we should deprecate them and keep for a few more oslo.db releases after we merge this patch.","commit_id":"94708bde2ea71274506ea2f61ec2658eb211f1a0"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def get_connect_string(backend, database, user\u003dNone, passwd\u003dNone,"},{"line_number":664,"context_line":"                       host\u003d\u0027localhost\u0027):"},{"line_number":665,"context_line":"    \"\"\"Get database connection"},{"line_number":666,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_f794ace8","side":"PARENT","line":663,"in_reply_to":"baada198_014f576b","updated":"2014-08-07 23:26:22.000000000","message":"ok ill restore these","commit_id":"94708bde2ea71274506ea2f61ec2658eb211f1a0"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"14762e2dcd2d6e55c83dd176fce27c412f7199d5","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def ensure_backend_available(url):"},{"line_number":664,"context_line":"    url \u003d sa_url.make_url(url)"},{"line_number":665,"context_line":"    try:"},{"line_number":666,"context_line":"        eng \u003d sqlalchemy.create_engine(url)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_616e5399","line":663,"updated":"2014-07-30 10:02:26.000000000","message":"If we are going to make this function public, we\u0027ll need a brief docstring.","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def ensure_backend_available(url):"},{"line_number":664,"context_line":"    url \u003d sa_url.make_url(url)"},{"line_number":665,"context_line":"    try:"},{"line_number":666,"context_line":"        eng \u003d sqlalchemy.create_engine(url)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_179cc00d","line":663,"in_reply_to":"baada198_616e5399","updated":"2014-08-07 23:26:22.000000000","message":"going to move it","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ea76cf44614da8db22ac7c5852b27e02494655cb","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def ensure_backend_available(url):"},{"line_number":664,"context_line":"    url \u003d sa_url.make_url(url)"},{"line_number":665,"context_line":"    try:"},{"line_number":666,"context_line":"        eng \u003d sqlalchemy.create_engine(url)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_e003e8bb","line":663,"updated":"2014-08-01 08:39:53.000000000","message":"If we are going to make this function public, we\u0027ll need a brief docstring.","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"79f68cd39b7542d04dc1a6c6ec2ab1ce2978001a","unresolved":false,"context_lines":[{"line_number":660,"context_line":"        execute()"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":""},{"line_number":663,"context_line":"def ensure_backend_available(url):"},{"line_number":664,"context_line":"    url \u003d sa_url.make_url(url)"},{"line_number":665,"context_line":"    try:"},{"line_number":666,"context_line":"        eng \u003d sqlalchemy.create_engine(url)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_708354cb","line":663,"in_reply_to":"baada198_e003e8bb","updated":"2014-08-07 15:27:26.000000000","message":"I don\u0027t need this function public.  Can I make it private?    I\u0027d actually want to just put it in provision.py.","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"79f68cd39b7542d04dc1a6c6ec2ab1ce2978001a","unresolved":false,"context_lines":[{"line_number":685,"context_line":"            return eng"},{"line_number":686,"context_line":""},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"def get_db_connection_info(conn_pieces):"},{"line_number":689,"context_line":"    database \u003d conn_pieces.path.strip(\u0027/\u0027)"},{"line_number":690,"context_line":"    loc_pieces \u003d conn_pieces.netloc.split(\u0027@\u0027)"},{"line_number":691,"context_line":"    host \u003d loc_pieces[1]"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_b0640c4e","line":688,"updated":"2014-08-07 15:27:26.000000000","message":"I don\u0027t need this either.","commit_id":"042dcc3d4f25abe1f74b6c0d0dfe142b51d58eac"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"f4d828d6ad1f6b805aab29f3f57d8b3cd2b90117","unresolved":false,"context_lines":[{"line_number":650,"context_line":"    Try to get a connection with a very specific set of values, if we get"},{"line_number":651,"context_line":"    these then we\u0027ll run the tests, otherwise they are skipped"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    DEPRECATED: this function is deprecated and will be removed from oslo.db"},{"line_number":654,"context_line":"    in a few releases. Please use the provisioning system for dealing"},{"line_number":655,"context_line":"    with URLs and database provisioning."},{"line_number":656,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"baa201ad_d1010906","line":653,"updated":"2014-10-17 13:14:48.000000000","message":"is there a sense to raise some warning here to inform end users (if any), that this function is deprecated?","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"07b0948ea1fb14e5bf2c0ec924dcf1d19a1f129b","unresolved":false,"context_lines":[{"line_number":650,"context_line":"    Try to get a connection with a very specific set of values, if we get"},{"line_number":651,"context_line":"    these then we\u0027ll run the tests, otherwise they are skipped"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    DEPRECATED: this function is deprecated and will be removed from oslo.db"},{"line_number":654,"context_line":"    in a few releases. Please use the provisioning system for dealing"},{"line_number":655,"context_line":"    with URLs and database provisioning."},{"line_number":656,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa7fdbe_763d1dbb","line":653,"in_reply_to":"baa201ad_d1010906","updated":"2014-10-22 17:02:53.000000000","message":"I recall there were some other \"deprecated\" functions in here at some point that just had the docstring and didn\u0027t do a warning.   If you can point me to the openstack standard for deprecation warnings I can add that in.","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"f4d828d6ad1f6b805aab29f3f57d8b3cd2b90117","unresolved":false,"context_lines":[{"line_number":671,"context_line":"    \"\"\"Return True if the given backend is available."},{"line_number":672,"context_line":""},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    DEPRECATED: this function is deprecated and will be removed from oslo.db"},{"line_number":675,"context_line":"    in a few releases. Please use the provisioning system to access"},{"line_number":676,"context_line":"    databases based on backend availability."},{"line_number":677,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"baa201ad_1108f126","line":674,"updated":"2014-10-17 13:14:48.000000000","message":"dtto","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"}],"tests/sqlalchemy/test_utils.py":[{"author":{"_account_id":11279,"name":"Angus Lees","email":"gus@inodes.org","username":"gus"},"change_message_id":"bc4e17bb210394a7327dc7682986a9e4903194fb","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        self.mox.ReplayAll()"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        eng \u003d utils.ensure_backend_available(self.connect_string)"},{"line_number":659,"context_line":"        self.assertTrue(isinstance(eng, sqlalchemy.engine.base.Engine))"},{"line_number":660,"context_line":"        self.assertEqual(self.connect_string, str(eng.url))"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"    def test_ensure_backend_available_no_connection_raises(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_75f534cb","line":659,"updated":"2014-07-30 06:08:27.000000000","message":"self.assertIsInstance(eng, sqlalchemy.engine.base.Engine)","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"4322fd3b27babd3629ce7e9735cc4eefd3f43b2e","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        self.mox.ReplayAll()"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"        eng \u003d utils.ensure_backend_available(self.connect_string)"},{"line_number":659,"context_line":"        self.assertTrue(isinstance(eng, sqlalchemy.engine.base.Engine))"},{"line_number":660,"context_line":"        self.assertEqual(self.connect_string, str(eng.url))"},{"line_number":661,"context_line":""},{"line_number":662,"context_line":"    def test_ensure_backend_available_no_connection_raises(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_b78a34ba","line":659,"in_reply_to":"baada198_75f534cb","updated":"2014-08-07 23:26:22.000000000","message":"of course tons of other tests here do it this way too :)  should probably change the rest at some point","commit_id":"a9194792dbc9b288082a82443842d3185ff3f36e"},{"author":{"_account_id":7491,"name":"Viktor Serhieiev","email":"viktor.sergeyev@gmail.com","username":"vsergeyev"},"change_message_id":"f4d828d6ad1f6b805aab29f3f57d8b3cd2b90117","unresolved":false,"context_lines":[{"line_number":543,"context_line":"        error_msg \u003d \"The mysql backend is unavailable: %s\\n\" % err"},{"line_number":544,"context_line":"        self.mox.StubOutWithMock(sqlalchemy.engine.base.Engine, \u0027connect\u0027)"},{"line_number":545,"context_line":"        sqlalchemy.engine.base.Engine.connect().AndRaise("},{"line_number":546,"context_line":"            err)"},{"line_number":547,"context_line":"        self.mox.ReplayAll()"},{"line_number":548,"context_line":"        self.assertFalse(utils.is_backend_avail(**self.full_credentials))"},{"line_number":549,"context_line":"        self.assertEqual(error_msg, log.output)"}],"source_content_type":"text/x-python","patch_set":33,"id":"baa201ad_b12d6591","line":546,"updated":"2014-10-17 13:14:48.000000000","message":"this line looks a bit strange :)","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"07b0948ea1fb14e5bf2c0ec924dcf1d19a1f129b","unresolved":false,"context_lines":[{"line_number":543,"context_line":"        error_msg \u003d \"The mysql backend is unavailable: %s\\n\" % err"},{"line_number":544,"context_line":"        self.mox.StubOutWithMock(sqlalchemy.engine.base.Engine, \u0027connect\u0027)"},{"line_number":545,"context_line":"        sqlalchemy.engine.base.Engine.connect().AndRaise("},{"line_number":546,"context_line":"            err)"},{"line_number":547,"context_line":"        self.mox.ReplayAll()"},{"line_number":548,"context_line":"        self.assertFalse(utils.is_backend_avail(**self.full_credentials))"},{"line_number":549,"context_line":"        self.assertEqual(error_msg, log.output)"}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa7fdbe_9691a19b","line":546,"in_reply_to":"baa201ad_b12d6591","updated":"2014-10-22 17:02:53.000000000","message":"hoping you\u0027re just referring to the line break that got carried over, fixed.","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"07b0948ea1fb14e5bf2c0ec924dcf1d19a1f129b","unresolved":false,"context_lines":[{"line_number":564,"context_line":"        err \u003d OperationalError(\"Can\u0027t connect to database\", None, None)"},{"line_number":565,"context_line":"        self.mox.StubOutWithMock(sqlalchemy.engine.base.Engine, \u0027connect\u0027)"},{"line_number":566,"context_line":"        sqlalchemy.engine.base.Engine.connect().AndRaise("},{"line_number":567,"context_line":"            err)"},{"line_number":568,"context_line":"        self.mox.ReplayAll()"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        exc \u003d self.assertRaises("}],"source_content_type":"text/x-python","patch_set":33,"id":"9aa7fdbe_f6d74d21","line":567,"updated":"2014-10-22 17:02:53.000000000","message":"got this one too.","commit_id":"122e4384a9c89f5ee59feb2bf30a5c90f20dee6c"}]}
