-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1182
- Loading branch information
Showing
12 changed files
with
221 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_aarch64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"lscpu": [ | ||
{"field": "Architecture:", "data": "x86_64"}, | ||
{"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"}, | ||
{"field": "Byte Order:", "data": "Little Endian"}, | ||
{"field": "CPU(s):", "data": "2"}, | ||
{"field": "On-line CPU(s) list:", "data": "0,1"}, | ||
{"field": "Thread(s) per core:", "data": "1"}, | ||
{"field": "Core(s) per socket:", "data": "1"}, | ||
{"field": "Socket(s):", "data": "2"}, | ||
{"field": "NUMA node(s):", "data": "1"}, | ||
{"field": "Vendor ID:", "data": "GenuineIntel"}, | ||
{"field": "BIOS Vendor ID:", "data": "QEMU"}, | ||
{"field": "CPU family:", "data": "6"}, | ||
{"field": "Model:", "data": "165"}, | ||
{"field": "Model name:", "data": "Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz"}, | ||
{"field": "BIOS Model name:", "data": "pc-i440fx-7.2"}, | ||
{"field": "Stepping:", "data": "2"}, | ||
{"field": "CPU MHz:", "data": "2712.006"}, | ||
{"field": "BogoMIPS:", "data": "5424.01"}, | ||
{"field": "Virtualization:", "data": "VT-x"}, | ||
{"field": "Hypervisor vendor:", "data": "KVM"}, | ||
{"field": "Virtualization type:", "data": "full"}, | ||
{"field": "L1d cache:", "data": "32K"}, | ||
{"field": "L1i cache:", "data": "32K"}, | ||
{"field": "L2 cache:", "data": "4096K"}, | ||
{"field": "L3 cache:", "data": "16384K"}, | ||
{"field": "NUMA node0 CPU(s):", "data": "0,1"}, | ||
{"field": "Flags:", "data": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip pku ospke md_clear arch_capabilities"} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_ppc64le
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"lscpu": [ | ||
{"field": "Architecture:", "data": "x86_64"}, | ||
{"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"}, | ||
{"field": "Byte Order:", "data": "Little Endian"}, | ||
{"field": "CPU(s):", "data": "2"}, | ||
{"field": "On-line CPU(s) list:", "data": "0,1"}, | ||
{"field": "Thread(s) per core:", "data": "1"}, | ||
{"field": "Core(s) per socket:", "data": "1"}, | ||
{"field": "Socket(s):", "data": "2"}, | ||
{"field": "NUMA node(s):", "data": "1"}, | ||
{"field": "Vendor ID:", "data": "GenuineIntel"}, | ||
{"field": "BIOS Vendor ID:", "data": "QEMU"}, | ||
{"field": "CPU family:", "data": "6"}, | ||
{"field": "Model:", "data": "165"}, | ||
{"field": "Model name:", "data": "Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz"}, | ||
{"field": "BIOS Model name:", "data": "pc-i440fx-7.2"}, | ||
{"field": "Stepping:", "data": "2"}, | ||
{"field": "CPU MHz:", "data": "2712.006"}, | ||
{"field": "BogoMIPS:", "data": "5424.01"}, | ||
{"field": "Virtualization:", "data": "VT-x"}, | ||
{"field": "Hypervisor vendor:", "data": "KVM"}, | ||
{"field": "Virtualization type:", "data": "full"}, | ||
{"field": "L1d cache:", "data": "32K"}, | ||
{"field": "L1i cache:", "data": "32K"}, | ||
{"field": "L2 cache:", "data": "4096K"}, | ||
{"field": "L3 cache:", "data": "16384K"}, | ||
{"field": "NUMA node0 CPU(s):", "data": "0,1"}, | ||
{"field": "Flags:", "data": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip pku ospke md_clear arch_capabilities"} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_s390x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"lscpu": [ | ||
{"field": "Architecture:", "data": "x86_64"}, | ||
{"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"}, | ||
{"field": "Byte Order:", "data": "Little Endian"}, | ||
{"field": "CPU(s):", "data": "2"}, | ||
{"field": "On-line CPU(s) list:", "data": "0,1"}, | ||
{"field": "Thread(s) per core:", "data": "1"}, | ||
{"field": "Core(s) per socket:", "data": "1"}, | ||
{"field": "Socket(s):", "data": "2"}, | ||
{"field": "NUMA node(s):", "data": "1"}, | ||
{"field": "Vendor ID:", "data": "GenuineIntel"}, | ||
{"field": "BIOS Vendor ID:", "data": "QEMU"}, | ||
{"field": "CPU family:", "data": "6"}, | ||
{"field": "Model:", "data": "165"}, | ||
{"field": "Model name:", "data": "Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz"}, | ||
{"field": "BIOS Model name:", "data": "pc-i440fx-7.2"}, | ||
{"field": "Stepping:", "data": "2"}, | ||
{"field": "CPU MHz:", "data": "2712.006"}, | ||
{"field": "BogoMIPS:", "data": "5424.01"}, | ||
{"field": "Virtualization:", "data": "VT-x"}, | ||
{"field": "Hypervisor vendor:", "data": "KVM"}, | ||
{"field": "Virtualization type:", "data": "full"}, | ||
{"field": "L1d cache:", "data": "32K"}, | ||
{"field": "L1i cache:", "data": "32K"}, | ||
{"field": "L2 cache:", "data": "4096K"}, | ||
{"field": "L3 cache:", "data": "16384K"}, | ||
{"field": "NUMA node0 CPU(s):", "data": "0,1"}, | ||
{"field": "Flags:", "data": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves arat umip pku ospke md_clear arch_capabilities"} | ||
] | ||
} |
31 changes: 31 additions & 0 deletions
31
repos/system_upgrade/common/actors/scancpu/tests/files/json/lscpu_x86_64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"lscpu": [ | ||
{"field": "Architecture:", "data": "x86_64"}, | ||
{"field": "CPU op-mode(s):", "data": "32-bit, 64-bit"}, | ||
{"field": "Byte Order:", "data": "Little Endian"}, | ||
{"field": "CPU(s):", "data": "2"}, | ||
{"field": "On-line CPU(s) list:", "data": "0,1"}, | ||
{"field": "Thread(s) per core:", "data": "1"}, | ||
{"field": "Core(s) per socket:", "data": "1"}, | ||
{"field": "Socket(s):", "data": "2"}, | ||
{"field": "NUMA node(s):", "data": "1"}, | ||
{"field": "Vendor ID:", "data": "GenuineIntel"}, | ||
{"field": "BIOS Vendor ID:", "data": "QEMU"}, | ||
{"field": "CPU family:", "data": "6"}, | ||
{"field": "Model:", "data": "165"}, | ||
{"field": "Model name:", "data": "Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz"}, | ||
{"field": "BIOS Model name:", "data": "pc-i440fx-7.2"}, | ||
{"field": "Stepping:", "data": "2"}, | ||
{"field": "CPU MHz:", "data": "2712.006"}, | ||
{"field": "BogoMIPS:", "data": "5424.01"}, | ||
{"field": "Virtualization:", "data": "VT-x"}, | ||
{"field": "Hypervisor vendor:", "data": "KVM"}, | ||
{"field": "Virtualization type:", "data": "full"}, | ||
{"field": "L1d cache:", "data": "32K"}, | ||
{"field": "L1i cache:", "data": "32K"}, | ||
{"field": "L2 cache:", "data": "4096K"}, | ||
{"field": "L3 cache:", "data": "16384K"}, | ||
{"field": "NUMA node0 CPU(s):", "data": "0,1"}, | ||
{"field": "Flags:", "data": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear flush_l1d"} | ||
] | ||
} |
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
repos/system_upgrade/common/actors/scancpu/tests/files/txt/lscpu_empty_field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Architecture: | ||
Flags: flag |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
repos/system_upgrade/el7toel8/actors/mytestdialog/actor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import time | ||
from leapp.actors import Actor | ||
from leapp.dialogs import Dialog | ||
from leapp.dialogs.components import BooleanComponent | ||
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag | ||
from leapp.libraries.stdlib import api | ||
|
||
|
||
class MyCustomQuestion(Actor): | ||
""" | ||
Confirm suggested authselect call from AuthselectScanner. | ||
AuthselectScanner produces an Authselect model that contains changes | ||
that are suggested based on current configuration. This actor will | ||
ask administrator for confirmation and will report the result. | ||
""" | ||
|
||
name = 'time_check' | ||
consumes = () | ||
produces = () | ||
tags = (IPUWorkflowTag, ChecksPhaseTag) | ||
dialogs = (Dialog(scope='time_check', | ||
reason='Confirmation', | ||
components=(BooleanComponent(key='confirm', | ||
label='Is it lunchtime yet?', | ||
default=True, | ||
description='', | ||
reason='I am hungry.'),)),) | ||
|
||
def process(self): | ||
dialog = self.dialogs[0] | ||
|
||
dialog.components[0].label += " {}".format(time.ctime()) | ||
|
||
result = self.get_answers(dialog).get('confirm') | ||
|
||
api.current_logger().debug('Answer to whether there is lunch: {}'.format(result)) | ||
|
||
if result: | ||
api.current_logger().warning('LUNCHTIME!') | ||
elif result is False: | ||
api.current_logger().warning('No lunch yet.') | ||
else: | ||
api.current_logger().warning('WHAT EVEN IS LUNCH? {}'.format(result)) |