The ironic.tests.unit.conductor.test_utils Module

The ironic.tests.unit.conductor.test_utils Module

class ironic.tests.unit.conductor.test_utils.CleanupAfterTimeoutTestCase(*args, **kwds)[source]

Bases: ironic.tests.base.TestCase

setUp()[source]
test_cleanup_after_timeout()[source]
test_cleanup_after_timeout_cleanup_ironic_exception()[source]
test_cleanup_after_timeout_cleanup_random_exception()[source]
test_cleanup_after_timeout_shared_lock()[source]
class ironic.tests.unit.conductor.test_utils.ErrorHandlersTestCase(*args, **kwds)[source]

Bases: ironic.tests.base.TestCase

setUp()[source]
test_abort_on_conductor_take_over_cleaning()[source]
test_abort_on_conductor_take_over_deploying()[source]
test_cleaning_error_handler()[source]
test_cleaning_error_handler_cleanfail()[source]
test_cleaning_error_handler_cleanwait()[source]
test_cleaning_error_handler_manual()[source]
test_cleaning_error_handler_no_fail()[source]
test_cleaning_error_handler_no_teardown()[source]
test_cleaning_error_handler_tear_down_error(*args, **keywargs)[source]
test_cleanup_cleanwait_timeout()[source]
test_cleanup_cleanwait_timeout_handler_call(*args, **keywargs)[source]
test_cleanup_rescuewait_timeout(*args, **keywargs)[source]
test_cleanup_rescuewait_timeout_known_exc(*args, **keywargs)[source]
test_cleanup_rescuewait_timeout_unknown_exc(*args, **keywargs)[source]
test_power_state_error_handler_no_worker(*args, **keywargs)[source]
test_power_state_error_handler_other_error(*args, **keywargs)[source]
test_provision_error_handler_no_worker(*args, **keywargs)[source]
test_provision_error_handler_other_error(*args, **keywargs)[source]
test_rescuing_error_handler()[source]
test_rescuing_error_handler_bad_state(*args, **keywargs)[source]
test_rescuing_error_handler_ironic_exc(*args, **keywargs)[source]
test_rescuing_error_handler_other_exc(*args, **keywargs)[source]
test_rescuing_error_handler_set_failed_state_false()[source]
test_spawn_cleaning_error_handler_no_worker(*args, **keywargs)[source]
test_spawn_cleaning_error_handler_other_error(*args, **keywargs)[source]
test_spawn_rescue_error_handler_no_worker(*args, **keywargs)[source]
test_spawn_rescue_error_handler_other_error(*args, **keywargs)[source]
class ironic.tests.unit.conductor.test_utils.MiscTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

setUp()[source]
test_remove_node_rescue_password_save_false()[source]
test_remove_node_rescue_password_save_true()[source]
class ironic.tests.unit.conductor.test_utils.NodeCleaningStepsTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

setUp()[source]
test__get_cleaning_steps(*args, **keywargs)[source]
test__get_cleaning_steps_only_enabled(*args, **keywargs)[source]
test__get_cleaning_steps_unsorted(*args, **keywargs)[source]
test__validate_user_clean_steps(*args, **keywargs)[source]
test__validate_user_clean_steps_get_steps_exception(*args, **keywargs)[source]
test__validate_user_clean_steps_invalid_arg(*args, **keywargs)[source]
test__validate_user_clean_steps_missing_required_arg(*args, **keywargs)[source]
test__validate_user_clean_steps_no_steps(*args, **keywargs)[source]
test__validate_user_clean_steps_not_supported(*args, **keywargs)[source]
test_set_node_cleaning_steps_automated(*args, **keywargs)[source]
test_set_node_cleaning_steps_manual(*args, **keywargs)[source]
class ironic.tests.unit.conductor.test_utils.NodePowerActionTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

setUp()[source]
test__calculate_target_state()[source]
test__can_skip_state_change_db_not_in_sync()[source]

Test setting node state to its present state if DB is out of sync.

Under rare conditions (see bug #1403106) database might contain stale information, make sure we fix it.

test__can_skip_state_change_different_state()[source]

Test setting node state to different state.

Test that we should change state if requested state is different from current state.

test__can_skip_state_change_failed_getting_state_notify(*args, **keywargs)[source]

Test for notification & exception when can’t get power state.

Test to make sure we generate a notification and also that an exception is raised when we can’t get the current power state.

test__can_skip_state_change_same_state(*args, **keywargs)[source]

Test setting node state to its present state.

Test that we don’t try to set the power state if the requested state is the same as the current state.

test_node_power_action_already_being_processed()[source]

Test node power action after aborted power action.

The target_power_state is expected to be None so it isn’t checked in the code. This is what happens if it is not None. (Eg, if a conductor had died during a previous power-off attempt and left the target_power_state set to states.POWER_OFF, and the user is attempting to power-off again.)

test_node_power_action_failed_getting_state()[source]

Test for exception when we can’t get the current power state.

test_node_power_action_failed_getting_state_notify(*args, **keywargs)[source]

Test for notification when we can’t get the current power state.

test_node_power_action_in_same_state(*args, **keywargs)[source]

Test setting node state to its present state.

Test that we don’t try to set the power state if the requested state is the same as the current state.

test_node_power_action_in_same_state_db_not_in_sync()[source]

Test setting node state to its present state if DB is out of sync.

Under rare conditions (see bug #1403106) database might contain stale information, make sure we fix it.

test_node_power_action_invalid_state()[source]

Test for exception when changing to an invalid power state.

test_node_power_action_invalid_state_notify(*args, **keywargs)[source]

Test for notification when changing to an invalid power state.

test_node_power_action_power_off()[source]

Test node_power_action to turn node power off.

test_node_power_action_power_off_storage_detach()[source]

Test node_power_action to turn node power off and detach storage.

test_node_power_action_power_on()[source]

Test node_power_action to turn node power on.

test_node_power_action_power_on_notify(*args, **keywargs)[source]

Test node_power_action to power on node and send notification.

test_node_power_action_power_on_storage_attach()[source]

Test node_power_action to turn node power on and attach storage.

test_node_power_action_power_reboot()[source]

Test for reboot a node.

test_node_power_action_reboot_no_timeout()[source]

Test node reboot using Power Interface with no timeout arg.

test_node_power_action_reboot_storage_attach()[source]

Test node_power_action to reboot the node and attach storage.

test_node_power_action_set_power_failure()[source]

Test if an exception is thrown when the set_power call fails.

test_node_power_action_set_power_failure_notify(*args, **keywargs)[source]

Test if a notification is sent when the set_power call fails.

class ironic.tests.unit.conductor.test_utils.NodeSetBootDeviceTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

test_node_set_boot_device_adopting()[source]
test_node_set_boot_device_non_existent_device()[source]
test_node_set_boot_device_valid()[source]
class ironic.tests.unit.conductor.test_utils.NodeSoftPowerActionTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

setUp()[source]
test_node_power_action_power_soft_reboot()[source]

Test for soft reboot a node.

test_node_power_action_power_soft_reboot_timeout()[source]

Test for soft reboot a node.

test_node_power_action_soft_power_off()[source]

Test node_power_action to turn node soft power off.

test_node_power_action_soft_power_off_storage_detach()[source]

Test node_power_action to soft power off node and detach storage.

test_node_power_action_soft_power_off_timeout()[source]

Test node_power_action to turn node soft power off.

class ironic.tests.unit.conductor.test_utils.TestPowerNoTimeout[source]

Bases: ironic.drivers.base.PowerInterface

Missing ‘timeout’ parameter for get_power_state & reboot

get_power_state(task)[source]
get_properties()[source]
reboot(task)[source]
set_power_state(task, power_state, timeout=None)[source]
validate(task)[source]
class ironic.tests.unit.conductor.test_utils.ValidatePortPhysnetTestCase(*args, **kwds)[source]

Bases: ironic.tests.unit.db.base.DbTestCase

setUp()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_create_1()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_create_2()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_update_1()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_update_2()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_update_add_1()[source]
test_validate_port_physnet_1_port_portgroup_no_physnet_update_add_2()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_create_1()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_create_2()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_create_3()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_1()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_2()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_3()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_add_1()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_add_2()[source]
test_validate_port_physnet_1_port_portgroup_w_physnet_update_add_3()[source]
test_validate_port_physnet_2_port_portgroup_no_physnet_update_1()[source]
test_validate_port_physnet_2_port_portgroup_no_physnet_update_2()[source]
test_validate_port_physnet_2_port_portgroup_w_physnet_update_1()[source]
test_validate_port_physnet_2_port_portgroup_w_physnet_update_2()[source]
test_validate_port_physnet_2_port_portgroup_w_physnet_update_3()[source]
test_validate_port_physnet_empty_portgroup_create_1()[source]
test_validate_port_physnet_empty_portgroup_create_2()[source]
test_validate_port_physnet_empty_portgroup_update_1()[source]
test_validate_port_physnet_empty_portgroup_update_2()[source]
test_validate_port_physnet_inconsistent_physnets()[source]
test_validate_port_physnet_inconsistent_physnets_fix()[source]
test_validate_port_physnet_no_portgroup_create(*args, **keywargs)[source]
test_validate_port_physnet_no_portgroup_update(*args, **keywargs)[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.