diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 9a9675fab524..9424c5a62e50 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -166,6 +166,8 @@
+
+
@@ -178,6 +180,7 @@
+
@@ -270,6 +273,18 @@
Always
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
Always
@@ -378,6 +393,12 @@
Always
+
+ Always
+
+
+ Always
+
Always
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs
new file mode 100644
index 000000000000..7d17d9891e8e
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs
@@ -0,0 +1,120 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management.Automation;
+using System.Threading.Tasks;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Pools
+{
+ public class ResetBatchComputeNodeCommandTests
+ {
+ private ResetBatchComputeNodeCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public ResetBatchComputeNodeCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new ResetBatchComputeNodeCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void ResetBatchComputeNodeParametersTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+ cmdlet.Id = null;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.PoolId = "testPool";
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Id = "computeNode1";
+
+ // Don't go to the service on a Reimage ComputeNode call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ComputeNodeReimageResponse response = new ComputeNodeReimageResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ // Verify no exceptions when required parameter is set
+ cmdlet.ExecuteCmdlet();
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void ResetComputeNodeRequestTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ cmdlet.PoolId = "testPool";
+ cmdlet.Id = "computeNode1";
+ cmdlet.ReimageOption = ComputeNodeReimageOption.Terminate;
+
+ ComputeNodeReimageOption? requestReimageOption = null;
+
+ // Don't go to the service on a Reimage ComputeNode call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ requestReimageOption = request.TypedParameters.ComputeNodeReimageOption;
+
+ ComputeNodeReimageResponse response = new ComputeNodeReimageResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ cmdlet.ExecuteCmdlet();
+
+ // Verify that the reimage option was properly set on the outgoing request
+ Assert.Equal(cmdlet.ReimageOption, requestReimageOption);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs
new file mode 100644
index 000000000000..76a184a3588c
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs
@@ -0,0 +1,120 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management.Automation;
+using System.Threading.Tasks;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Pools
+{
+ public class RestartBatchComputeNodeCommandTests
+ {
+ private RestartBatchComputeNodeCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public RestartBatchComputeNodeCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new RestartBatchComputeNodeCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void RestartBatchComputeNodeParametersTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+ cmdlet.Id = null;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.PoolId = "testPool";
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Id = "computeNode1";
+
+ // Don't go to the service on a Reboot ComputeNode call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ComputeNodeRebootResponse response = new ComputeNodeRebootResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ // Verify no exceptions when required parameter is set
+ cmdlet.ExecuteCmdlet();
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void RestartComputeNodeRequestTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ cmdlet.PoolId = "testPool";
+ cmdlet.Id = "computeNode1";
+ cmdlet.RebootOption = ComputeNodeRebootOption.Terminate;
+
+ ComputeNodeRebootOption? requestRebootOption = null;
+
+ // Don't go to the service on a Reboot ComputeNode call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ requestRebootOption = request.TypedParameters.ComputeNodeRebootOption;
+
+ ComputeNodeRebootResponse response = new ComputeNodeRebootResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ cmdlet.ExecuteCmdlet();
+
+ // Verify that the reboot option was properly set on the outgoing request
+ Assert.Equal(cmdlet.RebootOption, requestRebootOption);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs
new file mode 100644
index 000000000000..99ce0b58efd3
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs
@@ -0,0 +1,119 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Collections.Generic;
+using System.Linq;
+using System.Management.Automation;
+using System.Threading.Tasks;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Pools
+{
+ public class SetBatchPoolOSVersionCommandTests
+ {
+ private SetBatchPoolOSVersionCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchPoolOSVersionCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new SetBatchPoolOSVersionCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetPoolOSVersionParametersTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+ cmdlet.Id = null;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Id = "testPool";
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.TargetOSVersion = "targetOS";
+
+ // Don't go to the service on an Upgrage OS call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ CloudPoolUpgradeOSResponse response = new CloudPoolUpgradeOSResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ // Verify no exceptions when required parameter is set
+ cmdlet.ExecuteCmdlet();
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetPoolOSVersionRequestTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ string targetOS = "targetOS";
+ string requestTargetOS = null;
+
+ cmdlet.Id = "testPool";
+ cmdlet.TargetOSVersion = targetOS;
+
+ // Don't go to the service on an Enable AutoScale call
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ requestTargetOS = request.TypedParameters.TargetOSVersion;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ CloudPoolUpgradeOSResponse response = new CloudPoolUpgradeOSResponse();
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ cmdlet.ExecuteCmdlet();
+
+ // Verify that the target OS was properly set on the outgoing request
+ Assert.Equal(targetOS, requestTargetOS);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs
index 51c28d77cd9d..37b2ac826a94 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.cs
@@ -103,6 +103,70 @@ public void TestListComputeNodePipeline()
TestUtilities.GetCallingClass(),
TestUtilities.GetCurrentMethodName());
}
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestRebootComputeNodeById()
+ {
+ TestRebootComputeNode(false);
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestRebootComputeNodePipeline()
+ {
+ TestRebootComputeNode(true);
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestReimageComputeNodeById()
+ {
+ TestReimageComputeNode(false);
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestReimageComputeNodePipeline()
+ {
+ TestReimageComputeNode(true);
+ }
+
+ private void TestRebootComputeNode(bool usePipeline)
+ {
+ BatchController controller = BatchController.NewInstance;
+ BatchAccountContext context = null;
+ string computeNodeId = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-RebootComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
+ computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
+ ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
+ },
+ null,
+ TestUtilities.GetCallingClass(),
+ usePipeline ? "TestRebootComputeNodePipeline" : "TestRebootComputeNodeById");
+ }
+
+ private void TestReimageComputeNode(bool usePipeline)
+ {
+ BatchController controller = BatchController.NewInstance;
+ BatchAccountContext context = null;
+ string computeNodeId = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-ReimageComputeNode '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, usePipeline ? 1 : 0) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
+ computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
+ ScenarioTestHelpers.WaitForIdleComputeNode(controller, context, poolId, computeNodeId);
+ },
+ null,
+ TestUtilities.GetCallingClass(),
+ usePipeline ? "TestReimageComputeNodePipeline" : "TestReimageComputeNodeById");
+ }
}
// Cmdlets that use the HTTP Recorder interceptor for use with scenario tests
@@ -115,4 +179,24 @@ public override void ExecuteCmdlet()
base.ExecuteCmdlet();
}
}
+
+ [Cmdlet(VerbsLifecycle.Restart, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
+ public class RestartBatchComputeNodeScenarioTestCommand : RestartBatchComputeNodeCommand
+ {
+ public override void ExecuteCmdlet()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ExecuteCmdlet();
+ }
+ }
+
+ [Cmdlet(VerbsCommon.Reset, "AzureBatchComputeNode_ST", DefaultParameterSetName = Constants.IdParameterSet)]
+ public class ResetBatchComputeNodeScenarioTestCommand : ResetBatchComputeNodeCommand
+ {
+ public override void ExecuteCmdlet()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ExecuteCmdlet();
+ }
+ }
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1
index b958e463f5cd..34ead7348f91 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeTests.ps1
@@ -115,4 +115,56 @@ function Test-ListComputeNodePipeline
$computeNodes = Get-AzureBatchPool_ST -Id $poolId -BatchContext $context | Get-AzureBatchComputeNode_ST -BatchContext $context
Assert-AreEqual $count $computeNodes.Count
+}
+
+<#
+.SYNOPSIS
+Tests rebooting a compute node
+#>
+function Test-RebootComputeNode
+{
+ param([string]$accountName, [string]$poolId, [string]$computeNodeId, [string]$usePipeline)
+
+ $context = Get-AzureBatchAccountKeys -Name $accountName
+
+ $rebootOption = ([Microsoft.Azure.Batch.Common.ComputeNodeRebootOption]::Terminate)
+
+ if ($usePipeline -eq '1')
+ {
+ Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Restart-AzureBatchComputeNode_ST -RebootOption $rebootOption -BatchContext $context
+ }
+ else
+ {
+ Restart-AzureBatchComputeNode_ST $poolId $computeNodeId -RebootOption $rebootOption -BatchContext $context
+ }
+
+ $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
+
+ Assert-AreEqual 'Rebooting' $computeNode.State
+}
+
+<#
+.SYNOPSIS
+Tests reimaging a compute node
+#>
+function Test-ReimageComputeNode
+{
+ param([string]$accountName, [string]$poolId, [string]$computeNodeId, [string]$usePipeline)
+
+ $context = Get-AzureBatchAccountKeys -Name $accountName
+
+ $reimageOption = ([Microsoft.Azure.Batch.Common.ComputeNodeReimageOption]::Terminate)
+
+ if ($usePipeline -eq '1')
+ {
+ Get-AzureBatchComputeNode_ST $poolId $computeNodeId -BatchContext $context | Reset-AzureBatchComputeNode_ST -ReimageOption $reimageOption -BatchContext $context
+ }
+ else
+ {
+ Reset-AzureBatchComputeNode_ST $poolId $computeNodeId -ReimageOption $reimageOption -BatchContext $context
+ }
+
+ $computeNode = Get-AzureBatchComputeNode_ST -PoolId $poolId -Filter "id eq '$computeNodeId'" -BatchContext $context
+
+ Assert-AreEqual 'Reimaging' $computeNode.State
}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
index 814d65353cb9..6f5d5769f890 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
@@ -386,6 +386,38 @@ public void TestEvaluateAutoScaleByPipeline()
TestUtilities.GetCallingClass(),
TestUtilities.GetCurrentMethodName());
}
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestChangeOSVersionById()
+ {
+ TestChangeOSVersion(false);
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestChangeOSVersionPipeline()
+ {
+ TestChangeOSVersion(true);
+ }
+
+ private void TestChangeOSVersion(bool usePipeline)
+ {
+ BatchController controller = BatchController.NewInstance;
+ BatchAccountContext context = null;
+ string newTargetOSVersion = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-ChangeOSVersion '{0}' '{1}' '{2}' '{3}'", commonAccountName, testPoolId, newTargetOSVersion, usePipeline ? 1 : 0) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, commonAccountName);
+ string currentTargetOSVersion = ScenarioTestHelpers.WaitForOSVersionChange(controller, context, testPoolId);
+ newTargetOSVersion = currentTargetOSVersion == "*" ? "WA-GUEST-OS-4.20_201505-01" : "*";
+ },
+ null,
+ TestUtilities.GetCallingClass(),
+ usePipeline ? "TestChangeOSVersionPipeline" : "TestChangeOSVersionById");
+ }
}
// Cmdlets that use the HTTP Recorder interceptor for use with scenario tests
@@ -468,4 +500,14 @@ public override void ExecuteCmdlet()
base.ExecuteCmdlet();
}
}
+
+ [Cmdlet(VerbsCommon.Set, "AzureBatchPoolOSVersion_ST")]
+ public class SetBatchPoolOSVersionScenarioTestCommand : SetBatchPoolOSVersionCommand
+ {
+ public override void ExecuteCmdlet()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ExecuteCmdlet();
+ }
+ }
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
index 43bd3e5f2570..2d1d35ca8e68 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
@@ -371,4 +371,31 @@ function Test-EvaluateAutoScale
# Verify that the evaluation result matches expectation
Assert-True { $evalResult.AutoScaleRun.Results.Contains($formula) }
+}
+
+<#
+.SYNOPSIS
+Tests changing the pool OS version
+#>
+function Test-ChangeOSVersion
+{
+ param([string]$accountName, [string]$poolId, [string]$targetOSVersion, [string]$usePipeline)
+
+ $context = Get-AzureBatchAccountKeys $accountName
+
+ # Verify that we start with a different target OS
+ $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
+ Assert-AreNotEqual $targetOSVersion $pool.TargetOSVersion
+
+ if ($usePipeline -eq '1')
+ {
+ Get-AzureBatchPool_ST -Filter "id eq '$poolId'" -BatchContext $context | Set-AzureBatchPoolOSVersion_ST -TargetOSVersion $targetOSVersion -BatchContext $context
+ }
+ else
+ {
+ Set-AzureBatchPoolOSVersion_ST $poolId $targetOSVersion -BatchContext $context
+ }
+
+ $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
+ Assert-AreEqual $targetOSVersion $pool.TargetOSVersion
}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
index bce1639dfcfe..6637f00829fe 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
@@ -133,6 +133,32 @@ public static void DisableAutoScale(BatchController controller, BatchAccountCont
client.DisableAutoScale(parameters);
}
+ public static string WaitForOSVersionChange(BatchController controller, BatchAccountContext context, string poolId)
+ {
+ RequestInterceptor interceptor = CreateHttpRecordingInterceptor();
+ BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
+ BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);
+
+ ListPoolOptions options = new ListPoolOptions(context, behaviors)
+ {
+ PoolId = poolId
+ };
+
+ DateTime timeout = DateTime.Now.AddMinutes(2);
+ PSCloudPool pool = client.ListPools(options).First();
+ while (pool.CurrentOSVersion != pool.TargetOSVersion)
+ {
+ if (DateTime.Now > timeout)
+ {
+ throw new TimeoutException("Timed out waiting for active state pool");
+ }
+ Sleep(5000);
+ pool = client.ListPools(options).First();
+ }
+
+ return pool.TargetOSVersion;
+ }
+
public static void WaitForSteadyPoolAllocation(BatchController controller, BatchAccountContext context, string poolId)
{
RequestInterceptor interceptor = CreateHttpRecordingInterceptor();
@@ -371,6 +397,34 @@ public static string GetComputeNodeId(BatchController controller, BatchAccountCo
return client.ListComputeNodes(options).First().Id;
}
+ ///
+ /// Waits for a compute node to get to the idle state
+ ///
+ public static void WaitForIdleComputeNode(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId)
+ {
+ RequestInterceptor interceptor = CreateHttpRecordingInterceptor();
+ BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
+ BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);
+
+ ListComputeNodeOptions options = new ListComputeNodeOptions(context, poolId, null, behaviors)
+ {
+ ComputeNodeId = computeNodeId
+ };
+
+ DateTime timeout = DateTime.Now.AddMinutes(2);
+ PSComputeNode computeNode = client.ListComputeNodes(options).First();
+ if (computeNode.State != ComputeNodeState.Idle)
+ {
+ if (DateTime.Now > timeout)
+ {
+ throw new TimeoutException("Timed out waiting for idle compute node");
+ }
+
+ Sleep(5000);
+ computeNode = client.ListComputeNodes(options).First();
+ }
+ }
+
///
/// Creates a test user for use in Scenario tests.
///
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodeById.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodeById.json
new file mode 100644
index 000000000000..087af81c1bf0
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodeById.json
@@ -0,0 +1,644 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14999"
+ ],
+ "x-ms-request-id": [
+ "e61f84ee-640e-45e7-8632-7339a89c343f"
+ ],
+ "x-ms-correlation-request-id": [
+ "e61f84ee-640e-45e7-8632-7339a89c343f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164457Z:e61f84ee-640e-45e7-8632-7339a89c343f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:56 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14998"
+ ],
+ "x-ms-request-id": [
+ "80de9332-30b2-4211-9625-0dfb7227720d"
+ ],
+ "x-ms-correlation-request-id": [
+ "80de9332-30b2-4211-9625-0dfb7227720d"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164459Z:80de9332-30b2-4211-9625-0dfb7227720d"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 16:44:57 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "781e4353-c489-40f3-bd97-c246fc0effed"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14999"
+ ],
+ "x-ms-request-id": [
+ "2fc7fb4d-d0ff-4fe1-b6da-1251afdad7b5"
+ ],
+ "x-ms-correlation-request-id": [
+ "2fc7fb4d-d0ff-4fe1-b6da-1251afdad7b5"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164458Z:2fc7fb4d-d0ff-4fe1-b6da-1251afdad7b5"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:57 GMT"
+ ],
+ "ETag": [
+ "0x8D2A7232FAECE7A"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "87ce9618-b76e-4306-87e1-b78039154f5b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14998"
+ ],
+ "x-ms-request-id": [
+ "aab98827-26d7-4bc8-9af0-6bdb53adae3f"
+ ],
+ "x-ms-correlation-request-id": [
+ "aab98827-26d7-4bc8-9af0-6bdb53adae3f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164500Z:aab98827-26d7-4bc8-9af0-6bdb53adae3f"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "ETag": [
+ "0x8D2A7233090EBCA"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "a0dfc0a3-110c-4bc3-b69d-445c2d3778e3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "edf499c2-6835-4405-9006-6ab934a5f755"
+ ],
+ "x-ms-correlation-request-id": [
+ "edf499c2-6835-4405-9006-6ab934a5f755"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164458Z:edf499c2-6835-4405-9006-6ab934a5f755"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:58 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "a3ebe236-e97b-49ce-abaf-8d058f49fcad"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1198"
+ ],
+ "x-ms-request-id": [
+ "1e7db45f-e6ca-4b07-a849-ddc4daf1f04d"
+ ],
+ "x-ms-correlation-request-id": [
+ "1e7db45f-e6ca-4b07-a849-ddc4daf1f04d"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T164500Z:1e7db45f-e6ca-4b07-a849-ddc4daf1f04d"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "d34bb408-6545-4eaa-b051-18f5dbaa44fb"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:44:58 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T23:35:48.6804172Z\",\r\n \"lastBootTime\": \"2015-08-13T23:35:48.5094158Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T23:35:48.9114181Z\",\r\n \"endTime\": \"2015-08-13T23:35:50.3974279Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_2-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_2-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:27:45.9148103Z\",\r\n \"lastBootTime\": \"2015-08-13T20:27:45.8127934Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.74.139\",\r\n \"affinityId\": \"TVM:tvm-3257026573_2-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:27:45.949802Z\",\r\n \"endTime\": \"2015-08-13T20:27:47.5898996Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_3-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_3-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:32:52.3245045Z\",\r\n \"lastBootTime\": \"2015-08-13T20:32:52.0585047Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.118.157\",\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:32:52.4725155Z\",\r\n \"endTime\": \"2015-08-13T20:32:54.0355045Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "c072185a-4144-4318-9c27-0a477c5a8147"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "d34bb408-6545-4eaa-b051-18f5dbaa44fb"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "f42017f3-0c18-47f4-810a-adaa90272780"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T23:35:48.6804172Z\",\r\n \"lastBootTime\": \"2015-08-13T23:35:48.5094158Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T23:35:48.9114181Z\",\r\n \"endTime\": \"2015-08-13T23:35:50.3974279Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "00ec0240-c179-4452-b9b3-594d54530c5d"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f42017f3-0c18-47f4-810a-adaa90272780"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "f42017f3-0c18-47f4-810a-adaa90272780"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T23:35:48.6804172Z\",\r\n \"lastBootTime\": \"2015-08-13T23:35:48.5094158Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T23:35:48.9114181Z\",\r\n \"endTime\": \"2015-08-13T23:35:50.3974279Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "00ec0240-c179-4452-b9b3-594d54530c5d"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f42017f3-0c18-47f4-810a-adaa90272780"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:44:59 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reboot&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWJvb3QmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeRebootOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "39"
+ ],
+ "client-request-id": [
+ "896c8db6-4114-4cbb-8514-591e2b801de0"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:45:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7e159877-d5a8-46cf-a981-de65942e7251"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "896c8db6-4114-4cbb-8514-591e2b801de0"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:45:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "3ac85c5e-dd51-4b62-8315-56d7a69aafd4"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:45:01 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"rebooting\",\r\n \"stateTransitionTime\": \"2015-08-17T16:45:01.1518559Z\",\r\n \"lastBootTime\": \"2015-08-13T23:35:48.5094158Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T23:35:48.9114181Z\",\r\n \"endTime\": \"2015-08-13T23:35:50.3974279Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "858a1fce-596a-4867-99a1-39a1e8eb1421"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "3ac85c5e-dd51-4b62-8315-56d7a69aafd4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:45:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "3ac85c5e-dd51-4b62-8315-56d7a69aafd4"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:45:01 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"rebooting\",\r\n \"stateTransitionTime\": \"2015-08-17T16:45:01.1518559Z\",\r\n \"lastBootTime\": \"2015-08-13T23:35:48.5094158Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T23:35:48.9114181Z\",\r\n \"endTime\": \"2015-08-13T23:35:50.3974279Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "858a1fce-596a-4867-99a1-39a1e8eb1421"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "3ac85c5e-dd51-4b62-8315-56d7a69aafd4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:45:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodePipeline.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodePipeline.json
new file mode 100644
index 000000000000..62f5b7a85ba5
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestRebootComputeNodePipeline.json
@@ -0,0 +1,797 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14999"
+ ],
+ "x-ms-request-id": [
+ "04fdf80a-7a44-4bcb-a202-fc02450afab1"
+ ],
+ "x-ms-correlation-request-id": [
+ "04fdf80a-7a44-4bcb-a202-fc02450afab1"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165233Z:04fdf80a-7a44-4bcb-a202-fc02450afab1"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:33 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14998"
+ ],
+ "x-ms-request-id": [
+ "0e2a9b05-ac34-4556-a6cd-1abc7d3747e2"
+ ],
+ "x-ms-correlation-request-id": [
+ "0e2a9b05-ac34-4556-a6cd-1abc7d3747e2"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165236Z:0e2a9b05-ac34-4556-a6cd-1abc7d3747e2"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 16:52:34 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "8a4e714a-8073-4f35-9399-424c7ec2f8ab"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14999"
+ ],
+ "x-ms-request-id": [
+ "92b0e425-5701-4873-ad3b-d190d3598bd5"
+ ],
+ "x-ms-correlation-request-id": [
+ "92b0e425-5701-4873-ad3b-d190d3598bd5"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165235Z:92b0e425-5701-4873-ad3b-d190d3598bd5"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:34 GMT"
+ ],
+ "ETag": [
+ "0x8D2A7244011792D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "a2042c08-35df-4f66-aba6-36debfe39889"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14998"
+ ],
+ "x-ms-request-id": [
+ "9a992cc4-02f5-4090-8d6f-39e256f23715"
+ ],
+ "x-ms-correlation-request-id": [
+ "9a992cc4-02f5-4090-8d6f-39e256f23715"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165236Z:9a992cc4-02f5-4090-8d6f-39e256f23715"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "ETag": [
+ "0x8D2A72440D588D6"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "7f478b0f-aad0-4acb-b253-040262b870bf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "c3f86bcb-6809-4b78-9293-e08f80490732"
+ ],
+ "x-ms-correlation-request-id": [
+ "c3f86bcb-6809-4b78-9293-e08f80490732"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165235Z:c3f86bcb-6809-4b78-9293-e08f80490732"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:34 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "97bd5103-930b-49ae-841d-698344d3beb9"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1198"
+ ],
+ "x-ms-request-id": [
+ "edffb3d9-bc39-4c01-b4e7-d7a3f86c6e47"
+ ],
+ "x-ms-correlation-request-id": [
+ "edffb3d9-bc39-4c01-b4e7-d7a3f86c6e47"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T165236Z:edffb3d9-bc39-4c01-b4e7-d7a3f86c6e47"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "bcc234e7-c24a-4459-96ff-d38210894671"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:47:07.7129021Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_2-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_2-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:27:45.9148103Z\",\r\n \"lastBootTime\": \"2015-08-13T20:27:45.8127934Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.74.139\",\r\n \"affinityId\": \"TVM:tvm-3257026573_2-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:27:45.949802Z\",\r\n \"endTime\": \"2015-08-13T20:27:47.5898996Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_3-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_3-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:32:52.3245045Z\",\r\n \"lastBootTime\": \"2015-08-13T20:32:52.0585047Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.118.157\",\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:32:52.4725155Z\",\r\n \"endTime\": \"2015-08-13T20:32:54.0355045Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "59fc3f57-2f8b-402c-afd9-650d9181d881"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "bcc234e7-c24a-4459-96ff-d38210894671"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "7b03f8fe-8c10-40bc-aeac-aff07b6bc195"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:47:07.7129021Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "d0fb0afb-6d0c-4b9a-8afd-37f32dcc8715"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "7b03f8fe-8c10-40bc-aeac-aff07b6bc195"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "7b03f8fe-8c10-40bc-aeac-aff07b6bc195"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:47:07.7129021Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "d0fb0afb-6d0c-4b9a-8afd-37f32dcc8715"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "7b03f8fe-8c10-40bc-aeac-aff07b6bc195"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:35 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "dd8a8067-679e-4cab-8f63-8961770181f6"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:47:07.7129021Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "89f598b8-08ad-484d-88e0-e16241241109"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "dd8a8067-679e-4cab-8f63-8961770181f6"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reboot&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWJvb3QmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeRebootOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "39"
+ ],
+ "client-request-id": [
+ "331c94d4-93dc-470b-8785-4b0af0585376"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1cdacfdd-28c9-430f-9fa3-673e83e9d475"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "331c94d4-93dc-470b-8785-4b0af0585376"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reboot&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWJvb3QmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeRebootOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "39"
+ ],
+ "client-request-id": [
+ "331c94d4-93dc-470b-8785-4b0af0585376"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1cdacfdd-28c9-430f-9fa3-673e83e9d475"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "331c94d4-93dc-470b-8785-4b0af0585376"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"rebooting\",\r\n \"stateTransitionTime\": \"2015-08-17T16:52:36.8643332Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "72d9184b-eacb-4a6c-b932-93c5d1d6a3f1"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"rebooting\",\r\n \"stateTransitionTime\": \"2015-08-17T16:52:36.8643332Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "72d9184b-eacb-4a6c-b932-93c5d1d6a3f1"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"rebooting\",\r\n \"stateTransitionTime\": \"2015-08-17T16:52:36.8643332Z\",\r\n \"lastBootTime\": \"2015-08-17T16:47:07.6079015Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:47:07.7799021Z\",\r\n \"endTime\": \"2015-08-17T16:47:09.1159107Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "72d9184b-eacb-4a6c-b932-93c5d1d6a3f1"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "33e769c1-a254-49d1-9a22-503ac259a8e9"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 16:52:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodeById.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodeById.json
new file mode 100644
index 000000000000..5638040c1552
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodeById.json
@@ -0,0 +1,644 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14997"
+ ],
+ "x-ms-request-id": [
+ "bc22b32e-33ce-4331-848d-1c523bdbfb9b"
+ ],
+ "x-ms-correlation-request-id": [
+ "bc22b32e-33ce-4331-848d-1c523bdbfb9b"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170423Z:bc22b32e-33ce-4331-848d-1c523bdbfb9b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:23 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14996"
+ ],
+ "x-ms-request-id": [
+ "7c60e61b-e41d-4781-96d3-0c993442292a"
+ ],
+ "x-ms-correlation-request-id": [
+ "7c60e61b-e41d-4781-96d3-0c993442292a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170426Z:7c60e61b-e41d-4781-96d3-0c993442292a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:26 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 17:04:26 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "d0ed0d57-a630-471e-8b9d-293e63465c8c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14997"
+ ],
+ "x-ms-request-id": [
+ "30be6536-ad3d-4c28-8de1-b5a07ae082b6"
+ ],
+ "x-ms-correlation-request-id": [
+ "30be6536-ad3d-4c28-8de1-b5a07ae082b6"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170425Z:30be6536-ad3d-4c28-8de1-b5a07ae082b6"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:24 GMT"
+ ],
+ "ETag": [
+ "0x8D2A725E82D6641"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "34466208-43b6-4c32-aac1-bd6cd1662eea"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14996"
+ ],
+ "x-ms-request-id": [
+ "f6abc03f-78a9-4ee9-b8d7-f6a889245264"
+ ],
+ "x-ms-correlation-request-id": [
+ "f6abc03f-78a9-4ee9-b8d7-f6a889245264"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170426Z:f6abc03f-78a9-4ee9-b8d7-f6a889245264"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "ETag": [
+ "0x8D2A725E9154C5D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "3fbafa55-de30-423f-9da7-0506c67e64e2"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1197"
+ ],
+ "x-ms-request-id": [
+ "e6d89999-b299-408d-a288-734c32fee260"
+ ],
+ "x-ms-correlation-request-id": [
+ "e6d89999-b299-408d-a288-734c32fee260"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170425Z:e6d89999-b299-408d-a288-734c32fee260"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:24 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "4986ebc0-887d-4a5c-9c1b-5fa390341843"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1196"
+ ],
+ "x-ms-request-id": [
+ "66715d49-7ebc-472f-85a1-6a0c9961c8f3"
+ ],
+ "x-ms-correlation-request-id": [
+ "66715d49-7ebc-472f-85a1-6a0c9961c8f3"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T170426Z:66715d49-7ebc-472f-85a1-6a0c9961c8f3"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9aa45970-34fa-4b61-b3cb-e741e0af13e4"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:54:46.5148352Z\",\r\n \"lastBootTime\": \"2015-08-17T16:54:46.4228021Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:54:46.5688003Z\",\r\n \"endTime\": \"2015-08-17T16:54:48.0816655Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_2-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_2-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:27:45.9148103Z\",\r\n \"lastBootTime\": \"2015-08-13T20:27:45.8127934Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.74.139\",\r\n \"affinityId\": \"TVM:tvm-3257026573_2-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:27:45.949802Z\",\r\n \"endTime\": \"2015-08-13T20:27:47.5898996Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_3-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_3-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:32:52.3245045Z\",\r\n \"lastBootTime\": \"2015-08-13T20:32:52.0585047Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.118.157\",\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:32:52.4725155Z\",\r\n \"endTime\": \"2015-08-13T20:32:54.0355045Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "a8cb9777-b4ea-44f7-85bb-642b0a6e7a9a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9aa45970-34fa-4b61-b3cb-e741e0af13e4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5615a3da-8f5c-4ea1-8747-aabfb8a95d5f"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:54:46.5148352Z\",\r\n \"lastBootTime\": \"2015-08-17T16:54:46.4228021Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:54:46.5688003Z\",\r\n \"endTime\": \"2015-08-17T16:54:48.0816655Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "20ce9460-a5ca-44d5-a8c7-811aa4f51f88"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5615a3da-8f5c-4ea1-8747-aabfb8a95d5f"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5615a3da-8f5c-4ea1-8747-aabfb8a95d5f"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T16:54:46.5148352Z\",\r\n \"lastBootTime\": \"2015-08-17T16:54:46.4228021Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:54:46.5688003Z\",\r\n \"endTime\": \"2015-08-17T16:54:48.0816655Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "20ce9460-a5ca-44d5-a8c7-811aa4f51f88"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5615a3da-8f5c-4ea1-8747-aabfb8a95d5f"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:25 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reimage&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWltYWdlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeReimageOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "40"
+ ],
+ "client-request-id": [
+ "1f3550d5-bbed-42f6-a02c-a8b868baf45b"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:26 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "2308327f-20a3-4eda-a7db-dc4bd3939dee"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "1f3550d5-bbed-42f6-a02c-a8b868baf45b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "8a7e5109-a292-40cd-83cf-fd076d6c283e"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"reimaging\",\r\n \"stateTransitionTime\": \"2015-08-17T17:04:27.4042443Z\",\r\n \"lastBootTime\": \"2015-08-17T16:54:46.4228021Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:54:46.5688003Z\",\r\n \"endTime\": \"2015-08-17T16:54:48.0816655Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7ba82003-4349-4d18-9171-f732b53513f7"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "8a7e5109-a292-40cd-83cf-fd076d6c283e"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "8a7e5109-a292-40cd-83cf-fd076d6c283e"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"reimaging\",\r\n \"stateTransitionTime\": \"2015-08-17T17:04:27.4042443Z\",\r\n \"lastBootTime\": \"2015-08-17T16:54:46.4228021Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T16:54:46.5688003Z\",\r\n \"endTime\": \"2015-08-17T16:54:48.0816655Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7ba82003-4349-4d18-9171-f732b53513f7"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "8a7e5109-a292-40cd-83cf-fd076d6c283e"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:04:27 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodePipeline.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodePipeline.json
new file mode 100644
index 000000000000..b706b484f638
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeTests/TestReimageComputeNodePipeline.json
@@ -0,0 +1,797 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14995"
+ ],
+ "x-ms-request-id": [
+ "ff21c9a5-c79b-4696-9f74-77ac5005efbb"
+ ],
+ "x-ms-correlation-request-id": [
+ "ff21c9a5-c79b-4696-9f74-77ac5005efbb"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171753Z:ff21c9a5-c79b-4696-9f74-77ac5005efbb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:53 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14994"
+ ],
+ "x-ms-request-id": [
+ "5a209db1-b874-415f-907b-97d10e721f57"
+ ],
+ "x-ms-correlation-request-id": [
+ "5a209db1-b874-415f-907b-97d10e721f57"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171755Z:5a209db1-b874-415f-907b-97d10e721f57"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "febc5737-4220-470b-8194-9f10d3f24c4b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14997"
+ ],
+ "x-ms-request-id": [
+ "395d56cc-f440-4b9d-9afc-987a313b0232"
+ ],
+ "x-ms-correlation-request-id": [
+ "395d56cc-f440-4b9d-9afc-987a313b0232"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171754Z:395d56cc-f440-4b9d-9afc-987a313b0232"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:53 GMT"
+ ],
+ "ETag": [
+ "0x8D2A727CA9D8E78"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Mon, 17 Aug 2015 17:17:57 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "3a2b5e07-ef6e-415d-a98e-5b0c95333d94"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14996"
+ ],
+ "x-ms-request-id": [
+ "996d1a95-4524-4151-8311-d605ae1012ca"
+ ],
+ "x-ms-correlation-request-id": [
+ "996d1a95-4524-4151-8311-d605ae1012ca"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171756Z:996d1a95-4524-4151-8311-d605ae1012ca"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "ETag": [
+ "0x8D2A727CB84C35A"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "04aca641-2d4a-4630-8c21-56060ab94b64"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "94967d21-f3c1-4343-afc0-e50fa785589d"
+ ],
+ "x-ms-correlation-request-id": [
+ "94967d21-f3c1-4343-afc0-e50fa785589d"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171754Z:94967d21-f3c1-4343-afc0-e50fa785589d"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:54 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "7d82bd23-612f-4944-95aa-368c62b98c72"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1198"
+ ],
+ "x-ms-request-id": [
+ "d5bfd9a1-b48f-4ad7-8420-3e1a6a81e54d"
+ ],
+ "x-ms-correlation-request-id": [
+ "d5bfd9a1-b48f-4ad7-8420-3e1a6a81e54d"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150817T171756Z:d5bfd9a1-b48f-4ad7-8420-3e1a6a81e54d"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "f9ae4fea-8c5c-49b3-81f2-d94b39010488"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:54 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T17:10:43.5860086Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_2-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_2-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:27:45.9148103Z\",\r\n \"lastBootTime\": \"2015-08-13T20:27:45.8127934Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.74.139\",\r\n \"affinityId\": \"TVM:tvm-3257026573_2-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:27:45.949802Z\",\r\n \"endTime\": \"2015-08-13T20:27:47.5898996Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_3-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_3-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-13T20:32:52.3245045Z\",\r\n \"lastBootTime\": \"2015-08-13T20:32:52.0585047Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.118.157\",\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-13T20:32:52.4725155Z\",\r\n \"endTime\": \"2015-08-13T20:32:54.0355045Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "475d8cfe-1277-40f1-85fc-f47cf95d66bf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f9ae4fea-8c5c-49b3-81f2-d94b39010488"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "be8888fe-b2ba-4f34-ae7a-54e3f29de2ea"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T17:10:43.5860086Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "aaef215a-832e-4e00-a3ac-78680a72fa99"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "be8888fe-b2ba-4f34-ae7a-54e3f29de2ea"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "be8888fe-b2ba-4f34-ae7a-54e3f29de2ea"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T17:10:43.5860086Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "aaef215a-832e-4e00-a3ac-78680a72fa99"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "be8888fe-b2ba-4f34-ae7a-54e3f29de2ea"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:55 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "146bfd89-0899-4c25-9e4b-04bd23a3be32"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes/@Element\",\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-08-17T17:10:43.5860086Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "d3248ec0-5ca1-4fc4-9cb5-b2c83fefbe81"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "146bfd89-0899-4c25-9e4b-04bd23a3be32"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reimage&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWltYWdlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeReimageOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "40"
+ ],
+ "client-request-id": [
+ "e40e81e6-56d1-47b2-9985-56b548fc44d0"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1f7dc128-824b-43f8-98df-fb262b3bdd0c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e40e81e6-56d1-47b2-9985-56b548fc44d0"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z?reimage&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4ej9yZWltYWdlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"nodeReimageOption\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "40"
+ ],
+ "client-request-id": [
+ "e40e81e6-56d1-47b2-9985-56b548fc44d0"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1f7dc128-824b-43f8-98df-fb262b3bdd0c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e40e81e6-56d1-47b2-9985-56b548fc44d0"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:57 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"reimaging\",\r\n \"stateTransitionTime\": \"2015-08-17T17:17:56.7042869Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "765e7f25-27ac-4740-8ee5-c1d50cad8b11"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:57 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"reimaging\",\r\n \"stateTransitionTime\": \"2015-08-17T17:17:56.7042869Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "765e7f25-27ac-4740-8ee5-c1d50cad8b11"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?$filter=id%20eq%20'tvm-3257026573_1-20150813t200938z'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3R2bS0zMjU3MDI2NTczXzEtMjAxNTA4MTN0MjAwOTM4eiUyNyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "ocp-date": [
+ "Mon, 17 Aug 2015 17:17:57 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150813t200938z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150813t200938z\",\r\n \"state\": \"reimaging\",\r\n \"stateTransitionTime\": \"2015-08-17T17:17:56.7042869Z\",\r\n \"lastBootTime\": \"2015-08-17T17:10:43.4937439Z\",\r\n \"allocationTime\": \"2015-08-13T20:09:38.3879059Z\",\r\n \"ipAddress\": \"100.112.90.76\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150813t200938z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-08-17T17:10:43.733705Z\",\r\n \"endTime\": \"2015-08-17T17:10:45.5270336Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "765e7f25-27ac-4740-8ee5-c1d50cad8b11"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "aaffcf53-939a-4d0e-b1b1-b01dd59a9a1a"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Mon, 17 Aug 2015 17:17:56 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionById.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionById.json
new file mode 100644
index 000000000000..2206b8026b06
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionById.json
@@ -0,0 +1,741 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14993"
+ ],
+ "x-ms-request-id": [
+ "9633f949-46a5-4002-b257-1914b6b5dbe8"
+ ],
+ "x-ms-correlation-request-id": [
+ "9633f949-46a5-4002-b257-1914b6b5dbe8"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225830Z:9633f949-46a5-4002-b257-1914b6b5dbe8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:30 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14992"
+ ],
+ "x-ms-request-id": [
+ "8571dbfe-f6cc-4da5-b616-a3aad3e6911f"
+ ],
+ "x-ms-correlation-request-id": [
+ "8571dbfe-f6cc-4da5-b616-a3aad3e6911f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225832Z:8571dbfe-f6cc-4da5-b616-a3aad3e6911f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:32 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:31 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "8c795b27-c83a-463e-b215-c65c631b6d34"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14996"
+ ],
+ "x-ms-request-id": [
+ "58361ab9-16e9-4f91-bf13-038da0e7dead"
+ ],
+ "x-ms-correlation-request-id": [
+ "58361ab9-16e9-4f91-bf13-038da0e7dead"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225831Z:58361ab9-16e9-4f91-bf13-038da0e7dead"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:30 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B5C69EB8"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "ac120aaf-2100-4a96-813c-5b64f78f4d68"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14995"
+ ],
+ "x-ms-request-id": [
+ "967d661f-c302-4f56-8dfd-49cbe8580b7f"
+ ],
+ "x-ms-correlation-request-id": [
+ "967d661f-c302-4f56-8dfd-49cbe8580b7f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225833Z:967d661f-c302-4f56-8dfd-49cbe8580b7f"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:32 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B6C3670F"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "7e8bf0b2-88fc-419d-b828-d4510ae92a44"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "4fa6b8ed-08d6-49fe-9a9a-5d2a4cfdee3f"
+ ],
+ "x-ms-correlation-request-id": [
+ "4fa6b8ed-08d6-49fe-9a9a-5d2a4cfdee3f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225831Z:4fa6b8ed-08d6-49fe-9a9a-5d2a4cfdee3f"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:30 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "5e833131-eb98-4910-b6cd-8ba474b91e51"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1198"
+ ],
+ "x-ms-request-id": [
+ "8970f01d-dad4-4558-b185-5035070f7840"
+ ],
+ "x-ms-correlation-request-id": [
+ "8970f01d-dad4-4558-b185-5035070f7840"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T225833Z:8970f01d-dad4-4558-b185-5035070f7840"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:32 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a67b9548-fd46-4626-91fa-f59f4ac4d1ef"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:31 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A42F3C68C674\",\r\n \"lastModified\": \"2015-08-13T22:33:39.6578932Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:33:39 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "0a493f1a-c96f-47a9-9f15-c4eebcfd1bd1"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a67b9548-fd46-4626-91fa-f59f4ac4d1ef"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:31 GMT"
+ ],
+ "ETag": [
+ "0x8D2A42F3C68C674"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "d0e715aa-0840-45d8-8ca2-11a944e7f0e8"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A42F3C68C674\",\r\n \"lastModified\": \"2015-08-13T22:33:39.6578932Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:33:39 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "b455a3d4-d393-46dc-9538-46526386752b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "d0e715aa-0840-45d8-8ca2-11a944e7f0e8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A42F3C68C674"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A432B778A7BC\",\r\n \"lastModified\": \"2015-08-13T22:58:34.61191Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T22:58:34.61191Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9b3b1838-0572-4c17-ab44-bb8297389d47"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B778A7BC"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A432B778A7BC\",\r\n \"lastModified\": \"2015-08-13T22:58:34.61191Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T22:58:34.61191Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9b3b1838-0572-4c17-ab44-bb8297389d47"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B778A7BC"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A432B778A7BC\",\r\n \"lastModified\": \"2015-08-13T22:58:34.61191Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T22:58:34.61191Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9b3b1838-0572-4c17-ab44-bb8297389d47"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "3ae8e3f5-d979-4875-a0d0-c74c750c15bb"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B778A7BC"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?upgradeos&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP3VwZ3JhZGVvcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "55"
+ ],
+ "client-request-id": [
+ "88701c4d-ffc2-4125-9208-860f368dc46e"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5888a094-d1f0-4b84-a684-a87f4f1c4cce"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "88701c4d-ffc2-4125-9208-860f368dc46e"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B778A7BC"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool?upgradeos&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP3VwZ3JhZGVvcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "55"
+ ],
+ "client-request-id": [
+ "88701c4d-ffc2-4125-9208-860f368dc46e"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 22:58:34 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5888a094-d1f0-4b84-a684-a87f4f1c4cce"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "88701c4d-ffc2-4125-9208-860f368dc46e"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 22:58:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2A432B778A7BC"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionPipeline.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionPipeline.json
new file mode 100644
index 000000000000..42d1dcb34afe
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestChangeOSVersionPipeline.json
@@ -0,0 +1,955 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14990"
+ ],
+ "x-ms-request-id": [
+ "c52e11d6-e254-4414-af45-92fbcb5f15bb"
+ ],
+ "x-ms-correlation-request-id": [
+ "c52e11d6-e254-4414-af45-92fbcb5f15bb"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230615Z:c52e11d6-e254-4414-af45-92fbcb5f15bb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:15 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14989"
+ ],
+ "x-ms-request-id": [
+ "0de8c895-8fbc-4bb6-b4d7-0d5d1a122c6f"
+ ],
+ "x-ms-correlation-request-id": [
+ "0de8c895-8fbc-4bb6-b4d7-0d5d1a122c6f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230618Z:0de8c895-8fbc-4bb6-b4d7-0d5d1a122c6f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:17 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:17 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "f9573f14-f5f1-4cb5-bd70-e0b5d200fe94"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14995"
+ ],
+ "x-ms-request-id": [
+ "5a260414-0ac8-49cd-8db3-d51d1400842c"
+ ],
+ "x-ms-correlation-request-id": [
+ "5a260414-0ac8-49cd-8db3-d51d1400842c"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230617Z:5a260414-0ac8-49cd-8db3-d51d1400842c"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:16 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CB2AF221"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "bd3215c6-df1b-43e4-8a47-5c936f3bf49c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14994"
+ ],
+ "x-ms-request-id": [
+ "d5ff3ffe-85f5-40e1-8726-057e58d13c0b"
+ ],
+ "x-ms-correlation-request-id": [
+ "d5ff3ffe-85f5-40e1-8726-057e58d13c0b"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230618Z:d5ff3ffe-85f5-40e1-8726-057e58d13c0b"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:17 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CBD93B05"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "b841cbe3-8c8d-41e1-b348-ac2442d12795"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1195"
+ ],
+ "x-ms-request-id": [
+ "9ef10238-b4c0-46c4-b9cd-11fed762933a"
+ ],
+ "x-ms-correlation-request-id": [
+ "9ef10238-b4c0-46c4-b9cd-11fed762933a"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230617Z:9ef10238-b4c0-46c4-b9cd-11fed762933a"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:16 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"LjcPYhLUNjgOzrdNciMQS1TZJUoKgOrqhNYv9pbKdNn6GHMBuYwyt9dEx6uSdjzPV4U1N8RFm1EjiakXhq2hng==\",\r\n \"secondary\": \"Y8oHFA4f8afHXYmqwcvL2Bigg+GkjKhDBBUGGAEkGVoj77rskty8DnAqaqMpntUwQK+yEAJWbgfvoho5AfcM+w==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "715e4ce2-248f-4563-a934-b427b56d5ae9"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1194"
+ ],
+ "x-ms-request-id": [
+ "746f5bb3-5dff-41ae-ada7-aae329994cfb"
+ ],
+ "x-ms-correlation-request-id": [
+ "746f5bb3-5dff-41ae-ada7-aae329994cfb"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150813T230618Z:746f5bb3-5dff-41ae-ada7-aae329994cfb"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "e214b1b6-efd2-4b1c-a390-f0b2d75171a3"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:17 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A4333A2D8B79\",\r\n \"lastModified\": \"2015-08-13T23:02:13.9011961Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:02:13 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8383b96e-4aa8-42f9-8d3f-c549267aae11"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e214b1b6-efd2-4b1c-a390-f0b2d75171a3"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A4333A2D8B79"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "1bcde788-b497-4fa3-ba4e-bad734ded925"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A4333A2D8B79\",\r\n \"lastModified\": \"2015-08-13T23:02:13.9011961Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:02:13 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "804e0c2a-f692-4074-9842-347b085f9369"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "1bcde788-b497-4fa3-ba4e-bad734ded925"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A4333A2D8B79"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A433CCA26F9D\",\r\n \"lastModified\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "351ec5b9-ad29-4234-8dff-2a10be731af6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A433CCA26F9D\",\r\n \"lastModified\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "351ec5b9-ad29-4234-8dff-2a10be731af6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A433CCA26F9D\",\r\n \"lastModified\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "351ec5b9-ad29-4234-8dff-2a10be731af6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A433CCA26F9D\",\r\n \"lastModified\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"upgrading\",\r\n \"stateTransitionTime\": \"2015-08-13T23:06:19.6146077Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "351ec5b9-ad29-4234-8dff-2a10be731af6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "26af53a1-1e41-4974-9b57-881e880922e7"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=id%20eq%20'testPool'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RQb29sJTI3JmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "be488cff-b6cf-4f11-aa37-e583a8ab4f83"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A4333A2D8B79\",\r\n \"lastModified\": \"2015-08-13T23:02:13.9011961Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "997aa7f8-602a-49c3-affb-d61afb41574b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "be488cff-b6cf-4f11-aa37-e583a8ab4f83"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=id%20eq%20'testPool'&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9aWQlMjBlcSUyMCUyN3Rlc3RQb29sJTI3JmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "be488cff-b6cf-4f11-aa37-e583a8ab4f83"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"testPool\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool\",\r\n \"eTag\": \"0x8D2A4333A2D8B79\",\r\n \"lastModified\": \"2015-08-13T23:02:13.9011961Z\",\r\n \"creationTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-08-13T20:08:04.98791Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-08-13T20:09:39.4561146Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 3,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "997aa7f8-602a-49c3-affb-d61afb41574b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "be488cff-b6cf-4f11-aa37-e583a8ab4f83"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool?upgradeos&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP3VwZ3JhZGVvcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "55"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "6f664e1b-c277-4fdc-96a2-896e24805daa"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool?upgradeos&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP3VwZ3JhZGVvcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "55"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "6f664e1b-c277-4fdc-96a2-896e24805daa"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testPool?upgradeos&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sP3VwZ3JhZGVvcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"targetOSVersion\": \"WA-GUEST-OS-4.20_201505-01\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "55"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "ocp-date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Thu, 13 Aug 2015 23:06:19 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "6f664e1b-c277-4fdc-96a2-896e24805daa"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "4505ea5f-e672-48c6-8281-4d166c6cd54b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool"
+ ],
+ "Date": [
+ "Thu, 13 Aug 2015 23:06:18 GMT"
+ ],
+ "ETag": [
+ "0x8D2A433CCA26F9D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
index 6a628d431a24..516cb4f7bfd4 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj
@@ -154,6 +154,8 @@
+
+
@@ -190,6 +192,7 @@
+
@@ -241,6 +244,8 @@
+
+
@@ -249,6 +254,7 @@
+
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs
new file mode 100644
index 000000000000..64e008d7c884
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/ResetBatchComputeNodeCommand.cs
@@ -0,0 +1,53 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using Microsoft.Azure.Commands.Batch.Models;
+using System;
+using System.Management.Automation;
+using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
+
+namespace Microsoft.Azure.Commands.Batch
+{
+ [Cmdlet(VerbsCommon.Reset, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.IdParameterSet)]
+ public class ResetBatchComputeNodeCommand : BatchObjectModelCmdletBase
+ {
+ [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the pool that contains the compute node.")]
+ [ValidateNotNullOrEmpty]
+ public string PoolId { get; set; }
+
+ [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the compute node to reimage.")]
+ [ValidateNotNullOrEmpty]
+ public string Id { get; set; }
+
+ [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, ValueFromPipeline = true)]
+ [ValidateNotNullOrEmpty]
+ public PSComputeNode ComputeNode { get; set; }
+
+ [Parameter]
+ [ValidateNotNullOrEmpty]
+ public ComputeNodeReimageOption? ReimageOption { get; set; }
+
+ public override void ExecuteCmdlet()
+ {
+ ReimageComputeNodeParameters parameters = new ReimageComputeNodeParameters(this.BatchContext, this.PoolId,
+ this.Id, this.ComputeNode, this.AdditionalBehaviors)
+ {
+ ReimageOption = this.ReimageOption
+ };
+ BatchClient.ReimageComputeNode(parameters);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs
new file mode 100644
index 000000000000..0688865951b6
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/ComputeNodes/RestartBatchComputeNodeCommand.cs
@@ -0,0 +1,53 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using Microsoft.Azure.Commands.Batch.Models;
+using System;
+using System.Management.Automation;
+using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
+
+namespace Microsoft.Azure.Commands.Batch
+{
+ [Cmdlet(VerbsLifecycle.Restart, Constants.AzureBatchComputeNode, DefaultParameterSetName = Constants.IdParameterSet)]
+ public class RestartBatchComputeNodeCommand : BatchObjectModelCmdletBase
+ {
+ [Parameter(Position = 0, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the pool that contains the compute node.")]
+ [ValidateNotNullOrEmpty]
+ public string PoolId { get; set; }
+
+ [Parameter(Position = 1, ParameterSetName = Constants.IdParameterSet, Mandatory = true, HelpMessage = "The id of the compute node to reboot.")]
+ [ValidateNotNullOrEmpty]
+ public string Id { get; set; }
+
+ [Parameter(Position = 0, ParameterSetName = Constants.InputObjectParameterSet, ValueFromPipeline = true)]
+ [ValidateNotNullOrEmpty]
+ public PSComputeNode ComputeNode { get; set; }
+
+ [Parameter(Position = 2)]
+ [ValidateNotNullOrEmpty]
+ public ComputeNodeRebootOption? RebootOption { get; set; }
+
+ public override void ExecuteCmdlet()
+ {
+ RebootComputeNodeParameters parameters = new RebootComputeNodeParameters(this.BatchContext, this.PoolId,
+ this.Id, this.ComputeNode, this.AdditionalBehaviors)
+ {
+ RebootOption = this.RebootOption
+ };
+ BatchClient.RebootComputeNode(parameters);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml
index 2772f5652c65..93fc42e2dce9 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.xml
@@ -8136,4 +8136,681 @@
+
+
+
+ Restart-AzureBatchComputeNode
+
+
+ Reboots the specified compute node.
+
+
+
+
+ Restart
+ AzureBatchComputeNode
+
+
+
+ Reboots the specified compute node.
+
+
+
+
+ Restart-AzureBatchComputeNode
+
+ PoolId
+
+ The id of the pool that contains the compute node.
+
+ string
+
+
+ Id
+
+ The id of the compute node to reboot.
+
+ string
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+ BatchAccountContext
+
+
+ RebootOption
+
+ Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue.
+
+ ComputeNodeRebootOption
+
+
+
+ Restart-AzureBatchComputeNode
+
+ ComputeNode
+
+ The PSComputeNode object representing the compute node to reboot.
+
+ PSComputeNode
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+ BatchAccountContext
+
+
+ RebootOption
+
+ Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue.
+
+ ComputeNodeRebootOption
+
+
+
+
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+
+ BatchAccountContext
+
+ BatchAccountContext
+
+
+
+
+
+ ComputeNode
+
+ The PSComputeNode object representing the compute node to reboot.
+
+
+ PSComputeNode
+
+ PSComputeNode
+
+
+
+
+
+ Id
+
+ The id of the compute node to reboot.
+
+
+ string
+
+ string
+
+
+
+
+
+ PoolId
+
+ The id of the pool that contains the compute node.
+
+
+ string
+
+ string
+
+
+
+
+
+ RebootOption
+
+ Specifies when to reboot the node and what to do with currently running tasks. The default is Requeue.
+
+
+ ComputeNodeRebootOption
+
+ ComputeNodeRebootOption
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+
+
+ C:\PS>
+
+
+ Restart-AzureBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context
+
+
+ Description
+ -----------
+ Reboots the compute node with id "tvm-3257026573_2-20150813t200938z" in pool "myPool".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+
+
+ C:\PS>
+
+
+ Get-AzureBatchComputeNode -PoolId "myPool" -BatchContext $context | Restart-AzureBatchComputeNode -BatchContext $context
+
+
+ Description
+ -----------
+ Reboots every compute node in pool "myPool".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reset-AzureBatchComputeNode
+
+
+ Reinstalls the operating system on the specified compute node.
+
+
+
+
+ Reset
+ AzureBatchComputeNode
+
+
+
+ Reinstalls the operating system on the specified compute node.
+
+
+
+
+ Reset-AzureBatchComputeNode
+
+ PoolId
+
+ The id of the pool that contains the compute node.
+
+ string
+
+
+ Id
+
+ The id of the compute node to reimage.
+
+ string
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+ BatchAccountContext
+
+
+ ReimageOption
+
+ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue.
+
+ ComputeNodeReimageOption
+
+
+
+ Reset-AzureBatchComputeNode
+
+ ComputeNode
+
+ The PSComputeNode object representing the compute node to reimage.
+
+ PSComputeNode
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+ BatchAccountContext
+
+
+ ReimageOption
+
+ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue.
+
+ ComputeNodeReimageOption
+
+
+
+
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+
+ BatchAccountContext
+
+ BatchAccountContext
+
+
+
+
+
+ ComputeNode
+
+ The PSComputeNode object representing the compute node to reimage.
+
+
+ PSComputeNode
+
+ PSComputeNode
+
+
+
+
+
+ Id
+
+ The id of the compute node to reimage.
+
+
+ string
+
+ string
+
+
+
+
+
+ PoolId
+
+ The id of the pool that contains the compute node.
+
+
+ string
+
+ string
+
+
+
+
+
+ ReimageOption
+
+ Specifies when to reimage the node and what to do with currently running tasks. The default is Requeue.
+
+
+ ComputeNodeReimageOption
+
+ ComputeNodeReimageOption
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+
+
+ C:\PS>
+
+
+ Reset-AzureBatchComputeNode -PoolId "myPool" -Id "tvm-3257026573_2-20150813t200938z" -BatchContext $context
+
+
+ Description
+ -----------
+ Reimages the compute node with id "tvm-3257026573_2-20150813t200938z" in pool "myPool".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+
+
+ C:\PS>
+
+
+ Get-AzureBatchComputeNode -PoolId "myPool" -BatchContext $context | Reset-AzureBatchComputeNode -BatchContext $context
+
+
+ Description
+ -----------
+ Reimages every compute node in pool "myPool".
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set-AzureBatchPoolOSVersion
+
+
+ Changes the operating system version of the specified pool.
+
+
+
+
+ Set
+ AzureBatchPoolOSVersion
+
+
+
+ Changes the operating system version of the specified pool.
+
+
+
+
+ Set-AzureBatchPoolOSVersion
+
+ Id
+
+ The id of the pool.
+
+ string
+
+
+ TargetOSVersion
+
+ The Azure Guest OS version to be installed on the virtual machines in the pool. For more information on Azure Guest OS versions, see http://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/
+
+ string
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+ BatchAccountContext
+
+
+
+
+
+
+ BatchContext
+
+ The BatchAccountContext instance to use when interacting with the Batch service. Use the Get-AzureBatchAccountKeys cmdlet to get a BatchAccountContext object with its access keys populated.
+
+
+ BatchAccountContext
+
+ BatchAccountContext
+
+
+
+
+
+ Id
+
+ The id of the pool.
+
+
+ string
+
+ string
+
+
+
+
+
+ TargetOSVersion
+
+ The Azure Guest OS version to be installed on the virtual machines in the pool. For more information on Azure Guest OS versions, see http://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/
+
+
+ string
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+
+
+ C:\PS>
+
+
+ Set-AzureBatchPoolOSVersion -Id "myPool" -TargetOSVersion "WA-GUEST-OS-4.20_201505-01" -BatchContext $context
+
+
+ Description
+ -----------
+ Sets the target OS version of pool "myPool" to "WA-GUEST-OS-4.20_201505-01"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs
index 2e6bba36bc9f..652d7d4f9e79 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.ComputeNodes.cs
@@ -69,5 +69,56 @@ public IEnumerable ListComputeNodes(ListComputeNodeOptions option
computeNodes, mappingFunction, options.MaxCount, () => WriteVerbose(string.Format(Resources.MaxCount, options.MaxCount)));
}
}
+
+ ///
+ /// Reboots the specified compute node.
+ ///
+ /// The parameters specifying the compute node to reboot and the reboot option.
+ public void RebootComputeNode(RebootComputeNodeParameters parameters)
+ {
+ if (parameters == null)
+ {
+ throw new ArgumentNullException("parameters");
+ }
+
+ string computeNodeId = parameters.ComputeNode == null ? parameters.ComputeNodeId : parameters.ComputeNode.Id;
+ WriteVerbose(string.Format(Resources.RebootComputeNode, computeNodeId));
+
+ if (parameters.ComputeNode != null)
+ {
+ parameters.ComputeNode.omObject.Reboot(parameters.RebootOption, parameters.AdditionalBehaviors);
+ }
+ else
+ {
+ PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
+ poolOperations.Reboot(parameters.PoolId, parameters.ComputeNodeId, parameters.RebootOption, parameters.AdditionalBehaviors);
+ }
+ }
+
+
+ ///
+ /// Reinstalls the operating system on the specified compute node.
+ ///
+ /// The parameters specifying the compute node to reimage and the reimage option.
+ public void ReimageComputeNode(ReimageComputeNodeParameters parameters)
+ {
+ if (parameters == null)
+ {
+ throw new ArgumentNullException("parameters");
+ }
+
+ string computeNodeId = parameters.ComputeNode == null ? parameters.ComputeNodeId : parameters.ComputeNode.Id;
+ WriteVerbose(string.Format(Resources.ReimageComputeNode, computeNodeId));
+
+ if (parameters.ComputeNode != null)
+ {
+ parameters.ComputeNode.omObject.Reimage(parameters.ReimageOption, parameters.AdditionalBehaviors);
+ }
+ else
+ {
+ PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
+ poolOperations.Reimage(parameters.PoolId, parameters.ComputeNodeId, parameters.ReimageOption, parameters.AdditionalBehaviors);
+ }
+ }
}
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs
index a6ae4e6172d9..fbf85c8464ef 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Pools.cs
@@ -237,5 +237,23 @@ public PSAutoScaleEvaluation EvaluateAutoScale(AutoScaleParameters parameters)
AutoScaleEvaluation evaluation = poolOperations.EvaluateAutoScale(poolId, parameters.AutoScaleFormula, parameters.AdditionalBehaviors);
return new PSAutoScaleEvaluation(evaluation);
}
+
+ ///
+ /// Changes the operating system version of the specified pool.
+ ///
+ /// The parameters specifying the pool and target OS version.
+ public void ChangeOSVersion(ChangeOSVersionParameters parameters)
+ {
+ if (parameters == null)
+ {
+ throw new ArgumentNullException("parameters");
+ }
+
+ string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;
+
+ WriteVerbose(string.Format(Resources.ChangeOSVersion, poolId, parameters.TargetOSVersion));
+ PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
+ poolOperations.ChangeOSVersion(poolId, parameters.TargetOSVersion, parameters.AdditionalBehaviors);
+ }
}
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs
new file mode 100644
index 000000000000..8644bffbd06d
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ChangeOSVersionParameters.cs
@@ -0,0 +1,40 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Azure.Commands.Batch.Models
+{
+ public class ChangeOSVersionParameters : PoolOperationParameters
+ {
+ public ChangeOSVersionParameters(BatchAccountContext context, string poolId, PSCloudPool pool, string targetOSVersion,
+ IEnumerable additionalBehaviors = null) : base(context, poolId, pool, additionalBehaviors)
+ {
+ if (string.IsNullOrWhiteSpace(targetOSVersion))
+ {
+ throw new ArgumentNullException("targetOSVersion");
+ }
+
+ this.TargetOSVersion = targetOSVersion;
+ }
+
+ ///
+ /// The Azure Guest OS version to be installed on the virtual machines in the pool.
+ ///
+ public string TargetOSVersion { get; private set; }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs
new file mode 100644
index 000000000000..613a96523ec5
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/RebootComputeNodeParameters.cs
@@ -0,0 +1,34 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Azure.Commands.Batch.Models
+{
+ public class RebootComputeNodeParameters : ComputeNodeOperationParameters
+ {
+ public RebootComputeNodeParameters(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode,
+ IEnumerable additionalBehaviors = null)
+ : base(context, poolId, computeNodeId, computeNode, additionalBehaviors)
+ { }
+
+ ///
+ /// Specifies when to reboot the node and what to do with currently running tasks.
+ ///
+ public ComputeNodeRebootOption? RebootOption { get; set; }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs
new file mode 100644
index 000000000000..93a975b53b51
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Models/ReimageComputeNodeParameters.cs
@@ -0,0 +1,34 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Azure.Commands.Batch.Models
+{
+ public class ReimageComputeNodeParameters : ComputeNodeOperationParameters
+ {
+ public ReimageComputeNodeParameters(BatchAccountContext context, string poolId, string computeNodeId, PSComputeNode computeNode,
+ IEnumerable additionalBehaviors = null)
+ : base(context, poolId, computeNodeId, computeNode, additionalBehaviors)
+ { }
+
+ ///
+ /// Specifies when to reimage the node and what to do with currently running tasks.
+ ///
+ public ComputeNodeReimageOption? ReimageOption { get; set; }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs
new file mode 100644
index 000000000000..70ed5c563bc9
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Pools/SetBatchPoolOSVersionCommand.cs
@@ -0,0 +1,42 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Common;
+using Microsoft.Azure.Commands.Batch.Models;
+using System;
+using System.Management.Automation;
+using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
+
+namespace Microsoft.Azure.Commands.Batch
+{
+ [Cmdlet(VerbsCommon.Set, Constants.AzureBatchPoolOSVersion)]
+ public class SetBatchPoolOSVersionCommand : BatchObjectModelCmdletBase
+ {
+ [Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The id of the pool.")]
+ [ValidateNotNullOrEmpty]
+ public string Id { get; set; }
+
+ [Parameter(Position = 1, Mandatory = true, HelpMessage = "The Azure Guest OS version to be installed on the virtual machines in the pool.")]
+ [ValidateNotNullOrEmpty]
+ public string TargetOSVersion { get; set; }
+
+ public override void ExecuteCmdlet()
+ {
+ ChangeOSVersionParameters parameters = new ChangeOSVersionParameters(this.BatchContext, this.Id, null,
+ this.TargetOSVersion, this.AdditionalBehaviors);
+ BatchClient.ChangeOSVersion(parameters);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs
index 8d2c316e6cf5..816ba78f7b7e 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.Designer.cs
@@ -78,6 +78,15 @@ internal static string BeginMAMLCall {
}
}
+ ///
+ /// Looks up a localized string similar to Changing OS version of pool {0} to {1}..
+ ///
+ internal static string ChangeOSVersion {
+ get {
+ return ResourceManager.GetString("ChangeOSVersion", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Disabling automatic scaling on pool {0}..
///
@@ -699,6 +708,24 @@ internal static string RBU_RemoveUser {
}
}
+ ///
+ /// Looks up a localized string similar to Rebooting compute node {0}..
+ ///
+ internal static string RebootComputeNode {
+ get {
+ return ResourceManager.GetString("RebootComputeNode", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reimaging compute node {0}..
+ ///
+ internal static string ReimageComputeNode {
+ get {
+ return ResourceManager.GetString("ReimageComputeNode", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Looking up resource group for account {0}.
///
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx
index 585d1db1e443..ce140ecca5e9 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Properties/Resources.resx
@@ -123,6 +123,9 @@
Begin {0} call to RP
+
+ Changing OS version of pool {0} to {1}.
+
Disabling automatic scaling on pool {0}.
@@ -330,6 +333,12 @@
Removing user ...
+
+ Rebooting compute node {0}.
+
+
+ Reimaging compute node {0}.
+
Looking up resource group for account {0}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs
index 34a9e7f40ef4..f4b03d86b933 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch/Utils/Constants.cs
@@ -30,6 +30,7 @@ public class Constants
public const string AzureBatchNodeFileContent = "AzureBatchNodeFileContent";
public const string AzureBatchRemoteDesktopProtocolFile = "AzureBatchRemoteDesktopProtocolFile";
public const string AzureBatchAutoScale = "AzureBatchAutoScale";
+ public const string AzureBatchPoolOSVersion = "AzureBatchPoolOSVersion";
// Parameter sets
public const string IdParameterSet = "Id";