C# 클래스 Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ScenarioTestHelpers

Helper methods for the Batch cmdlet scenario tests
파일 보기 프로젝트 열기: Azure/azure-powershell 1 사용 예제들

공개 메소드들

메소드 설명
AddTestCertificate ( BatchController controller, BatchAccountContext context, string filePath ) : string

Adds a test certificate for use in Scenario tests. Returns the thumbprint of the cert.

CleanupTestAccount ( BatchController controller, string resourceGroupName, string accountName ) : void

Cleans up an account and resource group used in a Scenario test.

CreateApplicationPackage ( BatchController controller, BatchAccountContext context, string applicationId, string version, string filePath ) : Microsoft.Azure.Management.Batch.Models.ApplicationPackage

Uploads an application package to Storage

CreateComputeNodeUser ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName ) : void

Creates a compute node user for use in Scenario tests.

CreateMpiPoolIfNotExists ( BatchController controller, BatchAccountContext context, int targetDedicated = 3 ) : void

Creates an MPI pool.

CreateTestAccountAndResourceGroup ( BatchController controller, string resourceGroupName, string accountName, string location ) : BatchAccountContext

Creates an account and resource group for use with the Scenario tests

CreateTestJob ( BatchController controller, BatchAccountContext context, string jobId, string poolId = SharedPool ) : void

Creates a test job for use in Scenario tests.

CreateTestJobSchedule ( BatchController controller, BatchAccountContext context, string jobScheduleId, System.TimeSpan recurrenceInterval ) : void

Creates a test job schedule for use in Scenario tests.

CreateTestPool ( BatchController controller, BatchAccountContext context, string poolId, int targetDedicated, CertificateReference certReference = null, StartTask startTask = null ) : void

Creates a test pool for use in Scenario tests.

CreateTestTask ( BatchController controller, BatchAccountContext context, string jobId, string taskId, string cmdLine = "cmd /c dir /s", int numInstances ) : void

Creates a test task for use in Scenario tests.

DeleteApplication ( BatchController controller, BatchAccountContext context, string applicationId ) : void

Deletes an application used in a Scenario test.

DeleteApplicationPackage ( BatchController controller, BatchAccountContext context, string applicationId, string version ) : void

Deletes an application package used in a Scenario test.

DeleteComputeNodeUser ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName ) : void

Deletes a compute node user for use in Scenario tests.

DeleteJob ( BatchController controller, BatchAccountContext context, string jobId ) : void

Deletes a job used in a Scenario test.

DeleteJobSchedule ( BatchController controller, BatchAccountContext context, string jobScheduleId ) : void

Deletes a job schedule used in a Scenario test.

DeletePool ( BatchController controller, BatchAccountContext context, string poolId ) : void

Deletes a pool used in a Scenario test.

DeleteTestCertificate ( BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint ) : void

Deletes a certificate.

DisableAutoScale ( BatchController controller, BatchAccountContext context, string poolId ) : void
EnableAutoScale ( BatchController controller, BatchAccountContext context, string poolId ) : void
GetComputeNodeId ( BatchController controller, BatchAccountContext context, string poolId, int index ) : string

Gets the id of a compute node in the specified pool

GetPoolCount ( BatchController controller, BatchAccountContext context ) : int

Gets the number of pools under the specified account

GetPoolCurrentDedicated ( BatchController controller, BatchAccountContext context, string poolId ) : int

Gets the CurrentDedicated count from a pool

GetTaskComputeNodeId ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : string

Gets the id of the compute node that the specified task completed on. Returns null if the task isn't complete.

ResizePool ( BatchController controller, BatchAccountContext context, string poolId, int targetDedicated ) : void
TerminateJob ( BatchController controller, BatchAccountContext context, string jobId ) : void

Terminates a job

WaitForCertificateToFailDeletion ( BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint ) : void

Deletes a certificate.

WaitForIdleComputeNode ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId ) : void

Waits for a compute node to get to the idle state

WaitForJobCompletion ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : PSCloudJob

Waits for the job to complete

WaitForOSVersionChange ( BatchController controller, BatchAccountContext context, string poolId ) : string
WaitForRecentJob ( BatchController controller, BatchAccountContext context, string jobScheduleId, string previousJob = null ) : string

Waits for a recent job on a job schedule and returns its id. If a previous job is specified, this method waits until a new job is created.

WaitForSteadyPoolAllocation ( BatchController controller, BatchAccountContext context, string poolId ) : void
WaitForTaskCompletion ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : void

Waits for the specified task to complete

비공개 메소드들

메소드 설명
Sleep ( int milliseconds ) : void

Sleep method used for Scenario Tests. Only sleep when recording.

메소드 상세

AddTestCertificate() 공개 정적인 메소드

Adds a test certificate for use in Scenario tests. Returns the thumbprint of the cert.
public static AddTestCertificate ( BatchController controller, BatchAccountContext context, string filePath ) : string
controller BatchController
context BatchAccountContext
filePath string
리턴 string

CleanupTestAccount() 공개 정적인 메소드

Cleans up an account and resource group used in a Scenario test.
public static CleanupTestAccount ( BatchController controller, string resourceGroupName, string accountName ) : void
controller BatchController
resourceGroupName string
accountName string
리턴 void

CreateApplicationPackage() 공개 정적인 메소드

Uploads an application package to Storage
public static CreateApplicationPackage ( BatchController controller, BatchAccountContext context, string applicationId, string version, string filePath ) : Microsoft.Azure.Management.Batch.Models.ApplicationPackage
controller BatchController
context BatchAccountContext
applicationId string
version string
filePath string
리턴 Microsoft.Azure.Management.Batch.Models.ApplicationPackage

CreateComputeNodeUser() 공개 정적인 메소드

Creates a compute node user for use in Scenario tests.
public static CreateComputeNodeUser ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName ) : void
controller BatchController
context BatchAccountContext
poolId string
computeNodeId string
computeNodeUserName string
리턴 void

CreateMpiPoolIfNotExists() 공개 정적인 메소드

Creates an MPI pool.
public static CreateMpiPoolIfNotExists ( BatchController controller, BatchAccountContext context, int targetDedicated = 3 ) : void
controller BatchController
context BatchAccountContext
targetDedicated int
리턴 void

CreateTestAccountAndResourceGroup() 공개 정적인 메소드

Creates an account and resource group for use with the Scenario tests
public static CreateTestAccountAndResourceGroup ( BatchController controller, string resourceGroupName, string accountName, string location ) : BatchAccountContext
controller BatchController
resourceGroupName string
accountName string
location string
리턴 BatchAccountContext

CreateTestJob() 공개 정적인 메소드

Creates a test job for use in Scenario tests.
public static CreateTestJob ( BatchController controller, BatchAccountContext context, string jobId, string poolId = SharedPool ) : void
controller BatchController
context BatchAccountContext
jobId string
poolId string
리턴 void

CreateTestJobSchedule() 공개 정적인 메소드

Creates a test job schedule for use in Scenario tests.
public static CreateTestJobSchedule ( BatchController controller, BatchAccountContext context, string jobScheduleId, System.TimeSpan recurrenceInterval ) : void
controller BatchController
context BatchAccountContext
jobScheduleId string
recurrenceInterval System.TimeSpan
리턴 void

CreateTestPool() 공개 정적인 메소드

Creates a test pool for use in Scenario tests.
public static CreateTestPool ( BatchController controller, BatchAccountContext context, string poolId, int targetDedicated, CertificateReference certReference = null, StartTask startTask = null ) : void
controller BatchController
context BatchAccountContext
poolId string
targetDedicated int
certReference CertificateReference
startTask StartTask
리턴 void

CreateTestTask() 공개 정적인 메소드

Creates a test task for use in Scenario tests.
public static CreateTestTask ( BatchController controller, BatchAccountContext context, string jobId, string taskId, string cmdLine = "cmd /c dir /s", int numInstances ) : void
controller BatchController
context BatchAccountContext
jobId string
taskId string
cmdLine string
numInstances int
리턴 void

DeleteApplication() 공개 정적인 메소드

Deletes an application used in a Scenario test.
public static DeleteApplication ( BatchController controller, BatchAccountContext context, string applicationId ) : void
controller BatchController
context BatchAccountContext
applicationId string
리턴 void

DeleteApplicationPackage() 공개 정적인 메소드

Deletes an application package used in a Scenario test.
public static DeleteApplicationPackage ( BatchController controller, BatchAccountContext context, string applicationId, string version ) : void
controller BatchController
context BatchAccountContext
applicationId string
version string
리턴 void

DeleteComputeNodeUser() 공개 정적인 메소드

Deletes a compute node user for use in Scenario tests.
public static DeleteComputeNodeUser ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName ) : void
controller BatchController
context BatchAccountContext
poolId string
computeNodeId string
computeNodeUserName string
리턴 void

DeleteJob() 공개 정적인 메소드

Deletes a job used in a Scenario test.
public static DeleteJob ( BatchController controller, BatchAccountContext context, string jobId ) : void
controller BatchController
context BatchAccountContext
jobId string
리턴 void

DeleteJobSchedule() 공개 정적인 메소드

Deletes a job schedule used in a Scenario test.
public static DeleteJobSchedule ( BatchController controller, BatchAccountContext context, string jobScheduleId ) : void
controller BatchController
context BatchAccountContext
jobScheduleId string
리턴 void

DeletePool() 공개 정적인 메소드

Deletes a pool used in a Scenario test.
public static DeletePool ( BatchController controller, BatchAccountContext context, string poolId ) : void
controller BatchController
context BatchAccountContext
poolId string
리턴 void

DeleteTestCertificate() 공개 정적인 메소드

Deletes a certificate.
public static DeleteTestCertificate ( BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint ) : void
controller BatchController
context BatchAccountContext
thumbprintAlgorithm string
thumbprint string
리턴 void

DisableAutoScale() 공개 정적인 메소드

public static DisableAutoScale ( BatchController controller, BatchAccountContext context, string poolId ) : void
controller BatchController
context BatchAccountContext
poolId string
리턴 void

EnableAutoScale() 공개 정적인 메소드

public static EnableAutoScale ( BatchController controller, BatchAccountContext context, string poolId ) : void
controller BatchController
context BatchAccountContext
poolId string
리턴 void

GetComputeNodeId() 공개 정적인 메소드

Gets the id of a compute node in the specified pool
public static GetComputeNodeId ( BatchController controller, BatchAccountContext context, string poolId, int index ) : string
controller BatchController
context BatchAccountContext
poolId string
index int
리턴 string

GetPoolCount() 공개 정적인 메소드

Gets the number of pools under the specified account
public static GetPoolCount ( BatchController controller, BatchAccountContext context ) : int
controller BatchController
context BatchAccountContext
리턴 int

GetPoolCurrentDedicated() 공개 정적인 메소드

Gets the CurrentDedicated count from a pool
public static GetPoolCurrentDedicated ( BatchController controller, BatchAccountContext context, string poolId ) : int
controller BatchController
context BatchAccountContext
poolId string
리턴 int

GetTaskComputeNodeId() 공개 정적인 메소드

Gets the id of the compute node that the specified task completed on. Returns null if the task isn't complete.
public static GetTaskComputeNodeId ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : string
controller BatchController
context BatchAccountContext
jobId string
taskId string
리턴 string

ResizePool() 공개 정적인 메소드

public static ResizePool ( BatchController controller, BatchAccountContext context, string poolId, int targetDedicated ) : void
controller BatchController
context BatchAccountContext
poolId string
targetDedicated int
리턴 void

TerminateJob() 공개 정적인 메소드

Terminates a job
public static TerminateJob ( BatchController controller, BatchAccountContext context, string jobId ) : void
controller BatchController
context BatchAccountContext
jobId string
리턴 void

WaitForCertificateToFailDeletion() 공개 정적인 메소드

Deletes a certificate.
public static WaitForCertificateToFailDeletion ( BatchController controller, BatchAccountContext context, string thumbprintAlgorithm, string thumbprint ) : void
controller BatchController
context BatchAccountContext
thumbprintAlgorithm string
thumbprint string
리턴 void

WaitForIdleComputeNode() 공개 정적인 메소드

Waits for a compute node to get to the idle state
public static WaitForIdleComputeNode ( BatchController controller, BatchAccountContext context, string poolId, string computeNodeId ) : void
controller BatchController
context BatchAccountContext
poolId string
computeNodeId string
리턴 void

WaitForJobCompletion() 공개 정적인 메소드

Waits for the job to complete
public static WaitForJobCompletion ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : PSCloudJob
controller BatchController
context BatchAccountContext
jobId string
taskId string
리턴 PSCloudJob

WaitForOSVersionChange() 공개 정적인 메소드

public static WaitForOSVersionChange ( BatchController controller, BatchAccountContext context, string poolId ) : string
controller BatchController
context BatchAccountContext
poolId string
리턴 string

WaitForRecentJob() 공개 정적인 메소드

Waits for a recent job on a job schedule and returns its id. If a previous job is specified, this method waits until a new job is created.
public static WaitForRecentJob ( BatchController controller, BatchAccountContext context, string jobScheduleId, string previousJob = null ) : string
controller BatchController
context BatchAccountContext
jobScheduleId string
previousJob string
리턴 string

WaitForSteadyPoolAllocation() 공개 정적인 메소드

public static WaitForSteadyPoolAllocation ( BatchController controller, BatchAccountContext context, string poolId ) : void
controller BatchController
context BatchAccountContext
poolId string
리턴 void

WaitForTaskCompletion() 공개 정적인 메소드

Waits for the specified task to complete
public static WaitForTaskCompletion ( BatchController controller, BatchAccountContext context, string jobId, string taskId ) : void
controller BatchController
context BatchAccountContext
jobId string
taskId string
리턴 void