The ironic.tests.unit.drivers.modules.oneview.test_common Module

class ironic.tests.unit.drivers.modules.oneview.test_common.OneViewCommonTestCase(*args, **kwargs)[source]

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

setUp()[source]
test__verify_node_info()[source]
test__verify_node_info_fails()[source]
test__verify_node_info_missing_values_empty_string()[source]
test_all_scenarios_for_translate_oneview_states()[source]
test_get_oneview_info()[source]
test_get_oneview_info_malformed_capabilities()[source]
test_get_oneview_info_missing_sh()[source]
test_get_oneview_info_missing_spt()[source]
test_is_dynamic_allocation_enabled_boolean()[source]

Ensure Dynamic Allocation is enabled when flag is True.

  1. Set ‘dynamic_allocation’ flag as True on node’s driver_info
  2. Check Dynamic Allocation is enabled for the given node
test_is_dynamic_allocation_enabled_false_boolean()[source]

Ensure Dynamic Allocation is disabled when flag is False.

  1. Set ‘dynamic_allocation’ flag as False on node’s driver_info
  2. Check Dynamic Allocation is disabled for the given node
test_is_dynamic_allocation_enabled_false_string()[source]

Ensure Dynamic Allocation is disabled when flag is ‘False’.

  1. Set ‘dynamic_allocation’ flag as False on node’s driver_info
  2. Check Dynamic Allocation is disabled for the given node
test_is_dynamic_allocation_enabled_none_object()[source]

Ensure Dynamic Allocation is disabled when flag is None.

  1. Set ‘dynamic_allocation’ flag as None on node’s driver_info
  2. Check Dynamic Allocation is disabled for the given node
test_is_dynamic_allocation_enabled_string()[source]

Ensure Dynamic Allocation is enabled when flag is ‘True’.

  1. Set ‘dynamic_allocation’ flag as True on node’s driver_info
  2. Check Dynamic Allocation is enabled for the given node
test_is_dynamic_allocation_enabled_with_invalid_value_for_flag()[source]

Ensure raises an InvalidParameterValue when flag is invalid.

  1. Create a node with an invalid value for ‘dynamic_allocation’ flag
  2. Check if method raises an InvalidParameterValue for the given node
test_is_dynamic_allocation_enabled_without_flag()[source]

Ensure Dynamic Allocation is disabled when node doesn’t have flag.

  1. Create a node without ‘dynamic_allocation’ flag
  2. Check Dynamic Allocation is disabled for the given node
test_validate_oneview_resources_compatibility(*args, **keywargs)[source]
test_validate_oneview_resources_compatibility_dynamic_allocation(*args, **keywargs)[source]

Validate compatibility of resources for Dynamic Allocation model.

  1. Set ‘dynamic_allocation’ flag as True on node’s driver_info
  2. Check validate_node_server_profile_template method is called
  3. Check validate_node_server_hardware_type method is called
  4. Check validate_node_enclosure_group method is called
  5. Check validate_node_server_hardware method is called
  6. Check is_node_port_mac_compatible_with_server_hardware method is called
  7. Check validate_server_profile_template_mac_type method is called
  8. Check check_server_profile_is_applied method is not called
  9. Check is_node_port_mac_compatible_with_server_profile method is not called
test_verify_node_info()[source]
test_verify_node_info_missing_node_driver_info()[source]
test_verify_node_info_missing_node_properties()[source]
test_verify_node_info_missing_sh()[source]
test_verify_node_info_missing_sht()[source]
test_verify_node_info_missing_spt()[source]