Module Expr Str Import alias ImportFrom alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign NameStore Str orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Raise Call NameLoad BinOpMod Str NameLoad Return BinOpMod Str Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str NameStore body Assign AttributeStore NameLoad attr NameLoad Expr Yield decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body With Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body If NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad BinOpMod Str NameLoad NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Dict Str Str NameLoad NameLoad Raise decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Call AttributeLoad NameLoad attr keyword Str Call AttributeLoad NameLoad attr keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Num Num Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign NameStore ListComp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr BoolOpOr Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListLoad Dict Str Str Call AttributeLoad NameLoad attr Str Dict Str Str Call AttributeLoad NameLoad attr Str Dict Str Str Call AttributeLoad NameLoad attr Str Dict Str Str Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body For NameStore NameLoad body If CompareEq SubscriptLoad NameLoad Index Str NameLoad body Return SubscriptLoad NameLoad Index Str decorator_list For NameStore NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMult Str Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpMult Str Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Dict Str Str Str Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Dict Str Str Str Str Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str attr attr Expr Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr BoolOpOr Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore ListLoad Dict Str Str Call AttributeLoad NameLoad attr NameLoad Dict Str Str Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body For NameStore NameLoad body If CompareEq SubscriptLoad NameLoad Index Str NameLoad body Return NameLoad decorator_list For NameStore NameLoad body If Call NameLoad SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad AttributeLoad NameLoad attr body Pass decorator_list ClassDef bases NameLoad NameLoad AttributeLoad NameLoad attr body Pass decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body With Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Pass decorator_list ClassDef bases NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Pass decorator_list
N/A N/A 
Tests for database migrations. There are "opportunistic" tests for both mysql
and postgresql in here, which allows testing against these databases in a
properly configured unit test environment.

For the opportunistic testing you need to set up a db named 'openstack_citest'
with user 'openstack_citest' and password 'openstack_citest' on localhost.
The test will then use that db and u/p combo to run the tests.

For postgres on Ubuntu this can be done with the following commands:

::

 sudo -u postgres psql
 postgres=# create user openstack_citest with createdb login password
      'openstack_citest';
 postgres=# create database openstack_citest with owner openstack_citest;

 N/A contextlib alembic script N/A mock oslo_db exception db_exc oslo_db.sqlalchemy enginefacade oslo_db.sqlalchemy test_base oslo_db.sqlalchemy test_migrations oslo_db.sqlalchemy utils db_utils oslo_log log logging oslo_utils uuidutils N/A sqlalchemy N/A sqlalchemy.exc ironic.common.i18n _LE ironic.db.sqlalchemy migration ironic.db.sqlalchemy models ironic.tests base N/A LOG N/A N/A logging getLogger __name__ _get_connect_string N/A N/A backend user passwd database N/A N/A N/A Get database connection

    Try to get a connection with a very specific set of values, if we get
    these then we'll run the tests, otherwise they are skipped
     N/A N/A backend postgres N/A N/A backend postgresql+psycopg2 N/A N/A N/A backend mysql N/A N/A backend mysql+mysqldb N/A N/A N/A Exception N/A Unrecognized backend: '%s' backend N/A N/A %(backend)s://%(user)s:%(passwd)s@localhost/%(database)s N/A backend user passwd database backend user passwd database N/A _is_backend_avail N/A N/A backend user passwd database N/A N/A N/A N/A N/A connect_uri N/A _get_connect_string backend user passwd database N/A engine N/A N/A sqlalchemy create_engine connect_uri N/A connection N/A N/A engine connect N/A N/A N/A Exception N/A N/A False N/A N/A N/A N/A connection close N/A N/A N/A engine dispose N/A True N/A patch_with_engine N/A N/A engine N/A N/A N/A N/A N/A N/A mock patch object N/A N/A enginefacade get_legacy_facade get_engine patch_engine N/A N/A N/A patch_engine return_value engine N/A N/A N/A N/A contextlib contextmanager WalkVersionsMixin N/A object N/A _walk_versions N/A N/A self engine alembic_cfg N/A None None N/A N/A N/A patch_with_engine engine N/A N/A script_directory N/A N/A N/A script ScriptDirectory from_config alembic_cfg N/A N/A N/A self assertIsNone N/A N/A N/A self migration_api version alembic_cfg N/A versions N/A ver N/A ver N/A N/A script_directory walk_revisions N/A version N/A reversed versions N/A N/A N/A N/A self _migrate_up engine alembic_cfg N/A version revision with_data True N/A _migrate_up N/A N/A self engine config version with_data N/A False N/A N/A migrate up to a new version of the db.

        We allow for data insertion and post checks at every
        migration version with special _pre_upgrade_### and
        _check_### functions in the main test.
         N/A N/A N/A with_data N/A N/A data None N/A pre_upgrade N/A getattr self N/A _pre_upgrade_%s version None N/A pre_upgrade N/A N/A data N/A pre_upgrade engine N/A N/A N/A N/A self migration_api upgrade version config config N/A N/A N/A self assertEqual version N/A N/A N/A self migration_api version config N/A with_data N/A N/A check N/A getattr self N/A _check_%s version None N/A check N/A N/A N/A check engine data N/A N/A N/A Exception N/A N/A N/A N/A LOG error N/A _LE Failed to migrate to version %(version)s on engine %(engine)s N/A version engine version engine N/A N/A N/A TestWalkVersions N/A N/A base TestCase WalkVersionsMixin N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestWalkVersions self setUp N/A N/A self migration_api N/A N/A mock MagicMock N/A N/A self engine N/A N/A mock MagicMock N/A N/A self config N/A N/A mock MagicMock N/A N/A self versions N/A N/A N/A mock Mock revision 2b2 N/A N/A mock Mock revision 1a1 N/A test_migrate_up N/A N/A self N/A N/A N/A N/A N/A N/A self migration_api version return_value dsa123 N/A N/A N/A self _migrate_up N/A self engine N/A self config dsa123 N/A N/A N/A N/A N/A self migration_api upgrade assert_called_with dsa123 config N/A self config N/A N/A N/A N/A N/A self migration_api version assert_called_with N/A self config N/A test_migrate_up_with_data N/A N/A self N/A N/A N/A test_value N/A a b 1 2 N/A N/A N/A N/A self migration_api version return_value 141 N/A N/A self _pre_upgrade_141 N/A N/A mock MagicMock N/A N/A N/A self _pre_upgrade_141 return_value test_value N/A N/A self _check_141 N/A N/A mock MagicMock N/A N/A N/A self _migrate_up N/A self engine N/A self config 141 True N/A N/A N/A N/A self _pre_upgrade_141 assert_called_with N/A self engine N/A N/A N/A N/A self _check_141 assert_called_with N/A self engine test_value N/A test_walk_versions_all_default N/A N/A self _migrate_up script_directory N/A N/A N/A fc N/A N/A script_directory from_config N/A N/A N/A fc walk_revisions return_value N/A self versions N/A N/A N/A N/A self migration_api version return_value None N/A N/A N/A self _walk_versions N/A self engine N/A self config N/A N/A N/A N/A N/A self migration_api version assert_called_with N/A self config N/A upgraded N/A N/A N/A mock call N/A self engine N/A self config N/A v revision with_data True N/A v N/A reversed N/A self versions N/A N/A N/A self assertEqual N/A N/A self _migrate_up call_args_list upgraded N/A N/A N/A N/A mock patch object script ScriptDirectory N/A N/A N/A mock patch object WalkVersionsMixin _migrate_up test_walk_versions_all_false N/A N/A self _migrate_up script_directory N/A N/A N/A fc N/A N/A script_directory from_config N/A N/A N/A fc walk_revisions return_value N/A self versions N/A N/A N/A N/A self migration_api version return_value None N/A N/A N/A self _walk_versions N/A self engine N/A self config N/A upgraded N/A N/A N/A mock call N/A self engine N/A self config N/A v revision with_data True N/A v N/A reversed N/A self versions N/A N/A N/A self assertEqual upgraded N/A N/A self _migrate_up call_args_list N/A N/A N/A N/A mock patch object script ScriptDirectory N/A N/A N/A mock patch object WalkVersionsMixin _migrate_up N/A MigrationCheckersMixin N/A object N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super MigrationCheckersMixin self setUp N/A N/A self config N/A N/A migration _alembic_config N/A N/A self migration_api migration N/A test_walk_versions N/A N/A self N/A N/A N/A N/A N/A self _walk_versions N/A self engine N/A self config N/A test_connect_fail N/A N/A self N/A N/A N/A Test that we can trigger a database connection failure

        Test that we can fail gracefully to ensure we don't break people
        without specific database backend
         N/A N/A _is_backend_avail N/A N/A self FIXTURE DRIVER openstack_cifail N/A N/A self FIXTURE USERNAME N/A N/A self FIXTURE DBNAME N/A N/A N/A N/A self fail Shouldn't have connected N/A _check_21b331f883ef N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn provision_updated_at col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c provision_updated_at type N/A N/A sqlalchemy types DateTime N/A _check_3cb628139ea4 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn console_enabled col_names N/A N/A N/A self assertTrue N/A N/A isinstance N/A N/A N/A nodes c console_enabled type N/A N/A sqlalchemy types Boolean N/A isinstance N/A N/A N/A nodes c console_enabled type N/A N/A sqlalchemy types Integer N/A _check_31baaf680d2b N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn instance_info col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c instance_info type N/A N/A sqlalchemy types TEXT N/A _check_3bea56f25597 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A instance_uuid aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee N/A data N/A driver uuid instance_uuid fake N/A N/A uuidutils generate_uuid instance_uuid N/A N/A N/A N/A N/A N/A N/A nodes insert values data execute N/A N/A data N/A uuid N/A N/A uuidutils generate_uuid N/A N/A N/A self assertRaises N/A db_exc DBDuplicateEntry N/A N/A N/A nodes insert execute data N/A _check_242cc6a923b3 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn maintenance_reason col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c maintenance_reason type N/A N/A sqlalchemy types String N/A _pre_upgrade_5674c57409b9 N/A N/A self engine N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A data N/A N/A uuid provision_state N/A N/A uuidutils generate_uuid fake state N/A uuid provision_state N/A N/A uuidutils generate_uuid active N/A uuid provision_state N/A N/A uuidutils generate_uuid deleting N/A uuid provision_state N/A N/A uuidutils generate_uuid None N/A N/A N/A N/A N/A N/A N/A nodes insert values data execute N/A data N/A _check_5674c57409b9 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A result N/A N/A engine execute N/A N/A nodes select _get_state N/A N/A uuid N/A N/A N/A row data N/A N/A N/A N/A row N/A uuid uuid N/A N/A N/A row N/A provision_state N/A N/A row result N/A N/A old N/A _get_state N/A row N/A uuid N/A new N/A row N/A provision_state N/A N/A old None N/A N/A N/A N/A self assertEqual available new N/A N/A N/A N/A self assertEqual old new N/A _check_bb59b63f55a N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn driver_internal_info col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c driver_internal_info type N/A N/A sqlalchemy types TEXT N/A _check_4f399b21ae71 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn clean_step col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c clean_step type N/A N/A sqlalchemy types String N/A _check_789acc877671 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A col_names N/A N/A column name N/A column N/A nodes c N/A N/A N/A self assertIn raid_config col_names N/A N/A N/A self assertIn target_raid_config col_names N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c raid_config type N/A N/A sqlalchemy types String N/A N/A N/A self assertIsInstance N/A N/A N/A nodes c target_raid_config type N/A N/A sqlalchemy types String N/A _check_2fb93ffd2af1 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A bigstring N/A a 255 N/A uuid N/A N/A uuidutils generate_uuid N/A data N/A uuid name uuid bigstring N/A N/A N/A N/A N/A nodes insert execute data N/A node N/A N/A N/A N/A N/A N/A nodes select N/A N/A N/A nodes c uuid uuid execute first N/A N/A N/A self assertEqual bigstring N/A node N/A name N/A _check_516faf1bb9b1 N/A N/A self engine data N/A N/A N/A nodes N/A N/A db_utils get_table engine nodes N/A bigstring N/A a 255 N/A uuid N/A N/A uuidutils generate_uuid N/A data N/A uuid driver uuid bigstring N/A N/A N/A N/A N/A nodes insert execute data N/A node N/A N/A N/A N/A N/A N/A nodes select N/A N/A N/A nodes c uuid uuid execute first N/A N/A N/A self assertEqual bigstring N/A node N/A driver N/A _check_48d6c242bb9b N/A N/A self engine data N/A N/A N/A node_tags N/A N/A db_utils get_table engine node_tags N/A col_names N/A N/A column name N/A column N/A node_tags c N/A N/A N/A self assertIn tag col_names N/A N/A N/A self assertIsInstance N/A N/A N/A node_tags c tag type N/A N/A sqlalchemy types String N/A nodes N/A N/A db_utils get_table engine nodes N/A data N/A id name 123 node1 N/A N/A N/A N/A N/A nodes insert execute data N/A data N/A node_id tag 123 tag1 N/A N/A N/A N/A N/A node_tags insert execute data N/A tag N/A N/A N/A N/A N/A N/A node_tags select N/A N/A N/A node_tags c node_id 123 execute first N/A N/A N/A self assertEqual tag1 N/A tag N/A tag N/A _check_5ea1b0d310e N/A N/A self engine data N/A N/A N/A portgroup N/A N/A db_utils get_table engine portgroups N/A col_names N/A N/A column name N/A column N/A portgroup c N/A expected_names N/A created_at updated_at id uuid name node_id address extra N/A N/A N/A self assertEqual N/A sorted expected_names N/A sorted col_names N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c created_at type N/A N/A sqlalchemy types DateTime N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c updated_at type N/A N/A sqlalchemy types DateTime N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c id type N/A N/A sqlalchemy types Integer N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c uuid type N/A N/A sqlalchemy types String N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c name type N/A N/A sqlalchemy types String N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c node_id type N/A N/A sqlalchemy types Integer N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c address type N/A N/A sqlalchemy types String N/A N/A N/A self assertIsInstance N/A N/A N/A portgroup c extra type N/A N/A sqlalchemy types TEXT N/A ports N/A N/A db_utils get_table engine ports N/A col_names N/A N/A column name N/A column N/A ports c N/A N/A N/A self assertIn pxe_enabled col_names N/A N/A N/A self assertIn portgroup_id col_names N/A N/A N/A self assertIn local_link_connection col_names N/A N/A N/A self assertIsInstance N/A N/A N/A ports c portgroup_id type N/A N/A sqlalchemy types Integer N/A N/A N/A self assertTrue N/A N/A isinstance N/A N/A N/A ports c pxe_enabled type N/A N/A sqlalchemy types Boolean N/A isinstance N/A N/A N/A ports c pxe_enabled type N/A N/A sqlalchemy types Integer N/A _pre_upgrade_f6fdb920c182 N/A N/A self engine N/A N/A N/A ports N/A N/A db_utils get_table engine ports N/A data N/A N/A uuid pxe_enabled N/A N/A uuidutils generate_uuid None N/A uuid pxe_enabled N/A N/A uuidutils generate_uuid None N/A N/A N/A N/A N/A N/A N/A ports insert values data execute N/A data N/A _check_f6fdb920c182 N/A N/A self engine data N/A N/A N/A ports N/A N/A db_utils get_table engine ports N/A result N/A N/A engine execute N/A N/A ports select _was_inserted N/A N/A uuid N/A N/A N/A row data N/A N/A N/A N/A row N/A uuid uuid N/A N/A True N/A N/A row result N/A N/A N/A _was_inserted N/A row N/A uuid N/A N/A N/A N/A self assertTrue N/A row N/A pxe_enabled N/A test_upgrade_and_version N/A N/A self N/A N/A N/A N/A patch_with_engine N/A self engine N/A N/A N/A N/A N/A self migration_api upgrade head N/A N/A N/A self assertIsNotNone N/A N/A N/A self migration_api version N/A test_create_schema_and_version N/A N/A self N/A N/A N/A N/A patch_with_engine N/A self engine N/A N/A N/A N/A N/A self migration_api create_schema N/A N/A N/A self assertIsNotNone N/A N/A N/A self migration_api version N/A test_upgrade_and_create_schema N/A N/A self N/A N/A N/A N/A patch_with_engine N/A self engine N/A N/A N/A N/A N/A self migration_api upgrade 31baaf680d2b N/A N/A N/A self assertRaises N/A db_exc DbMigrationError N/A N/A self migration_api create_schema N/A test_upgrade_twice N/A N/A self N/A N/A N/A N/A patch_with_engine N/A self engine N/A N/A N/A N/A N/A self migration_api upgrade 31baaf680d2b N/A v1 N/A N/A N/A self migration_api version N/A N/A N/A N/A self migration_api upgrade head N/A v2 N/A N/A N/A self migration_api version N/A N/A N/A self assertNotEqual v1 v2 N/A N/A TestMigrationsMySQL N/A MigrationCheckersMixin WalkVersionsMixin N/A test_base MySQLOpportunisticTestCase N/A N/A N/A TestMigrationsPostgreSQL N/A MigrationCheckersMixin WalkVersionsMixin N/A test_base PostgreSQLOpportunisticTestCase N/A N/A N/A ModelsMigrationSyncMixin N/A object N/A get_metadata N/A N/A self N/A N/A N/A N/A N/A models Base metadata N/A get_engine N/A N/A self N/A N/A N/A N/A self engine N/A db_sync N/A N/A self engine N/A N/A N/A N/A patch_with_engine engine N/A N/A N/A N/A migration upgrade head N/A N/A ModelsMigrationsSyncMysql N/A ModelsMigrationSyncMixin N/A test_migrations ModelsMigrationsSync N/A test_base MySQLOpportunisticTestCase N/A N/A N/A ModelsMigrationsSyncPostgres N/A ModelsMigrationSyncMixin N/A test_migrations ModelsMigrationsSync N/A test_base PostgreSQLOpportunisticTestCase N/A N/A N/A