1
0
mirror of https://github.com/rancher/os.git synced 2025-09-03 07:44:21 +00:00

Use a subdirectory of the state partition

This commit is contained in:
Darren Shepherd
2015-12-19 22:34:07 -07:00
parent 9c6b16928a
commit 808fbdbe1f
7 changed files with 76 additions and 13 deletions

View File

@@ -85,3 +85,19 @@ def wait_for_ssh(qemu, ssh_command=['./scripts/ssh', '--qemu'], command=['docker
print('\nWaiting for ssh and docker... ' + str(i))
time.sleep(1)
assert qemu.returncode is None
class SSH:
def __init__(self, qemu, ssh_command=['./scripts/ssh', '--qemu']):
self._qemu = qemu
self._ssh_command = ssh_command
self._waited = False
def check_call(self, *args, **kw):
if not self._waited:
wait_for_ssh(self._qemu, ssh_command=self._ssh_command)
self._waited = True
kw['stderr'] = subprocess.STDOUT
kw['universal_newlines'] = True
return subprocess.check_call(self._ssh_command + list(args), **kw)