Skip to content

Commit

Permalink
update PR of Ronan to use -sr option
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed Aug 2, 2023
1 parent 8bd3916 commit 3264e70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
6 changes: 0 additions & 6 deletions lib/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,3 @@ def eject_host(self, host):
wait_for_not(lambda: host.uuid in self.hosts_uuids(), f"Wait for host {host} to be ejected of pool {master}.")
self.hosts = [h for h in self.hosts if h.uuid != host.uuid]
wait_for(host.is_enabled, f"Wait for host {host} to restart in its own pool.", timeout_secs=600)

def get_default_sr(self):
return self.master.xe('pool-param-get', {'uuid': self.uuid, 'param-name': 'default-SR'})

def set_default_sr(self, sr_uuid):
self.master.xe('pool-param-set', {'uuid': self.uuid, 'default-SR': sr_uuid})
9 changes: 1 addition & 8 deletions tests/storage/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,4 @@ def get_xapi_session():
}))

def run_quicktest_on_sr(sr):
old_sr_uuid = sr.pool.get_default_sr()
if sr.uuid != old_sr_uuid:
sr.pool.set_default_sr(sr.uuid)
try:
sr.pool.master.ssh(['/opt/xensource/debug/quicktest', '-default-sr'])
finally:
if sr.uuid != old_sr_uuid:
sr.pool.set_default_sr(old_sr_uuid)
sr.pool.master.ssh(['/opt/xensource/debug/quicktest', '-sr', sr.uuid])

0 comments on commit 3264e70

Please sign in to comment.