@@ -309,14 +309,21 @@ def host_no_ipv6(host):
309
309
if is_ipv6 (host .hostname_or_ip ):
310
310
pytest .skip (f"This test requires an IPv4 XCP-ng" )
311
311
312
+ @pytest .fixture (scope = "session" )
313
+ def shared_sr (host ):
314
+ sr = host .pool .first_shared_sr ()
315
+ assert sr , "No shared SR available on hosts"
316
+ logging .info (">> Shared SR on host present: {} of type {}" .format (sr .uuid , sr .get_type ()))
317
+ yield sr
318
+
312
319
@pytest .fixture (scope = 'session' )
313
320
def local_sr_on_hostA1 (hostA1 ):
314
321
""" A local SR on the pool's master. """
315
322
srs = hostA1 .local_vm_srs ()
316
323
assert len (srs ) > 0 , "a local SR is required on the pool's master"
317
324
# use the first local SR found
318
325
sr = srs [0 ]
319
- logging .info (">> local SR on hostA1 present : %s" % sr .uuid )
326
+ logging .info (">> local SR on hostA1 present: {} of type {}" . format ( sr .uuid , sr . get_type ()) )
320
327
yield sr
321
328
322
329
@pytest .fixture (scope = 'session' )
@@ -326,7 +333,7 @@ def local_sr_on_hostA2(hostA2):
326
333
assert len (srs ) > 0 , "a local SR is required on the pool's second host"
327
334
# use the first local SR found
328
335
sr = srs [0 ]
329
- logging .info (">> local SR on hostA2 present : %s" % sr .uuid )
336
+ logging .info (">> local SR on hostA2 present: {} of type {}" . format ( sr .uuid , sr . get_type ()) )
330
337
yield sr
331
338
332
339
@pytest .fixture (scope = 'session' )
@@ -336,7 +343,7 @@ def local_sr_on_hostB1(hostB1):
336
343
assert len (srs ) > 0 , "a local SR is required on the second pool's master"
337
344
# use the first local SR found
338
345
sr = srs [0 ]
339
- logging .info (">> local SR on hostB1 present : %s" % sr .uuid )
346
+ logging .info (">> local SR on hostB1 present: {} of type {}" . format ( sr .uuid , sr . get_type ()) )
340
347
yield sr
341
348
342
349
@pytest .fixture (scope = 'session' )
0 commit comments