/// <summary> /// Creates a compute node user for use in Scenario tests. /// </summary> public static void CreateComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName) { BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); NewComputeNodeUserParameters parameters = new NewComputeNodeUserParameters(context, poolId, computeNodeId, null) { ComputeNodeUserName = computeNodeUserName, Password = "******", }; client.CreateComputeNodeUser(parameters); }
protected override void ProcessRecord() { NewComputeNodeUserParameters parameters = new NewComputeNodeUserParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.ComputeNode, this.AdditionalBehaviors) { ComputeNodeUserName = this.Name, Password = this.Password, ExpiryTime = this.ExpiryTime, IsAdmin = this.IsAdmin.IsPresent }; BatchClient.CreateComputeNodeUser(parameters); }
public override void ExecuteCmdlet() { NewComputeNodeUserParameters parameters = new NewComputeNodeUserParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.ComputeNode, this.AdditionalBehaviors) { ComputeNodeUserName = this.Name, Password = this.Password?.ConvertToString(), ExpiryTime = this.ExpiryTime, IsAdmin = this.IsAdmin.IsPresent }; BatchClient.CreateComputeNodeUser(parameters); }
public override void ExecuteCmdlet() { NewComputeNodeUserParameters parameters = new NewComputeNodeUserParameters(this.BatchContext, this.PoolId, this.ComputeNodeId, this.ComputeNode, this.AdditionalBehaviors) { ComputeNodeUserName = this.Name, #pragma warning disable 0618 Password = this.Password, #pragma warning restore 0618 ExpiryTime = this.ExpiryTime, IsAdmin = this.IsAdmin.IsPresent }; BatchClient.CreateComputeNodeUser(parameters); }
/// <summary> /// Creates a compute node user for use in Scenario tests. /// </summary> public static void CreateComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName) { RequestInterceptor interceptor = CreateHttpRecordingInterceptor(); BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor }; BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient); NewComputeNodeUserParameters parameters = new NewComputeNodeUserParameters(context, poolId, computeNodeId, null, behaviors) { ComputeNodeUserName = computeNodeUserName, Password = "******", }; client.CreateComputeNodeUser(parameters); }