Actually have a test case that will get to the permission denied phase
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15543 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
4bde0a0ded
commit
0344b08ba1
@ -58,4 +58,22 @@ Function Connect-xCAT {
|
||||
$script:xcatstream = $script:xcatconnection.GetStream()
|
||||
$script:securexCATStream = New-Object System.Net.Security.SSLStream($script:xcatstream,$false,$script:verifycallback)
|
||||
$script:securexCATStream.AuthenticateAsClient($mgtServerAltName)
|
||||
$script:xcatwriter = New-Object System.IO.StreamWriter($script:securexCATStream)
|
||||
$script:xcatreader = New-Object System.IO.StreamReader($script:securexCATStream)
|
||||
}
|
||||
|
||||
Function Get-Power {
|
||||
Param(
|
||||
$nodeRange
|
||||
)
|
||||
$data = "<xcatrequest>`n`t<command>rpower</command>`n`t<arg>stat</arg>`n`t<noderange>$nodeRange</noderange>`n</xcatrequest>`n"
|
||||
$script:xcatwriter.WriteLine($data)
|
||||
$script:xcatwriter.Flush()
|
||||
$response=""
|
||||
$lastline=""
|
||||
while (! $lastline.Contains("</xcatresponse>")) {
|
||||
$lastline = $script:xcatreader.ReadLine()
|
||||
$response = $response + $lastline
|
||||
}
|
||||
write-host $response
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user