Resolves minor functional issues with WindowsClient
* Added steps to bring Windows disks out of read-only mode when formatting * Added missing powershell keyword to create_directory Change-Id: Icbe46a54216743788131bd8243e1b1e16da49ba0
This commit is contained in:
parent
b49a2d4801
commit
8ee44349fd
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user