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/branches/2.8@15644 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2013-03-25 13:57:16 +00:00
parent 6ef1671e23
commit 354269134a

View File

@ -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
}