@@ -328,6 +328,12 @@ def local_sr_on_hostB1(hostB1):
328
328
329
329
@pytest .fixture (scope = 'session' )
330
330
def sr_disk (pytestconfig , host ):
331
+ """
332
+ Disk DEVICE NAME available on FIRST POOL MASTER.
333
+
334
+ Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
335
+ return requested device (abort if not present).
336
+ """
331
337
disks = pytestconfig .getoption ("sr_disk" )
332
338
if len (disks ) != 1 :
333
339
pytest .fail ("This test requires exactly one --sr-disk parameter" )
@@ -346,6 +352,12 @@ def sr_disk(pytestconfig, host):
346
352
347
353
@pytest .fixture (scope = 'session' )
348
354
def sr_disk_4k (pytestconfig , host ):
355
+ """
356
+ Disk DEVICE NAME with 4KB blocksize available on FIRST POOL MASTER.
357
+
358
+ Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
359
+ return requested device (abort if not present).
360
+ """
349
361
disks = pytestconfig .getoption ("sr_disk_4k" )
350
362
if len (disks ) != 1 :
351
363
pytest .fail ("This test requires exactly one --sr-disks-4k parameter" )
@@ -364,6 +376,12 @@ def sr_disk_4k(pytestconfig, host):
364
376
365
377
@pytest .fixture (scope = 'session' )
366
378
def sr_disk_for_all_hosts (pytestconfig , request , host ):
379
+ """
380
+ Disk DEVICE NAME available on all hosts of FIRST POOL.
381
+
382
+ Abort if not exactly one --sr_disk. If --sr_disk=auto take any, else
383
+ return requested device (abort if not present).
384
+ """
367
385
disks = pytestconfig .getoption ("sr_disk" )
368
386
if len (disks ) != 1 :
369
387
pytest .fail ("This test requires exactly one --sr-disk parameter" )
@@ -393,6 +411,14 @@ def sr_disk_for_all_hosts(pytestconfig, request, host):
393
411
394
412
@pytest .fixture (scope = 'session' )
395
413
def sr_disks_for_all_hosts (pytestconfig , request , host ):
414
+ """
415
+ List of disk DEVICE NAMES available on all hosts of FIRST POOL.
416
+
417
+ Abort if no --sr_disk. If one --sr_disk=auto given, return names of all
418
+ "available" disk device occuring on all hosts in the pool and
419
+ IGNORE ALL OTHER --sr_disk; else return all devices on commandline (abort
420
+ if any is not present or not "available").
421
+ """
396
422
disks = pytestconfig .getoption ("sr_disk" )
397
423
assert len (disks ) > 0 , "This test requires at least one --sr-disk parameter"
398
424
# Fetch available disks on the master host
0 commit comments