mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	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:
		@@ -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
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user