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