<s> import yaml <EOL> from django . test import TestCase <EOL> from devops . helpers . templates import create_devops_config <EOL> from devops import settings <EOL> class TestDefaultTemplate ( TestCase ) : <EOL> def test_default ( self ) : <EOL> config = create_devops_config ( <EOL> boot_from = '<STR_LIT>' , <EOL> env_name = settings . ENV_NAME , <EOL> admin_vcpu = settings . HARDWARE [ "<STR_LIT>" ] , <EOL> admin_memory = settings . HARDWARE [ "<STR_LIT>" ] , <EOL> admin_sysvolume_capacity = settings . ADMIN_NODE_VOLUME_SIZE , <EOL> admin_iso_path = settings . ISO_PATH , <EOL> nodes_count = <NUM_LIT:2> , <EOL> numa_nodes = settings . HARDWARE [ '<STR_LIT>' ] , <EOL> slave_vcpu = settings . HARDWARE [ "<STR_LIT>" ] , <EOL> slave_memory = settings . HARDWARE [ "<STR_LIT>" ] , <EOL> slave_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> second_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> third_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> use_all_disks = settings . USE_ALL_DISKS , <EOL> ironic_nodes_count = settings . IRONIC_NODES_COUNT , <EOL> networks_bonding = settings . BONDING , <EOL> networks_bondinginterfaces = settings . BONDING_INTERFACES , <EOL> networks_multiplenetworks = settings . MULTIPLE_NETWORKS , <EOL> networks_nodegroups = settings . NODEGROUPS , <EOL> networks_interfaceorder = settings . INTERFACE_ORDER , <EOL> networks_pools = settings . POOLS , <EOL> networks_forwarding = settings . FORWARDING , <EOL> networks_dhcp = settings . DHCP , <EOL> driver_enable_acpi = settings . DRIVER_PARAMETERS [ '<STR_LIT>' ] , <EOL> ) <EOL> r = yaml . dump ( config , indent = <NUM_LIT:2> , default_flow_style = False ) <EOL> assert r == """<STR_LIT>""" <EOL> def test_acpi_and_numa ( self ) : <EOL> config = create_devops_config ( <EOL> boot_from = '<STR_LIT>' , <EOL> env_name = settings . ENV_NAME , <EOL> admin_vcpu = <NUM_LIT:4> , <EOL> admin_memory = <NUM_LIT:16> * <NUM_LIT> , <EOL> admin_sysvolume_capacity = settings . ADMIN_NODE_VOLUME_SIZE , <EOL> admin_iso_path = settings . ISO_PATH , <EOL> nodes_count = <NUM_LIT:2> , <EOL> numa_nodes = <NUM_LIT:2> , <EOL> slave_vcpu = <NUM_LIT:8> , <EOL> slave_memory = <NUM_LIT:32> * <NUM_LIT> , <EOL> slave_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> second_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> third_volume_capacity = settings . NODE_VOLUME_SIZE , <EOL> use_all_disks = settings . USE_ALL_DISKS , <EOL> ironic_nodes_count = settings . IRONIC_NODES_COUNT , <EOL> networks_bonding = settings . BONDING , <EOL> networks_bondinginterfaces = settings . BONDING_INTERFACES , <EOL> networks_multiplenetworks = settings . MULTIPLE_NETWORKS , <EOL> networks_nodegroups = settings . NODEGROUPS , <EOL> networks_interfaceorder = settings . INTERFACE_ORDER , <EOL> networks_pools = settings . POOLS , <EOL> networks_forwarding = settings . FORWARDING , <EOL> networks_dhcp = settings . DHCP , <EOL> driver_enable_acpi = True , <EOL> ) <EOL> r = yaml . dump ( config , indent = <NUM_LIT:2> , default_flow_style = False ) <EOL> assert r == """<STR_LIT>""" </s>
