Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add core and threads for rhel.9.realtime #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions tests/infrastructure/instance_types/test_common_vm_preference.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,25 @@

def start_vm_with_cluster_preference(client, preference_name, namespace_name):
cluster_preference = VirtualMachineClusterPreference(name=preference_name)
with VirtualMachineForTests(
client=client,
name=f"rhel-vm-with-{preference_name}",
namespace=namespace_name,
# TODO add corresponding images to the vms
image=Images.Rhel.RHEL9_REGISTRY_GUEST_IMG,
memory_guest=cluster_preference.instance.spec.requirements.memory.guest,
cpu_sockets=cluster_preference.instance.spec.requirements.cpu.guest,
vm_preference=cluster_preference,
) as vm:

vm_args = {
"client": client,
"name": f"rhel-vm-with-{preference_name}",
"namespace": namespace_name,
# TODO add corresponding images to the VM based on preference
"image": Images.Rhel.RHEL9_REGISTRY_GUEST_IMG,
"memory_guest": cluster_preference.instance.spec.requirements.memory.guest,
"cpu_sockets": cluster_preference.instance.spec.requirements.cpu.guest,
"vm_preference": cluster_preference,
}

if preference_name == "rhel.9.realtime":
vm_args.update({
"cpu_cores": cluster_preference.instance.spec.requirements.cpu.guest,
"cpu_threads": cluster_preference.instance.spec.requirements.cpu.guest,
})
Comment on lines +67 to +82
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caller should pass whatever is needed.


with VirtualMachineForTests(**vm_args) as vm:
running_vm(vm=vm, wait_for_interfaces=False, check_ssh_connectivity=False)


Expand Down