Merge "Resolves minor functional issues with WindowsClient"

This commit is contained in:
Jenkins 2014-05-19 21:30:01 +00:00 committed by Gerrit Code Review
commit 33910826ad

View File

@ -294,8 +294,9 @@ class WindowsClient(RemoteInstanceClient):
@type path: string
"""
command = 'New-Item -ItemType directory -Path {path}'.format(
path=path)
command = (
'powershell New-Item -ItemType directory '
'-Path {path}'.format(path=path))
output = self.client.execute_command(command)
return output.std_out if output.std_out else None
@ -363,11 +364,14 @@ class WindowsClient(RemoteInstanceClient):
@return: Output of command execution
@rtype: string
"""
command = (
'powershell Set-Disk -Number {disk} '
'-IsOffline $false').format(disk=disk)
self.client.execute_command(command)
command = (
'powershell Set-Disk -Number {disk} '
'-IsReadOnly $false').format(disk=disk)
self.client.execute_command(command)
command = ('powershell Clear-Disk -Number {disk} '
'-RemoveData -Confirm:$false').format(disk=disk)
self.client.execute_command(command)