Skip to content

Commit 26c2949

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into MoveRG
2 parents 99d39a1 + 5a3f209 commit 26c2949

File tree

65 files changed

+39011
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+39011
-215
lines changed

setup/azurecmdfiles.wxi

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,86 @@
10391039
<File Id="filC88533731E70921D92A27E14A101AA67" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DataLakeStore\System.Net.Http.Primitives.dll" />
10401040
</Component>
10411041
</Directory>
1042+
<Directory Id="dir58E771D29F659E11F33C1EBA94EBEC2D" Name="AzureRM.DevTestLabs">
1043+
<Component Id="cmpB88BB2B8DA875D258057401A820E82D6" Guid="*">
1044+
<File Id="filE1512C82B1E6F38CDFD909FFD8C61C64" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\AzureRM.DevTestLabs.psd1" />
1045+
</Component>
1046+
<Component Id="cmpA1B5A6E44F4AA5F83F5F833128F7F88C" Guid="*">
1047+
<File Id="fil34DDA5F1CA705FA914B33264B60E9063" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Hyak.Common.dll" />
1048+
</Component>
1049+
<Component Id="cmp0DE27F50365372076DCFEA168BA1F704" Guid="*">
1050+
<File Id="filCE437A49EC04F33E5792DED22BCA8265" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.ApplicationInsights.dll" />
1051+
</Component>
1052+
<Component Id="cmp9E0DFFF36454A0CCCD55D46E4B9D5172" Guid="*">
1053+
<File Id="filF4F94D44C62A75D435BF1BEA90D5BB31" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Commands.Common.Authentication.dll" />
1054+
</Component>
1055+
<Component Id="cmpCF89ADAF131C4033F0441CD44BD5AFF9" Guid="*">
1056+
<File Id="fil205FFF711F5DD305931CE792B77A1543" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Commands.DevTestLabs.dll" />
1057+
</Component>
1058+
<Component Id="cmp37FAA04E65FFB6C8EE670E0B399A4C4B" Guid="*">
1059+
<File Id="fil8D96409721F870078639327B83780780" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Commands.DevTestLabs.dll-help.xml" />
1060+
</Component>
1061+
<Component Id="cmp5CF65049FC814F526E247654745A53E7" Guid="*">
1062+
<File Id="filFC2BE14FE350849A72E404C9FE74EA06" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Commands.DevTestLabs.format.ps1xml" />
1063+
</Component>
1064+
<Component Id="cmp3AACB5F282D5119B062FAC3B33A61685" Guid="*">
1065+
<File Id="filD29866654988297A8F370E818F09464D" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Commands.ResourceManager.Common.dll" />
1066+
</Component>
1067+
<Component Id="cmp3F1C1F7F308468B14973DE21B2862307" Guid="*">
1068+
<File Id="filCA2520F020EC7EB68855EBF37788F829" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Common.dll" />
1069+
</Component>
1070+
<Component Id="cmpE037063BF3683AE4D6206BBB51BC3393" Guid="*">
1071+
<File Id="fil64C679BBEC5C703A85CEA99DE7E9C184" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Common.NetFramework.dll" />
1072+
</Component>
1073+
<Component Id="cmp18559E426D9575F9741C6BB896E36096" Guid="*">
1074+
<File Id="fil3FDE0768954463E11C3F755477EA3F82" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Graph.RBAC.dll" />
1075+
</Component>
1076+
<Component Id="cmp06CD6BDE473F792012CE7024813F220A" Guid="*">
1077+
<File Id="fil34B0A4BF46121307742C9608A85B8003" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Management.Authorization.dll" />
1078+
</Component>
1079+
<Component Id="cmp95F2278E8024575B268B5ADB26BF55E3" Guid="*">
1080+
<File Id="filE5725D3B7BFD6FFF3EF8DCC5B4A91494" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.Management.DevTestLabs.dll" />
1081+
</Component>
1082+
<Component Id="cmp01C0D7F5A138E257E63C9A88A6E77FB5" Guid="*">
1083+
<File Id="fil5635EAEB3333EBD39AAF49AF0D5535C9" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Azure.ResourceManager.dll" />
1084+
</Component>
1085+
<Component Id="cmp8E83AE26F1E00FEE33094F91A50BEA3B" Guid="*">
1086+
<File Id="fil3F680BC8D663CD94F9920DE902582C96" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.IdentityModel.Clients.ActiveDirectory.dll" />
1087+
</Component>
1088+
<Component Id="cmpA891C099DB11113B39543AD69C675E9B" Guid="*">
1089+
<File Id="fil921ECD30870D53869C92D3293E853BB1" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll" />
1090+
</Component>
1091+
<Component Id="cmp8CAF07EFCB05F51776BA5BEA4554C071" Guid="*">
1092+
<File Id="filD63E73224A8BE26DA2228345B68E6CA8" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll" />
1093+
</Component>
1094+
<Component Id="cmp6A0A2D259AAD3356C7AFB688CDA4A47C" Guid="*">
1095+
<File Id="fil359230F3E237917DC29FB7BA7F99AE42" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Rest.ClientRuntime.Azure.dll" />
1096+
</Component>
1097+
<Component Id="cmp724AB863284E427493220027492E6558" Guid="*">
1098+
<File Id="fil84DC56EE1E2FD15718311AB98B836D7A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Rest.ClientRuntime.dll" />
1099+
</Component>
1100+
<Component Id="cmp8B504DC756B33B280A040B03354E076F" Guid="*">
1101+
<File Id="filE30B5BC941217FCBFD4D78E9FF92379B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Threading.Tasks.dll" />
1102+
</Component>
1103+
<Component Id="cmp29859B59AA5924F9B341749722DCDA74" Guid="*">
1104+
<File Id="fil812D3F1EDB6D6913D3659F8CAE5866B1" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Threading.Tasks.Extensions.Desktop.dll" />
1105+
</Component>
1106+
<Component Id="cmpAD179DB6DE2B1ADA4F0D2A4C748CDBE3" Guid="*">
1107+
<File Id="filBF280B675F703FE665E717E9F9CFCDE0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.Threading.Tasks.Extensions.dll" />
1108+
</Component>
1109+
<Component Id="cmp80B3A88DDF9BA6022AECCC44EC0477CB" Guid="*">
1110+
<File Id="filA0C3BFD5608F6A7969F37114553FEE17" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Microsoft.WindowsAzure.Commands.Common.dll" />
1111+
</Component>
1112+
<Component Id="cmpD6AF7733620AB2358E00EF94FECC53C2" Guid="*">
1113+
<File Id="fil3E238BA2FD606E441BFCA83003D74FBA" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\Newtonsoft.Json.dll" />
1114+
</Component>
1115+
<Component Id="cmpAB0E5FD64EA113CCC48F82C9A5BBD201" Guid="*">
1116+
<File Id="filE65941C1DE1FB0E7D365F397FCCFE166" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\System.Net.Http.Extensions.dll" />
1117+
</Component>
1118+
<Component Id="cmp8E2A5F5E57FA3C8B0B10E001BD6239F4" Guid="*">
1119+
<File Id="filFF6D6D7957E08B162CE6FFCC7671D430" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.DevTestLabs\System.Net.Http.Primitives.dll" />
1120+
</Component>
1121+
</Directory>
10421122
<Directory Id="dirBE5D077687887D44002EBDDC946075AC" Name="AzureRM.Dns">
10431123
<Component Id="cmp0DA8E094A737664DAD35F560902CC483" Guid="*">
10441124
<File Id="fil9D4CF65AE0F85154DEC1518543311735" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Dns\AzureRM.Dns.psd1" />
@@ -5552,6 +5632,32 @@
55525632
<ComponentRef Id="cmp9A91C9468ED40A47206533F9EA4AE7DD" />
55535633
<ComponentRef Id="cmpAE21F7B8F8B0AD8015435FF85E820B14" />
55545634
<ComponentRef Id="cmp55C12CFB770FC05F3DEAE953E5D66663" />
5635+
<ComponentRef Id="cmpB88BB2B8DA875D258057401A820E82D6" />
5636+
<ComponentRef Id="cmpA1B5A6E44F4AA5F83F5F833128F7F88C" />
5637+
<ComponentRef Id="cmp0DE27F50365372076DCFEA168BA1F704" />
5638+
<ComponentRef Id="cmp9E0DFFF36454A0CCCD55D46E4B9D5172" />
5639+
<ComponentRef Id="cmpCF89ADAF131C4033F0441CD44BD5AFF9" />
5640+
<ComponentRef Id="cmp37FAA04E65FFB6C8EE670E0B399A4C4B" />
5641+
<ComponentRef Id="cmp5CF65049FC814F526E247654745A53E7" />
5642+
<ComponentRef Id="cmp3AACB5F282D5119B062FAC3B33A61685" />
5643+
<ComponentRef Id="cmp3F1C1F7F308468B14973DE21B2862307" />
5644+
<ComponentRef Id="cmpE037063BF3683AE4D6206BBB51BC3393" />
5645+
<ComponentRef Id="cmp18559E426D9575F9741C6BB896E36096" />
5646+
<ComponentRef Id="cmp06CD6BDE473F792012CE7024813F220A" />
5647+
<ComponentRef Id="cmp95F2278E8024575B268B5ADB26BF55E3" />
5648+
<ComponentRef Id="cmp01C0D7F5A138E257E63C9A88A6E77FB5" />
5649+
<ComponentRef Id="cmp8E83AE26F1E00FEE33094F91A50BEA3B" />
5650+
<ComponentRef Id="cmpA891C099DB11113B39543AD69C675E9B" />
5651+
<ComponentRef Id="cmp8CAF07EFCB05F51776BA5BEA4554C071" />
5652+
<ComponentRef Id="cmp6A0A2D259AAD3356C7AFB688CDA4A47C" />
5653+
<ComponentRef Id="cmp724AB863284E427493220027492E6558" />
5654+
<ComponentRef Id="cmp8B504DC756B33B280A040B03354E076F" />
5655+
<ComponentRef Id="cmp29859B59AA5924F9B341749722DCDA74" />
5656+
<ComponentRef Id="cmpAD179DB6DE2B1ADA4F0D2A4C748CDBE3" />
5657+
<ComponentRef Id="cmp80B3A88DDF9BA6022AECCC44EC0477CB" />
5658+
<ComponentRef Id="cmpD6AF7733620AB2358E00EF94FECC53C2" />
5659+
<ComponentRef Id="cmpAB0E5FD64EA113CCC48F82C9A5BBD201" />
5660+
<ComponentRef Id="cmp8E2A5F5E57FA3C8B0B10E001BD6239F4" />
55555661
<ComponentRef Id="cmp0DA8E094A737664DAD35F560902CC483" />
55565662
<ComponentRef Id="cmp9AADE49B40AE34E78613184F68A0C602" />
55575663
<ComponentRef Id="cmp6739EA963462CB23B33E80066E3DDCF1" />

src/Common/Commands.ScenarioTests.Common/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class Category
5858

5959
public const string Network = "Network";
6060

61+
public const string DevTestLabs = "DevTestLabs";
62+
6163
// Owners
6264
public const string OneSDK = "OneSDK";
6365

src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System.Net.Http;
2727
using System.Reflection;
2828
using System.Threading.Tasks;
29+
using Microsoft.Azure.Commands.Batch.Models;
2930
using Xunit;
3031
using ProxyModels = Microsoft.Azure.Batch.Protocol.Models;
3132

@@ -129,21 +130,18 @@ public static void AssertBatchAccountContextsAreEqual(BatchAccountContext contex
129130
public static RequestInterceptor CreateFakeServiceResponseInterceptor<TOptions, TResponse>(TResponse responseToUse = default(TResponse),
130131
Action<BatchRequest<TOptions, TResponse>> requestAction = null)
131132
where TOptions : ProxyModels.IOptions, new()
132-
where TResponse : IAzureOperationResponse, new()
133+
where TResponse : class, IAzureOperationResponse, new()
133134
{
134135
RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
135136
{
136137
BatchRequest<TOptions, TResponse> request = (BatchRequest<TOptions, TResponse>)baseRequest;
137138

138139
request.ServiceRequestFunc = (cancellationToken) =>
139140
{
140-
if (responseToUse == null)
141+
responseToUse = responseToUse ?? new TResponse()
141142
{
142-
responseToUse = new TResponse()
143-
{
144-
Response = new HttpResponseMessage()
145-
};
146-
}
143+
Response = new HttpResponseMessage()
144+
};
147145

148146
if (requestAction != null)
149147
{
@@ -645,6 +643,26 @@ public static RequestInterceptor CreateFakeGetFileAndPropertiesFromComputeNodeRe
645643
return response;
646644
}
647645

646+
/// <summary>
647+
/// Builds a TaskAddCollectionResponse object
648+
/// </summary>
649+
public static AzureOperationResponse<ProxyModels.TaskAddCollectionResult, ProxyModels.TaskAddCollectionHeaders> CreateTaskCollectionResponse(PSCloudTask[] taskCollection)
650+
{
651+
Func<PSCloudTask, ProxyModels.TaskAddResult> mappingFunc =
652+
t => new ProxyModels.TaskAddResult(ProxyModels.TaskAddStatus.Success, t.Id);
653+
654+
var taskAddResults = taskCollection.Select(mappingFunc);
655+
656+
var response = new AzureOperationResponse
657+
<ProxyModels.TaskAddCollectionResult, ProxyModels.TaskAddCollectionHeaders>()
658+
{
659+
Response = new HttpResponseMessage(HttpStatusCode.Created),
660+
Body = new ProxyModels.TaskAddCollectionResult(taskAddResults.ToList())
661+
};
662+
663+
return response;
664+
}
665+
648666
/// <summary>
649667
/// Builds a CloudTaskListSubtasksResponse object
650668
/// </summary>

src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,9 @@
674674
<None Include="SessionRecords\Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests\TestCreateTask.json">
675675
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
676676
</None>
677+
<None Include="SessionRecords\Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests\TestCreateTaskCollection.json">
678+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
679+
</None>
677680
<None Include="SessionRecords\Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests\TestDeleteTask.json">
678681
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
679682
</None>

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchApplicationTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function Test-CreatePoolWithApplicationPackage
112112
{
113113
Remove-AzureRmBatchApplicationPackage -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName -ApplicationVersion $applicationVersion
114114
Remove-AzureRmBatchApplication -AccountName $context.AccountName -ApplicationId $applicationId -ResourceGroupName $context.ResourceGroupName
115-
Remove-AzureBatchPool -Id $poolId -Force -BatchContext $context
115+
Remove-AzureBatchPool -Id $poolId -Force -BatchContext $context
116116
}
117117
}
118118

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,28 @@ public void TestCreateTask()
4747
TestUtilities.GetCurrentMethodName());
4848
}
4949

50+
[Fact]
51+
[Trait(Category.AcceptanceType, Category.CheckIn)]
52+
public void TestCreateTaskCollection()
53+
{
54+
BatchController controller = BatchController.NewInstance;
55+
string jobId = "createTaskCollectionJob";
56+
BatchAccountContext context = null;
57+
controller.RunPsTestWorkflow(
58+
() => { return new string[] { string.Format("Test-CreateTaskCollection '{0}'", jobId) }; },
59+
() =>
60+
{
61+
context = new ScenarioTestContext();
62+
ScenarioTestHelpers.CreateTestJob(controller, context, jobId);
63+
},
64+
() =>
65+
{
66+
ScenarioTestHelpers.DeleteJob(controller, context, jobId);
67+
},
68+
TestUtilities.GetCallingClass(),
69+
TestUtilities.GetCurrentMethodName());
70+
}
71+
5072
[Fact]
5173
public void TestGetTaskById()
5274
{

0 commit comments

Comments
 (0)