Debian Codegraph @

test/units/module_utils/facts/hardware/aix_data.py

raw
1 # This file is part of Ansible
2 #
3 # Ansible is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # Ansible is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
15
16 from __future__ import annotations
17
18
19 AIX_PROCESSOR_TEST_SCENARIOS = [
20 {
21 'comment': 'AIX 7.2 (gcc119 on GCC farm)',
22 'lsdev_output': [
23 'proc0 Available 00-00 Processor',
24 'proc8 Available 00-08 Processor',
25 'proc16 Available 00-16 Processor',
26 'proc24 Available 00-24 Processor',
27 'proc32 Available 00-32 Processor',
28 'proc40 Available 00-40 Processor',
29 'proc48 Available 00-48 Processor',
30 'proc56 Available 00-56 Processor',
31 'proc64 Available 00-64 Processor',
32 'proc72 Available 00-72 Processor',
33 ],
34 'lsattr_type_output': ['type PowerPC_POWER8 Processor type False'],
35 'lsattr_smt_threads_output': [
36 'smt_threads 8 Processor SMT threads False'
37 ],
38 'expected_result': {
39 'processor': ['PowerPC_POWER8'],
40 'processor_count': 1,
41 'processor_cores': 10,
42 'processor_threads_per_core': 8,
43 'processor_vcpus': 80
44 },
45 },
46 {
47 'comment': 'AIX 7.1 (gcc111 on GCC farm)',
48 'lsdev_output': [
49 'proc0 Available 00-00 Processor',
50 'proc4 Available 00-04 Processor',
51 'proc8 Available 00-08 Processor',
52 'proc12 Available 00-12 Processor',
53 'proc16 Available 00-16 Processor',
54 'proc20 Available 00-20 Processor',
55 'proc24 Available 00-24 Processor',
56 'proc28 Available 00-28 Processor',
57 'proc32 Available 00-32 Processor',
58 'proc36 Available 00-36 Processor',
59 'proc40 Available 00-40 Processor',
60 'proc44 Available 00-44 Processor',
61 ],
62 'lsattr_type_output': ['type PowerPC_POWER7 Processor type False'],
63 'lsattr_smt_threads_output': [
64 'smt_threads 4 Processor SMT threads False'
65 ],
66 'expected_result': {
67 'processor': ['PowerPC_POWER7'],
68 'processor_count': 1,
69 'processor_cores': 12,
70 'processor_threads_per_core': 4,
71 'processor_vcpus': 48
72 },
73 },
74 ]