Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Num Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Num Num Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Dict NameLoad Call NameLoad ListLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict NameLoad NameLoad Call NameLoad ListLoad NameLoad Call NameLoad ListLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict NameLoad Call NameLoad ListLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict NameLoad NameLoad Call NameLoad ListLoad NameLoad NameLoad Call NameLoad ListLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Num Num Assign NameStore BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword Num Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad NameLoad Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr keyword Num keyword NameLoad keyword ListLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Dict NameLoad NameLoad Call NameLoad ListLoad NameLoad Call NameLoad ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore BinOpMult NameLoad Num Assign NameStore Dict NameLoad NameLoad NameLoad Call NameLoad ListLoad NameLoad NameLoad Call NameLoad ListLoad NameLoad Call NameLoad ListLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Num Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpAdd NameLoad Call AttributeLoad NameLoad attr keyword Num Expr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad decorator_list
N/A N/A Tests for manipulating Conductors via the DB API N/A datetime N/A mock oslo_utils timeutils ironic.common exception ironic.tests.unit.db base ironic.tests.unit.db utils DbConductorTestCase N/A N/A base DbTestCase N/A test_register_conductor_existing_fails N/A N/A self N/A N/A N/A c N/A N/A utils get_test_conductor N/A N/A N/A N/A self dbapi register_conductor c N/A N/A N/A self assertRaises N/A exception ConductorAlreadyRegistered N/A N/A self dbapi register_conductor c N/A test_register_conductor_override N/A N/A self N/A N/A N/A c N/A N/A utils get_test_conductor N/A N/A N/A N/A self dbapi register_conductor c N/A N/A N/A N/A self dbapi register_conductor c update_existing True N/A _create_test_cdr N/A N/A self N/A kwargs N/A N/A c N/A N/A utils get_test_conductor kwargs N/A N/A N/A N/A self dbapi register_conductor c N/A test_get_conductor N/A N/A self N/A N/A N/A c1 N/A N/A self _create_test_cdr N/A c2 N/A N/A N/A self dbapi get_conductor N/A c1 hostname N/A N/A N/A self assertEqual N/A c1 id N/A c2 id N/A test_get_conductor_not_found N/A N/A self N/A N/A N/A N/A N/A self _create_test_cdr N/A N/A N/A self assertRaises N/A exception ConductorNotFound N/A N/A self dbapi get_conductor bad-hostname N/A test_unregister_conductor N/A N/A self N/A N/A N/A c N/A N/A self _create_test_cdr N/A N/A N/A N/A self dbapi unregister_conductor N/A c hostname N/A N/A N/A self assertRaises N/A exception ConductorNotFound N/A N/A self dbapi unregister_conductor N/A c hostname N/A test_touch_conductor N/A N/A self mock_utcnow N/A N/A N/A test_time N/A N/A datetime datetime 2000 1 1 0 0 N/A N/A mock_utcnow return_value test_time N/A c N/A N/A self _create_test_cdr N/A N/A N/A self assertEqual test_time N/A N/A timeutils normalize_time N/A c updated_at N/A test_time N/A N/A datetime datetime 2000 1 1 0 1 N/A N/A mock_utcnow return_value test_time N/A N/A N/A N/A self dbapi touch_conductor N/A c hostname N/A c N/A N/A N/A self dbapi get_conductor N/A c hostname N/A N/A N/A self assertEqual test_time N/A N/A timeutils normalize_time N/A c updated_at N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_touch_conductor_not_found N/A N/A self N/A N/A N/A N/A N/A self _create_test_cdr N/A N/A N/A self assertRaises N/A exception ConductorNotFound N/A N/A self dbapi touch_conductor bad-hostname N/A test_touch_offline_conductor N/A N/A self N/A N/A N/A c N/A N/A self _create_test_cdr N/A N/A N/A N/A self dbapi unregister_conductor N/A c hostname N/A N/A N/A self assertRaises N/A exception ConductorNotFound N/A N/A self dbapi get_conductor N/A c hostname N/A N/A N/A N/A self dbapi touch_conductor N/A c hostname N/A N/A N/A N/A self dbapi get_conductor N/A c hostname N/A test_clear_node_reservations_for_conductor N/A N/A self N/A N/A N/A node1 N/A N/A N/A self dbapi create_node N/A reservation hostname1 N/A node2 N/A N/A N/A self dbapi create_node N/A reservation hostname2 N/A node3 N/A N/A N/A self dbapi create_node N/A reservation None N/A N/A N/A N/A self dbapi clear_node_reservations_for_conductor hostname1 N/A node1 N/A N/A N/A self dbapi get_node_by_id N/A node1 id N/A node2 N/A N/A N/A self dbapi get_node_by_id N/A node2 id N/A node3 N/A N/A N/A self dbapi get_node_by_id N/A node3 id N/A N/A N/A self assertIsNone N/A node1 reservation N/A N/A N/A self assertEqual hostname2 N/A node2 reservation N/A N/A N/A self assertIsNone N/A node3 reservation N/A test_get_active_driver_dict_one_host_no_driver N/A N/A self mock_utcnow N/A N/A N/A h fake-host N/A expected N/A N/A N/A mock_utcnow return_value N/A N/A N/A datetime datetime utcnow N/A N/A N/A self _create_test_cdr hostname h drivers N/A N/A result N/A N/A N/A self dbapi get_active_driver_dict N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_active_driver_dict_one_host_one_driver N/A N/A self mock_utcnow N/A N/A N/A h fake-host N/A d fake-driver N/A expected N/A d N/A set N/A h N/A N/A mock_utcnow return_value N/A N/A N/A datetime datetime utcnow N/A N/A N/A self _create_test_cdr hostname h drivers N/A d N/A result N/A N/A N/A self dbapi get_active_driver_dict N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_active_driver_dict_one_host_many_drivers N/A N/A self mock_utcnow N/A N/A N/A h fake-host N/A d1 driver-one N/A d2 driver-two N/A expected N/A d1 d2 N/A set N/A h N/A set N/A h N/A N/A mock_utcnow return_value N/A N/A N/A datetime datetime utcnow N/A N/A N/A self _create_test_cdr hostname h drivers N/A d1 d2 N/A result N/A N/A N/A self dbapi get_active_driver_dict N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_active_driver_dict_many_hosts_one_driver N/A N/A self mock_utcnow N/A N/A N/A h1 host-one N/A h2 host-two N/A d fake-driver N/A expected N/A d N/A set N/A h1 h2 N/A N/A mock_utcnow return_value N/A N/A N/A datetime datetime utcnow N/A N/A N/A self _create_test_cdr id 1 hostname h1 drivers N/A d N/A N/A N/A self _create_test_cdr id 2 hostname h2 drivers N/A d N/A result N/A N/A N/A self dbapi get_active_driver_dict N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_active_driver_dict_many_hosts_and_drivers N/A N/A self mock_utcnow N/A N/A N/A h1 host-one N/A h2 host-two N/A h3 host-three N/A d1 driver-one N/A d2 driver-two N/A expected N/A d1 d2 N/A set N/A h1 h2 N/A set N/A h2 h3 N/A N/A mock_utcnow return_value N/A N/A N/A datetime datetime utcnow N/A N/A N/A self _create_test_cdr id 1 hostname h1 drivers N/A d1 N/A N/A N/A self _create_test_cdr id 2 hostname h2 drivers N/A d1 d2 N/A N/A N/A self _create_test_cdr id 3 hostname h3 drivers N/A d2 N/A result N/A N/A N/A self dbapi get_active_driver_dict N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_active_driver_dict_with_old_conductor N/A N/A self mock_utcnow N/A N/A N/A past N/A N/A datetime datetime 2000 1 1 0 0 N/A present N/A past N/A N/A datetime timedelta minutes 2 N/A d common-driver N/A h1 old-host N/A d1 old-driver N/A N/A mock_utcnow return_value past N/A N/A N/A self _create_test_cdr id 1 hostname h1 drivers N/A d d1 N/A h2 new-host N/A d2 new-driver N/A N/A mock_utcnow return_value present N/A N/A N/A self _create_test_cdr id 2 hostname h2 drivers N/A d d2 N/A one_minute 60 N/A expected N/A d d2 N/A set N/A h2 N/A set N/A h2 N/A result N/A N/A N/A self dbapi get_active_driver_dict interval one_minute N/A N/A N/A self assertEqual expected result N/A two_minute N/A one_minute 2 N/A expected N/A d d1 d2 N/A set N/A h1 h2 N/A set N/A h1 N/A set N/A h2 N/A result N/A N/A N/A self dbapi get_active_driver_dict interval two_minute N/A N/A N/A self assertEqual expected result N/A N/A N/A N/A mock patch object timeutils utcnow autospec True test_get_offline_conductors N/A N/A self mock_utcnow N/A N/A N/A N/A N/A self config heartbeat_timeout 60 group conductor N/A time_ N/A N/A datetime datetime 2000 1 1 0 0 N/A N/A mock_utcnow return_value time_ N/A c N/A N/A self _create_test_cdr N/A N/A mock_utcnow return_value N/A time_ N/A N/A datetime timedelta seconds 30 N/A N/A N/A self assertEqual N/A N/A N/A N/A self dbapi get_offline_conductors N/A N/A mock_utcnow return_value N/A time_ N/A N/A datetime timedelta seconds 61 N/A N/A N/A self assertEqual N/A N/A c hostname N/A N/A N/A self dbapi get_offline_conductors N/A N/A N/A N/A mock patch object timeutils utcnow autospec True N/A