@@ -396,41 +396,6 @@ def sr_disk_4k(pytestconfig, host):
396
396
f"4KiB block device { disk } must be available for use on master host"
397
397
yield disk
398
398
399
- @pytest .fixture (scope = 'session' )
400
- def sr_disk_for_all_hosts (pytestconfig , request , host ):
401
- """
402
- Disk DEVICE NAME available on all hosts of FIRST POOL.
403
-
404
- Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
405
- return requested device (abort if not present).
406
- """
407
- disks = pytestconfig .getoption ("sr_disk" )
408
- if len (disks ) != 1 :
409
- pytest .fail ("This test requires exactly one --sr-disk parameter" )
410
- disk = disks [0 ]
411
- master_disks = host .available_disks ()
412
- assert len (master_disks ) > 0 , "a free disk device is required on the master host"
413
-
414
- if disk != "auto" :
415
- assert disk in master_disks , \
416
- f"disk or block device { disk } is either not present or already used on master host"
417
- master_disks = [disk ]
418
-
419
- candidates = list (master_disks )
420
- for h in host .pool .hosts [1 :]:
421
- other_disks = h .available_disks ()
422
- candidates = [d for d in candidates if d in other_disks ]
423
-
424
- if disk == "auto" :
425
- assert len (candidates ) > 0 , \
426
- f"a free disk device is required on all pool members. Pool master has: { ' ' .join (master_disks )} ."
427
- logging .info (f">> Found free disk device(s) on all pool hosts: { ' ' .join (candidates )} . Using { candidates [0 ]} ." )
428
- else :
429
- assert len (candidates ) > 0 , \
430
- f"disk or block device { disk } was not found to be present and free on all hosts"
431
- logging .info (f">> Disk or block device { disk } is present and free on all pool members" )
432
- yield candidates [0 ]
433
-
434
399
@pytest .fixture (scope = 'session' )
435
400
def pool_with_unused_disk (host : Host , unused_disks : dict [Host , list [DiskDevName ]]) -> Pool :
436
401
for h in host .pool .hosts :
0 commit comments