From f4067fe9dcdf3bf5d8b02cd22e2f566e5dbe40b6 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 6 Feb 2024 17:41:43 +0100 Subject: [PATCH] M #-: Add cpu model and features on dummy drivers (#2924) Signed-off-by: David Carracedo --- src/fireedge/src/client/models/Host.js | 12 ++++++++++-- .../remotes/dummy-probes.d/host/system/system.rb | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/fireedge/src/client/models/Host.js b/src/fireedge/src/client/models/Host.js index 7f2d8a192e..8dde11e443 100644 --- a/src/fireedge/src/client/models/Host.js +++ b/src/fireedge/src/client/models/Host.js @@ -123,7 +123,11 @@ export const getPciDevices = (host) => */ export const getKvmCpuModels = (hosts = []) => { const hostData = hosts - .filter((host) => host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.kvm) + .filter( + (host) => + host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.kvm || + host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.dummy + ) .map((host) => host.TEMPLATE?.KVM_CPU_MODELS.split(' ')) .flat() @@ -140,7 +144,11 @@ export const getKvmCpuModels = (hosts = []) => { export const getKvmCpuFeatures = (hosts = []) => { const wrapHosts = Array.isArray(hosts) ? hosts : [hosts] const machineTypes = wrapHosts - ?.filter((host) => host?.TEMPLATE?.HYPERVISOR === HYPERVISORS?.kvm) + ?.filter( + (host) => + host?.TEMPLATE?.HYPERVISOR === HYPERVISORS?.kvm || + host?.TEMPLATE?.HYPERVISOR === HYPERVISORS.dummy + ) ?.map((host) => host?.TEMPLATE?.KVM_CPU_FEATURES?.split(',') ?? []) ?.flat() diff --git a/src/im_mad/remotes/dummy-probes.d/host/system/system.rb b/src/im_mad/remotes/dummy-probes.d/host/system/system.rb index f38974742f..af61d65b39 100755 --- a/src/im_mad/remotes/dummy-probes.d/host/system/system.rb +++ b/src/im_mad/remotes/dummy-probes.d/host/system/system.rb @@ -124,6 +124,8 @@ def system DS_LOCATION_USED_MB=9720 DS_LOCATION_TOTAL_MB=20480 DS_LOCATION_FREE_MB=20480 + KVM_CPU_MODELS="486 pentium pentium2 pentium3 pentiumpro coreduo n270 core2duo qemu32 kvm32 cpu64-rhel5 cpu64-rhel6 kvm64 Conroe Penryn Nehalem Nehalem-IBRS Westmere Westmere-IBRS SandyBridge SandyBridge-IBRS IvyBridge IvyBridge-IBRS SapphireRapids SapphireRapids-noTSX Opteron_G1" + KVM_CPU_FEATURES="vme,ds,acpi,ss,ht,tm,pbe,dtes64,monitor,ds_cpl,vmx,smx,est,tm2,xtpr,pdcm,osxsave,f16c,rdrand,arat,tsc_adjust,clflushopt,clwb,intel-pt,sha-ni,umip,pku,ospke,waitpkg,gfni,vaes,vpclmulqdq,rdpid,movdiri,movdir64b,pks,fsrm,md-clear,serialize,arch-lbr,stibp,arch-capabilities,core-capability,ssbd,avx-vnni,xsaveopt,xsavec,xgetbv1,xsaves,pdpe1gb,abm,invtsc,rdctl-no,ibrs-all,skip-l1dfl-vmentry,mds-no,pschange-mc-no" EOS end