Skip to content

Commit 2b0c23f

Browse files
committed
Host: rename main_sr to main_sr_uuid
Other methods to get SRs return `SR` objects, this was inconsistent. Signed-off-by: Yann Dirson <[email protected]>
1 parent e350c94 commit 2b0c23f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def imported_vm(host, vm_ref):
321321
name = vm_orig.name()
322322
logging.info(">> Reuse VM %s (%s) on host %s" % (vm_ref, name, host))
323323
else:
324-
vm_orig = host.import_vm(vm_ref, host.main_sr(), use_cache=CACHE_IMPORTED_VM)
324+
vm_orig = host.import_vm(vm_ref, host.main_sr_uuid(), use_cache=CACHE_IMPORTED_VM)
325325

326326
if CACHE_IMPORTED_VM:
327327
# Clone the VM before running tests, so that the original VM remains untouched

lib/host.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def local_vm_srs(self):
460460
srs.append(sr)
461461
return srs
462462

463-
def main_sr(self):
463+
def main_sr_uuid(self):
464464
""" Main SR is either the default SR, or the first local SR, depending on data.py's DEFAULT_SR. """
465465
try:
466466
from data import DEFAULT_SR

0 commit comments

Comments
 (0)