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
-
test_is_dynamic_allocation_enabled_boolean
()[source]¶ Ensure Dynamic Allocation is enabled when flag is True.
- Set ‘dynamic_allocation’ flag as True on node’s driver_info
- 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.
- Set ‘dynamic_allocation’ flag as False on node’s driver_info
- 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’.
- Set ‘dynamic_allocation’ flag as False on node’s driver_info
- 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.
- Set ‘dynamic_allocation’ flag as None on node’s driver_info
- 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’.
- Set ‘dynamic_allocation’ flag as True on node’s driver_info
- 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.
- Create a node with an invalid value for ‘dynamic_allocation’ flag
- 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.
- Create a node without ‘dynamic_allocation’ flag
- Check Dynamic Allocation is disabled for the given node
-
test_validate_oneview_resources_compatibility_dynamic_allocation
(*args, **keywargs)[source]¶ Validate compatibility of resources for Dynamic Allocation model.
- Set ‘dynamic_allocation’ flag as True on node’s driver_info
- Check validate_node_server_profile_template method is called
- Check validate_node_server_hardware_type method is called
- Check validate_node_enclosure_group method is called
- Check validate_node_server_hardware method is called
- Check is_node_port_mac_compatible_with_server_hardware method is called
- Check validate_server_profile_template_mac_type method is called
- Check check_server_profile_is_applied method is not called
- Check is_node_port_mac_compatible_with_server_profile method is not called
-