Skip to content

Commit 7f4b466

Browse files
Merge pull request #342 from lop-devops/revert-341-dynamic_input_v1
Revert "Dynamic inputfile code v1 : Added support for virtual devices vNIC, Veth, HNV"
2 parents f2db605 + 10324b6 commit 7f4b466

File tree

4 files changed

+179
-567
lines changed

4 files changed

+179
-567
lines changed

README.pci_info

+74-155
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ optional arguments:
1111
-h, --help show this help message and exit
1212
--pci-address PCI_ADDR
1313
pci address, comma separated
14-
--vnic vNIC_INT
15-
vNIC interface name
16-
--veth vETH_INT
17-
vETH interface name
18-
--hnv HNV_INT
19-
HNV interface name
20-
2114
--show-info Show the pci details
2215
--create-config Create test config and input files
2316
--additional-params ADD_PARAMS
2417
Additional parameters(key=value) to the input file,
2518
space separated
2619

2720

21+
2822
ARGUMENT DETAILS:
2923
-----------------
3024

@@ -34,21 +28,6 @@ ARGUMENT DETAILS:
3428
If not provided, collects details for all pci addresses in the system.
3529

3630

37-
--vnic vNIC_INT
38-
Use this option to specify for which vNIC interface the details should be collected.
39-
If "vNIC_INT" not provided, then the first available vNIC interface from system will be used by default.
40-
41-
42-
--veth vETH_INT
43-
Use this option to specify for which vETH interface the details should be collected.
44-
If "vETH_INT" not provided, then the first available vETH interface from system will be used by default.
45-
46-
47-
--hnv HNV_INT
48-
Use this option to specify for which vHNV interface the details should be collected.
49-
If "HNV_INT" not provided, then the first available HNV interface from system will be used by default.
50-
51-
5231
--pci-address-blocklist PCI_ADDR_BLOCKLIST
5332
Use this option to leave out pci addresses from the list.
5433
Use comma separated values to provide multiple pci addresses.
@@ -74,7 +53,7 @@ ARGUMENT DETAILS:
7453
Option to create config file if required.
7554
Suppose the system has one pci card, which is nvme: Then, a cfg file named
7655
io_nvme_<pci_address>_fvt.cfg is generated in config/tests/host/
77-
56+
7857
It also generates input file (Check --input-file section of main README).
7958
The details for input file is got via config file at config/wrapper/pci_input_cfg.txt
8059
The details are dynamic, and the dictionary values can be used to edit the input config
@@ -109,138 +88,78 @@ ARGUMENT DETAILS:
10988
--additional-params "0005:60:00::a=b c=d"
11089
a = b is only for the specified pci address, and c = d is for all test configs.
11190

112-
Additional params for virtual interfaces is supported, if they are provided key=value
113-
pair, separated by ",".
11491

115-
Example:
116-
--additional-params device_ip=192.168.100.184,peer_ip=192.168.100.104,netmask=255.255.255.0,
117-
peer_ips="192.168.100.104 192.168.110.104",peer_interfaces="env4 env5"
118-
119-
120-
EXAMPLES:
121-
---------
122-
A. For pci devices
123-
++++++++++++++++++
124-
125-
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --show-info
126-
127-
[{'adapter_description': 'Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter',
128-
'adapter_id': '10df:e300:1014:0615',
129-
'adapter_type': 'fc',
130-
'class': 'scsi_host',
131-
'disks': ['/dev/sdaa',
132-
'/dev/sdab',
133-
'/dev/sdx',
134-
'/dev/sdy',
135-
'/dev/sdg',
136-
'/dev/sdd',
137-
'/dev/sde',
138-
'/dev/sdc'],
139-
'driver': 'lpfc',
140-
'firmware': '11.4.415.5',
141-
'functions': ['0102:60:00.0', '0102:60:00.1'],
142-
'interfaces': ['host11', 'host13'],
143-
'is_root_disk': False,
144-
'mpath_disks': [],
145-
'mpath_wwids': [],
146-
'pci_root': '0102:60:00',
147-
'slot': 'U78CD.001.FZHV738-P1-C2'},
148-
{'adapter_description': 'QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA',
149-
'adapter_id': '1077:2532:1014:f304',
150-
'adapter_type': 'fc',
151-
'class': 'scsi_host',
152-
'disks': ['/dev/sdbu',
153-
'/dev/sdbt',
154-
'/dev/sdbv',
155-
'/dev/sdbq',
156-
'/dev/sdar',
157-
'/dev/sdas',
158-
'/dev/sdz',
159-
'/dev/sdj'],
160-
'driver': 'qla2xxx',
161-
'firmware': '8.07.00',
162-
'functions': ['0202:60:00.0', '0202:60:00.1'],
163-
'interfaces': ['host17', 'host15'],
164-
'is_root_disk': False,
165-
'mpath_disks': ['/dev/mapper/mpathac',
166-
'/dev/mapper/mpathae'],
167-
'mpath_wwids': ['360050768028383d7f0000000000000a5',
168-
'360050768028383d7f000000000000033'],
169-
'pci_root': '0202:60:00',
170-
'slot': 'U78CD.001.FZHV738-P2-C2'}]
171-
172-
173-
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --create-config --additional-params "peer_ip=131.1.1.89 peer_interfaces=eth1,eth2"
174-
peer_ip=131.1.1.89 peer_interfaces=eth1,eth2
175-
['peer_ip=131.1.1.89', 'peer_interfaces=eth1,eth2']
176-
--run-suite host_io_fc_0102_60_00_fvt,host_io_fc_0202_60_00_fvt --input-file io_input.txt
177-
178-
179-
# cat io_input.txt
180-
[io_fc_0102_60_00_fvt]
181-
disks = ""
182-
wwids = ""
183-
pci_device = "0102:60:00.0"
184-
MODULES = "lpfc"
185-
peer_ip = "131.1.1.89"
186-
peer_interfaces = "eth1,eth2"
187-
188-
[io_fc_0202_60_00_fvt]
189-
disk = "/dev/mapper/mpathac"
190-
disks = "/dev/mapper/mpathac,/dev/mapper/mpathae"
191-
wwids = "360050768028383d7f0000000000000a5,360050768028383d7f000000000000033"
192-
pci_device = "0202:60:00.0"
193-
MODULES = "qla2xxx"
194-
peer_ip = "131.1.1.89"
195-
peer_interfaces = "eth1,eth2"
196-
197-
198-
B. For virtual devices
199-
++++++++++++++++++++++
200-
201-
# ./pci_info.py --vnic env4 --show-info [ or ] ./pci_info.py --vnic --show-info
202-
203-
[{'adapter_type': 'vnic',
204-
'driver': 'ibmvnic',
205-
'interfaces': ['env3', 'env4', 'env8'],
206-
'macaddress': 'ba:70:c4:97:1a:04',
207-
'public_interface_ip': '9.xxxxx'}]
208-
209-
210-
# ./pci_info.py --vnic env4 --create-config
211-
04:42:56 INFO : python avocado-setup.py --run-suite host_io_vnic_stress_fvt --input-file io_input.txt
212-
213-
214-
215-
[io_vnic_stress_fvt]
216-
host_interfaces = "env3 env4"
217-
interfaces = "env3 env4"
218-
bond_interfaces = "env3 env4"
219-
htx_host_interfaces = "env3 env4"
220-
host_public_ip = "9xxxx"
221-
interface = "env3"
222-
module = "ibmvnic"
223-
macaddress = "ba:70:c4:97:1a:03"
224-
225-
226-
# ./pci_info.py --vnic env4 --additional-params device_ip=192.168.100.184,peer_ip=192.168.100.104,netmask=255.255.255.0,host_ip=192.168.100.184,netmasks=255.255.255.0,peer_ips="192.168.100.104 192.168.110.104",peer_interfaces="env4 env5",hmc_username=hscroot,hmc_pwd=abcd --create-config
92+
93+
EXAMPLE:
94+
--------
95+
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --show-info
96+
97+
[{'adapter_description': 'Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter',
98+
'adapter_id': '10df:e300:1014:0615',
99+
'adapter_type': 'fc',
100+
'class': 'scsi_host',
101+
'disks': ['/dev/sdaa',
102+
'/dev/sdab',
103+
'/dev/sdx',
104+
'/dev/sdy',
105+
'/dev/sdg',
106+
'/dev/sdd',
107+
'/dev/sde',
108+
'/dev/sdc'],
109+
'driver': 'lpfc',
110+
'firmware': '11.4.415.5',
111+
'functions': ['0102:60:00.0', '0102:60:00.1'],
112+
'interfaces': ['host11', 'host13'],
113+
'is_root_disk': False,
114+
'mpath_disks': [],
115+
'mpath_wwids': [],
116+
'pci_root': '0102:60:00',
117+
'slot': 'U78CD.001.FZHV738-P1-C2'},
118+
{'adapter_description': 'QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA',
119+
'adapter_id': '1077:2532:1014:f304',
120+
'adapter_type': 'fc',
121+
'class': 'scsi_host',
122+
'disks': ['/dev/sdbu',
123+
'/dev/sdbt',
124+
'/dev/sdbv',
125+
'/dev/sdbq',
126+
'/dev/sdar',
127+
'/dev/sdas',
128+
'/dev/sdz',
129+
'/dev/sdj'],
130+
'driver': 'qla2xxx',
131+
'firmware': '8.07.00',
132+
'functions': ['0202:60:00.0', '0202:60:00.1'],
133+
'interfaces': ['host17', 'host15'],
134+
'is_root_disk': False,
135+
'mpath_disks': ['/dev/mapper/mpathac',
136+
'/dev/mapper/mpathae'],
137+
'mpath_wwids': ['360050768028383d7f0000000000000a5',
138+
'360050768028383d7f000000000000033'],
139+
'pci_root': '0202:60:00',
140+
'slot': 'U78CD.001.FZHV738-P2-C2'}]
141+
142+
143+
# ./pci_info.py --pci-address "0202:60:00,0102:60:00" --create-config --additional-params "peer_ip=131.1.1.89 peer_interfaces=eth1,eth2"
144+
peer_ip=131.1.1.89 peer_interfaces=eth1,eth2
145+
['peer_ip=131.1.1.89', 'peer_interfaces=eth1,eth2']
146+
--run-suite host_io_fc_0102_60_00_fvt,host_io_fc_0202_60_00_fvt --input-file io_input.txt
147+
227148

228149
# cat io_input.txt
229-
[io_vnic_stress_fvt]
230-
host_interfaces = "env3 env4"
231-
interfaces = "env3 env4"
232-
bond_interfaces = "env3 env4"
233-
htx_host_interfaces = "env3 env4"
234-
host_public_ip = "9.xxxxx"
235-
interface = "env3"
236-
module = "ibmvnic"
237-
macaddress = "ba:70:c4:97:1a:04"
238-
hmc_pwd = abcd
239-
hmc_username = hscroot
240-
mac_id = "025dc3a7d703"
241-
host_ip = 192.168.100.184
242-
netmask = 255.255.255.0
243-
netmasks = 255.255.255.0
244-
peer_ips = 192.168.100.104 192.168.110.104
245-
host_ips = "110.10.10.212 111.10.10.212"
246-
peer_interfaces = env4 env5
150+
[io_fc_0102_60_00_fvt]
151+
disks = ""
152+
wwids = ""
153+
pci_device = "0102:60:00.0"
154+
MODULES = "lpfc"
155+
peer_ip = "131.1.1.89"
156+
peer_interfaces = "eth1,eth2"
157+
158+
[io_fc_0202_60_00_fvt]
159+
disk = "/dev/mapper/mpathac"
160+
disks = "/dev/mapper/mpathac,/dev/mapper/mpathae"
161+
wwids = "360050768028383d7f0000000000000a5,360050768028383d7f000000000000033"
162+
pci_device = "0202:60:00.0"
163+
MODULES = "qla2xxx"
164+
peer_ip = "131.1.1.89"
165+
peer_interfaces = "eth1,eth2"

config/wrapper/pci_input.conf

-30
Original file line numberDiff line numberDiff line change
@@ -100,36 +100,6 @@ pci_device,functions:0
100100
pci_devices = functions:all
101101
module = driver
102102

103-
[io_vnic_fvt]
104-
host_interfaces = interfaces:all
105-
interfaces = interfaces:all
106-
bond_interfaces = interfaces:all
107-
htx_host_interfaces = interfaces:all
108-
host_public_ip = public_interface_ip
109-
interface = interfaces:0
110-
module = driver
111-
macaddress = macaddress
112-
113-
[io_veth_fvt]
114-
host_interfaces = interfaces:all
115-
interfaces = interfaces:all
116-
bond_interfaces = interfaces:all
117-
htx_host_interfaces = interfaces:all
118-
host_public_ip = public_interface_ip
119-
interface = interfaces:0
120-
module = driver
121-
macaddress = macaddress
122-
123-
[io_hnv_fvt]
124-
host_interfaces = interfaces:all
125-
interfaces = interfaces:all
126-
bond_interfaces = interfaces:all
127-
htx_host_interfaces = interfaces:all
128-
host_public_ip = public_interface_ip
129-
interface = interfaces:0
130-
module = driver
131-
macaddress = macaddress
132-
133103
[io_ib_fvt]
134104
interface = interfaces:0
135105
interfaces = interfaces:all

0 commit comments

Comments
 (0)