cpu_cores, cpu_threads = 0, 0
if self.vim_type == "VIO":
- extra_specs["vmware:extra_config"] = '{"numa.nodeAffinity":"0"}'
- extra_specs["vmware:latency_sensitivity_level"] = "high"
+ self.process_vio_numa_nodes(numa_nodes, extra_specs)
for numa in numas:
if "id" in numa:
if cpu_threads:
extra_specs["hw:cpu_threads"] = str(cpu_threads)
+ @staticmethod
+ def process_vio_numa_nodes(numa_nodes: int, extra_specs: Dict) -> None:
+ """According to number of numa nodes, updates the extra_specs for VIO.
+
+ Args:
+
+ numa_nodes (int): List keeps the numa node numbers
+ extra_specs (dict): Extra specs dict to be updated
+
+ """
+ # If there are several numas, we do not define specific affinity.
+ extra_specs["vmware:latency_sensitivity_level"] = "high"
+
def _change_flavor_name(
self, name: str, name_suffix: int, flavor_data: dict
) -> str:
existing_vim_volumes: list,
created_items: dict,
vm_av_zone: list,
+ block_device_mapping: dict,
disk_list: list = None,
) -> None:
"""Prepare all volumes for new VM instance.
existing_vim_volumes (list): List of existing volumes
created_items (dict): All created items belongs to VM
vm_av_zone (list): VM availability zone
+ block_device_mapping (dict): Block devices to be attached to VM
disk_list (list): List of disks
"""
boot_volume_id = None
elapsed_time = 0
- block_device_mapping = {}
for disk in disk_list:
if "image_id" in disk:
# Root persistent volume
external_network = []
# List of ports with port-security disabled
no_secured_ports = []
- block_device_mapping = None
+ block_device_mapping = {}
existing_vim_volumes = []
server_group_id = None
scheduller_hints = {}
existing_vim_volumes=existing_vim_volumes,
created_items=created_items,
vm_av_zone=vm_av_zone,
+ block_device_mapping=block_device_mapping,
disk_list=disk_list,
)