Exemplo n.º 1
0
        /// <summary>
        /// Deletes a compute node user for use in Scenario tests.
        /// </summary>
        public static void DeleteComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName)
        {
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(context, poolId, computeNodeId, computeNodeUserName);

            client.DeleteComputeNodeUser(parameters);
        }
        protected override void ExecuteCmdletImpl()
        {
            ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId,
                                                                                                   this.Name, this.AdditionalBehaviors);

            ConfirmAction(
                Resources.RemoveComputeNodeUser,
                this.Name,
                () => BatchClient.DeleteComputeNodeUser(parameters));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Deletes a compute node user for use in Scenario tests.
        /// </summary>
        public static void DeleteComputeNodeUser(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);

            ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(context, poolId, computeNodeId, computeNodeUserName, behaviors);

            client.DeleteComputeNodeUser(parameters);
        }
        protected override void ProcessRecord()
        {
            ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId,
                                                                                                   this.Name, this.AdditionalBehaviors);

            ConfirmAction(
                Force.IsPresent,
                string.Format(Resources.RemoveComputeNodeUserConfirm, this.Name),
                Resources.RemoveComputeNodeUser,
                this.Name,
                () => BatchClient.DeleteComputeNodeUser(parameters));
        }
Exemplo n.º 5
0
        public override void ExecuteCmdlet()
        {
            ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(this.BatchContext, this.PoolId, this.ComputeNodeId,
                                                                                                   this.Name, this.AdditionalBehaviors);

            ConfirmAction(
                Force.IsPresent,
                string.Format(Resources.RBU_RemoveConfirm, this.Name),
                Resources.RBU_RemoveUser,
                this.Name,
                () => BatchClient.DeleteComputeNodeUser(parameters));
        }