The ironic.tests.unit.api.v1.test_nodes Module

Tests for the API /nodes/ methods.

class ironic.tests.unit.api.v1.test_nodes.TestAttachDetachVif(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test_vif_attach(*args, **keywargs)[source]
test_vif_attach_by_node_name(*args, **keywargs)[source]
test_vif_attach_conductor_unavailable(*args, **keywargs)[source]
test_vif_attach_invalid_vif_id(*args, **keywargs)[source]
test_vif_attach_no_vif_id(*args, **keywargs)[source]
test_vif_attach_node_locked(*args, **keywargs)[source]
test_vif_attach_node_not_found(*args, **keywargs)[source]
test_vif_detach(*args, **keywargs)[source]
test_vif_detach_by_node_name(*args, **keywargs)[source]
test_vif_detach_node_locked(*args, **keywargs)[source]
test_vif_detach_node_not_found(*args, **keywargs)[source]
test_vif_list(*args, **keywargs)[source]
test_vif_subcontroller_old_version(*args, **keywargs)[source]
class ironic.tests.unit.api.v1.test_nodes.TestCheckCleanSteps(*args, **kwargs)[source]

Bases: ironic.tests.base.TestCase

test__check_clean_steps_not_list()[source]
test__check_clean_steps_step_args_value_invalid()[source]
test__check_clean_steps_step_interface_value_invalid()[source]
test__check_clean_steps_step_key_invalid()[source]
test__check_clean_steps_step_min_length_step_value()[source]
test__check_clean_steps_step_missing_interface()[source]
test__check_clean_steps_step_missing_step_key()[source]
test__check_clean_steps_step_missing_step_value()[source]
test__check_clean_steps_step_not_dict()[source]
test__check_clean_steps_valid()[source]
class ironic.tests.unit.api.v1.test_nodes.TestDelete(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test_delete_associated(*args, **keywargs)[source]
test_delete_node(*args, **keywargs)[source]
test_delete_node_by_name(*args, **keywargs)[source]
test_delete_node_by_name_unsupported(*args, **keywargs)[source]
test_delete_node_maintenance_mode(*args, **keywargs)[source]
test_delete_node_maintenance_mode_by_name(*args, **keywargs)[source]
test_delete_node_not_found(*args, **keywargs)[source]
test_delete_node_not_found_by_name(*args, **keywargs)[source]
test_delete_node_not_found_by_name_unsupported(*args, **keywargs)[source]
test_delete_portgroup_subresource()[source]
test_delete_ports_subresource()[source]
test_delete_ports_subresource_no_port_id()[source]
class ironic.tests.unit.api.v1.test_nodes.TestListNodes(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test_associated_nodes_error()[source]
test_associated_nodes_insensitive()[source]
test_detail()[source]
test_detail_against_single()[source]
test_detail_with_association_filter()[source]
test_detail_with_instance_uuid()[source]
test_empty()[source]
test_get_all_interface_fields()[source]
test_get_all_interface_fields_invalid_api_version()[source]
test_get_boot_device(*args, **keywargs)[source]
test_get_boot_device_by_name(*args, **keywargs)[source]
test_get_boot_device_iface_not_supported(*args, **keywargs)[source]
test_get_collection_custom_fields()[source]
test_get_console_information()[source]
test_get_console_information_by_name(*args, **keywargs)[source]
test_get_console_information_console_disabled()[source]
test_get_console_information_not_supported()[source]
test_get_custom_fields_invalid_api_version()[source]
test_get_custom_fields_invalid_fields()[source]
test_get_network_interface_fields()[source]
test_get_network_interface_fields_invalid_api_version()[source]
test_get_nodes_by_driver()[source]
test_get_nodes_by_driver_invalid_api_version()[source]
test_get_nodes_by_invalid_driver()[source]
test_get_nodes_by_invalid_provision_state()[source]
test_get_nodes_by_invalid_resource_class()[source]
test_get_nodes_by_invalid_resource_class_detail()[source]
test_get_nodes_by_provision_state()[source]
test_get_nodes_by_provision_state_not_allowed()[source]
test_get_nodes_by_resource_class()[source]
test_get_nodes_by_resource_class_detail()[source]
test_get_nodes_by_resource_class_invalid_api_version()[source]
test_get_nodes_by_resource_class_invalid_api_version_detail()[source]
test_get_one()[source]
test_get_one_custom_fields()[source]
test_get_one_custom_fields_show_password()[source]
test_get_supported_boot_devices(*args, **keywargs)[source]
test_get_supported_boot_devices_by_name(*args, **keywargs)[source]
test_get_supported_boot_devices_iface_not_supported(*args, **keywargs)[source]
test_hide_fields_in_newer_versions_clean_step()[source]
test_hide_fields_in_newer_versions_driver_internal()[source]
test_hide_fields_in_newer_versions_inspection()[source]
test_hide_fields_in_newer_versions_interface_fields()[source]
test_hide_fields_in_newer_versions_name()[source]
test_hide_fields_in_newer_versions_network_interface()[source]
test_hide_fields_in_newer_versions_resource_class()[source]
test_maintenance_nodes()[source]
test_maintenance_nodes_associated()[source]
test_maintenance_nodes_error()[source]
test_many()[source]
test_many_have_names()[source]
test_mask_available_state()[source]
test_node_by_instance_uuid()[source]
test_node_by_instance_uuid_invalid_uuid()[source]
test_node_by_instance_uuid_wrong_uuid()[source]
test_node_interface_fields_hidden_in_lower_version()[source]
test_node_states()[source]
test_node_states_by_name(*args, **keywargs)[source]
test_node_states_field_hidden_in_lower_version()[source]
test_node_states_raid()[source]
test_one()[source]
test_portgroups_subresource()[source]
test_portgroups_subresource_old_api_version()[source]
test_ports_subresource()[source]
test_ports_subresource_invalid_ident()[source]
test_ports_subresource_node_not_found()[source]
test_ports_subresource_noid()[source]
test_ports_subresource_via_portgroups_subres_not_allowed()[source]
test_sort_key()[source]
test_sort_key_invalid()[source]
test_ssh_creds_masked()[source]
test_unassociated_nodes_insensitive()[source]
test_unassociated_nodes_with_limit()[source]
test_validate_by_name(*args, **keywargs)[source]
test_validate_by_name_unsupported(*args, **keywargs)[source]
test_validate_by_uuid(*args, **keywargs)[source]
test_validate_by_uuid_using_deprecated_interface(*args, **keywargs)[source]
class ironic.tests.unit.api.v1.test_nodes.TestNodeObject(*args, **kwargs)[source]

Bases: ironic.tests.base.TestCase

test_node_init()[source]
class ironic.tests.unit.api.v1.test_nodes.TestPatch(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test__update_changed_fields_remove_chassis_uuid(*args, **keywargs)[source]
test_add_chassis_id()[source]
test_add_chassis_uuid()[source]
test_add_ok()[source]
test_add_root()[source]
test_add_root_non_existent()[source]
test_add_state_in_cleaning()[source]
test_add_state_in_deployfail()[source]
test_patch_add_name_empty_invalid()[source]
test_patch_add_name_empty_not_acceptable()[source]
test_patch_add_name_invalid()[source]
test_patch_add_name_ok()[source]
test_patch_add_name_reserved()[source]
test_patch_add_replace_invalid()[source]
test_patch_duplicate_name()[source]
test_patch_name_remove_ok(*args, **keywargs)[source]
test_patch_name_replace_ok()[source]
test_patch_portgroups_subresource()[source]
test_patch_ports_subresource()[source]
test_patch_ports_subresource_no_port_id()[source]
test_patch_update_drive_console_enabled(*args, **keywargs)[source]
test_patch_update_name_twice_both_invalid()[source]
test_patch_update_name_twice_second_invalid()[source]
test_remove_chassis_id()[source]
test_remove_chassis_uuid()[source]
test_remove_chassis_uuid_invalid_api_version()[source]
test_remove_internal_field()[source]
test_remove_mandatory_field()[source]
test_remove_non_existent_property_fail()[source]
test_remove_ok()[source]
test_remove_uuid()[source]
test_replace_chassis_id()[source]
test_replace_chassis_uuid()[source]
test_replace_consoled_enabled()[source]
test_replace_internal_field()[source]
test_replace_maintenance()[source]
test_replace_maintenance_by_name()[source]
test_replace_non_existent_chassis_uuid()[source]
test_replace_provision_updated_at()[source]
test_update_allowed_in_maintenance()[source]
test_update_allowed_in_power_transition()[source]
test_update_by_name_unsupported()[source]
test_update_classic_driver_interface_fields()[source]
test_update_fails_bad_driver()[source]
test_update_fails_bad_driver_info(*args, **keywargs)[source]
test_update_in_UPDATE_ALLOWED_STATES()[source]
test_update_interface_fields()[source]
test_update_interface_fields_bad_version()[source]
test_update_network_interface()[source]
test_update_network_interface_old_api()[source]
test_update_ok(*args, **keywargs)[source]
test_update_ok_by_name()[source]
test_update_resource_class()[source]
test_update_resource_class_max_length()[source]
test_update_resource_class_old_api()[source]
test_update_resource_class_too_long()[source]
test_update_state()[source]
class ironic.tests.unit.api.v1.test_nodes.TestPost(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test_create_node(*args, **keywargs)[source]
test_create_node_chassis_uuid_always_in_response(*args, **keywargs)[source]
test_create_node_chassis_uuid_not_found(*args, **keywargs)[source]
test_create_node_classic_driver_specify_interface(*args, **keywargs)[source]
test_create_node_default_state_enroll(*args, **keywargs)[source]
test_create_node_default_state_none(*args, **keywargs)[source]
test_create_node_doesnt_contain_id(*args, **keywargs)[source]
test_create_node_explicit_network_interface(*args, **keywargs)[source]
test_create_node_invalid_chassis(*args, **keywargs)[source]
test_create_node_invalid_driver(*args, **keywargs)[source]
test_create_node_invalid_network_interface(*args, **keywargs)[source]
test_create_node_name_empty_invalid(*args, **keywargs)[source]
test_create_node_name_empty_not_acceptable(*args, **keywargs)[source]
test_create_node_network_interface(*args, **keywargs)[source]
test_create_node_network_interface_old_api_version(*args, **keywargs)[source]
test_create_node_no_chassis_uuid(*args, **keywargs)[source]
test_create_node_no_mandatory_field_driver(*args, **keywargs)[source]
test_create_node_reserved_name(*args, **keywargs)[source]
test_create_node_resource_class(*args, **keywargs)[source]
test_create_node_resource_class_old_api_version(*args, **keywargs)[source]
test_create_node_specify_interfaces(*args, **keywargs)[source]
test_create_node_specify_interfaces_bad_version(*args, **keywargs)[source]
test_create_node_valid_driver_info(*args, **keywargs)[source]
test_create_node_valid_extra(*args, **keywargs)[source]
test_create_node_valid_instance_info(*args, **keywargs)[source]
test_create_node_valid_properties(*args, **keywargs)[source]
test_create_node_with_chassis_uuid(*args, **keywargs)[source]
test_create_node_with_internal_field(*args, **keywargs)[source]
test_post_portgroups_subresource(*args, **keywargs)[source]
test_post_ports_subresource(*args, **keywargs)[source]
test_post_ports_subresource_no_node_id(*args, **keywargs)[source]
test_vendor_passthru_async(*args, **keywargs)[source]
test_vendor_passthru_by_name(*args, **keywargs)[source]
test_vendor_passthru_delete(*args, **keywargs)[source]
test_vendor_passthru_get(*args, **keywargs)[source]
test_vendor_passthru_methods(*args, **keywargs)[source]
test_vendor_passthru_no_such_method(*args, **keywargs)[source]
test_vendor_passthru_put(*args, **keywargs)[source]
test_vendor_passthru_sync(*args, **keywargs)[source]
test_vendor_passthru_without_method(*args, **keywargs)[source]
class ironic.tests.unit.api.v1.test_nodes.TestPut(*args, **kwargs)[source]

Bases: ironic.tests.unit.api.base.BaseApiTest

setUp()[source]
test_abort_cleanwait(*args, **keywargs)[source]
test_abort_invalid_state()[source]
test_adopt_from_active_fails(*args, **keywargs)[source]

Test that an ACTIVE node cannot be adopted

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

Test that a node in ADOPTFAIL can be adopted

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

Test that a node can be adopted from the manageable state

test_adopt_raises_error_before_1_17()[source]

Test that a lower API client cannot use the adopt verb

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

Test that a node in ADOPTING fails with invalid requests

Verify that an API request fails if the ACTIVE, REBUILD, or DELETED state is requested by an API client when the node is in ADOPTING state.

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

Test that a node in ADOPTFAIL fails with invalid requests

Verify that an API request fails if the ACTIVE, REBUILD, or DELETED state is requested by an API client when the node is in ADOPTFAIL state.

test_bad_requests_in_managed_state(*args, **keywargs)[source]
test_clean(*args, **keywargs)[source]
test_clean_check_steps_fail(*args, **keywargs)[source]
test_clean_no_cleansteps()[source]
test_inject_nmi(*args, **keywargs)[source]
test_inject_nmi_not_allowed(*args, **keywargs)[source]
test_inject_nmi_not_supported(*args, **keywargs)[source]
test_inspect_already_in_progress()[source]
test_manage_from_adoptfail(*args, **keywargs)[source]

Test that a node can be sent to MANAGEABLE from ADOPTFAIL

test_manage_from_available(*args, **keywargs)[source]
test_power_change_when_being_cleaned()[source]
test_power_invalid_state_request()[source]
test_power_state_by_name()[source]
test_power_state_by_name_unsupported()[source]
test_power_state_power_on_invalid_timeout_invalid_soft_ver()[source]
test_power_state_power_on_invalid_timeout_no_ver()[source]
test_power_state_power_on_invalid_timeout_valid_soft_ver()[source]
test_power_state_power_on_no_timeout_invalid_soft_ver()[source]
test_power_state_power_on_no_timeout_no_ver()[source]
test_power_state_power_on_no_timeout_valid_soft_ver()[source]
test_power_state_power_on_valid_timeout_invalid_soft_ver()[source]
test_power_state_power_on_valid_timeout_no_ver()[source]
test_power_state_power_on_valid_timeout_valid_soft_ver()[source]
test_power_state_soft_power_off_invalid_timeout_invalid_soft_ver()[source]
test_power_state_soft_power_off_invalid_timeout_no_ver()[source]
test_power_state_soft_power_off_invalid_timeout_valid_soft_ver()[source]
test_power_state_soft_power_off_no_timeout_invalid_soft_ver()[source]
test_power_state_soft_power_off_no_timeout_no_ver()[source]
test_power_state_soft_power_off_no_timeout_valid_soft_ver()[source]
test_power_state_soft_power_off_valid_timeout_invalid_soft_ver()[source]
test_power_state_soft_power_off_valid_timeout_no_ver()[source]
test_power_state_soft_power_off_valid_timeout_valid_soft_ver()[source]
test_provide_from_manage(*args, **keywargs)[source]
test_provision_already_in_progress()[source]
test_provision_already_in_state()[source]
test_provision_by_name()[source]
test_provision_by_name_unsupported()[source]
test_provision_invalid_state_request()[source]
test_provision_locked_with_correct_state()[source]
test_provision_node_in_maintenance_fail()[source]
test_provision_with_cleansteps_not_clean()[source]
test_provision_with_configdrive_not_active()[source]
test_provision_with_deploy()[source]
test_provision_with_deploy_after_deployfail()[source]
test_provision_with_deploy_configdrive()[source]
test_provision_with_tear_down()[source]
test_provision_with_tear_down_in_progress_deploywait()[source]
test_put_raid(*args, **keywargs)[source]
test_put_raid_iface_not_supported(*args, **keywargs)[source]
test_put_raid_invalid_parameter_value(*args, **keywargs)[source]
test_put_raid_older_version(*args, **keywargs)[source]
test_set_boot_device(*args, **keywargs)[source]
test_set_boot_device_by_name(*args, **keywargs)[source]
test_set_boot_device_not_supported(*args, **keywargs)[source]
test_set_boot_device_persistent(*args, **keywargs)[source]
test_set_boot_device_persistent_invalid_value(*args, **keywargs)[source]
test_set_console_by_name(*args, **keywargs)[source]
test_set_console_by_name_unsupported(*args, **keywargs)[source]
test_set_console_mode_bad_request()[source]
test_set_console_mode_bad_request_missing_parameter()[source]
test_set_console_mode_console_not_supported()[source]
test_set_console_mode_disabled()[source]
test_set_console_mode_enabled()[source]
test_set_node_maintenance_mode(*args, **keywargs)[source]
test_set_node_maintenance_mode_by_name(*args, **keywargs)[source]
test_set_node_maintenance_mode_error(*args, **keywargs)[source]
test_set_node_maintenance_mode_no_reason(*args, **keywargs)[source]
test_set_node_maintenance_mode_no_reason_by_name(*args, **keywargs)[source]