Skip to content

Commit 9e72ddb

Browse files
authored
Merge pull request #672 from Azure/dev
huangpf PR: dev <- Azure:dev
2 parents 75cc8b7 + e5d7c2f commit 9e72ddb

File tree

111 files changed

+19859
-52053
lines changed

Some content is hidden

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

111 files changed

+19859
-52053
lines changed

documentation/breaking-changes/upcoming-breaking-changes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@
2525
https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-change-template.md
2626
-->
2727

28-
# Upcoming Breaking Changes
28+
# Upcoming Breaking Changes
29+

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@
6262
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6363
<Private>True</Private>
6464
</Reference>
65-
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66-
<SpecificVersion>False</SpecificVersion>
67-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.0.12.6-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
65+
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics">
66+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.1.0.1-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
6867
<Private>True</Private>
6968
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
69+
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7170
<SpecificVersion>False</SpecificVersion>
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.0.12.8-preview\lib\net45\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.1.0.2-preview\lib\net45\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
7372
<Private>True</Private>
7473
</Reference>
7574
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaAliasTests/TestAdlaAccount.json

Lines changed: 842 additions & 884 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaAliasTests/TestAdlaCatalog.json

Lines changed: 711 additions & 31815 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaAliasTests/TestAdlaJob.json

Lines changed: 267 additions & 321 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaAliasTests/TestNegativeAdlaAccount.json

Lines changed: 305 additions & 347 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaAliasTests/TestNegativeAdlaJob.json

Lines changed: 234 additions & 288 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaTests/TestAdlaAccount.json

Lines changed: 774 additions & 888 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaTests/TestAdlaCatalog.json

Lines changed: 712 additions & 955 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaTests/TestAdlaJob.json

Lines changed: 412 additions & 322 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaTests/TestNegativeAdlaAccount.json

Lines changed: 257 additions & 371 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/SessionRecords/Microsoft.Azure.Commands.DataLakeAnalytics.Test.ScenarioTests.AdlaTests/TestNegativeAdlaJob.json

Lines changed: 227 additions & 281 deletions
Large diffs are not rendered by default.

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
66
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="0.12.6-preview" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Management.DataLake.Store" version="0.12.8-preview" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="1.0.1-preview" targetFramework="net45" />
9+
<package id="Microsoft.Azure.Management.DataLake.Store" version="1.0.2-preview" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.ResourceManager" version="1.1.1-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" targetFramework="net45" />

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
<Reference Include="Microsoft.Azure.Common.NetFramework">
4646
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
4747
</Reference>
48-
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
48+
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
4949
<SpecificVersion>False</SpecificVersion>
50-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.0.12.6-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
50+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.1.0.1-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
5151
<Private>True</Private>
5252
</Reference>
5353
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -138,6 +138,12 @@
138138
<Compile Include="Commands\NewAzureRmDataLakeAnalyticsAccount.cs" />
139139
<Compile Include="Commands\RemoveAzureRmDataLakeAnalyticsAccount.cs" />
140140
<Compile Include="Commands\SetAzureRmDataLakeAnalyticsAccount.cs" />
141+
<Compile Include="Models\PSDataLakeStoreAccountInfo.cs" />
142+
<Compile Include="Models\PSStorageAccountInfo.cs" />
143+
<Compile Include="Models\PSStorageAccountInfoProperties.cs" />
144+
<Compile Include="Models\PSDataLakeStoreAccountInfoProperties.cs" />
145+
<Compile Include="Models\PSDataLakeAnalyticsAccountProperties.cs" />
146+
<Compile Include="Models\PSDataLakeAnalyticsAccount.cs" />
141147
<Compile Include="Models\ObsoleteUSqlCredential.cs" />
142148
<Compile Include="Models\AdlDataSource.cs" />
143149
<Compile Include="Models\CatalogPathInstance.cs" />

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/AddAzureRmDataLakeAnalyticsDataSource.cs

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,6 @@ public class AddAzureDataLakeAnalyticsDataSource : DataLakeAnalyticsCmdletBase
5353
[ValidateNotNullOrEmpty]
5454
public string AccessKey { get; set; }
5555

56-
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false,
57-
ParameterSetName = DataLakeParameterSetName,
58-
HelpMessage =
59-
"Optionally indicates that this should now be the default storage account for the DataLakeAnalytics account."
60-
)]
61-
[ValidateNotNullOrEmpty]
62-
public SwitchParameter Default { get; set; }
63-
6456
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = false,
6557
ParameterSetName = DataLakeParameterSetName,
6658
HelpMessage =
@@ -79,10 +71,8 @@ public override void ExecuteCmdlet()
7971
var toAdd = new StorageAccountInfo
8072
{
8173
Name = Blob,
82-
Properties = new StorageAccountProperties
83-
{
84-
AccessKey = AccessKey
85-
}
74+
AccessKey = AccessKey
75+
8676
};
8777

8878
DataLakeAnalyticsClient.AddStorageAccount(ResourceGroupName, Account, toAdd);
@@ -91,16 +81,10 @@ public override void ExecuteCmdlet()
9181
{
9282
var toAdd = new DataLakeStoreAccountInfo
9383
{
94-
Name = DataLakeStore,
95-
Properties = new DataLakeStoreAccountInfoProperties()
84+
Name = DataLakeStore
9685
};
9786

9887
DataLakeAnalyticsClient.AddDataLakeStoreAccount(ResourceGroupName, Account, toAdd);
99-
100-
if (Default)
101-
{
102-
DataLakeAnalyticsClient.SetDefaultDataLakeStoreAccount(ResourceGroupName, Account, toAdd);
103-
}
10488
}
10589
}
10690
}

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
using Microsoft.Azure.Commands.DataLakeAnalytics.Models;
1616
using Microsoft.Azure.Management.DataLake.Analytics.Models;
1717
using System.Collections.Generic;
18+
using System.Linq;
1819
using System.Management.Automation;
1920

2021
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2122
{
2223
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsAccount", DefaultParameterSetName = BaseParameterSetName),
23-
OutputType(typeof(List<DataLakeAnalyticsAccount>), typeof(DataLakeAnalyticsAccount))]
24+
OutputType(typeof(List<DataLakeAnalyticsAccount>), typeof(PSDataLakeAnalyticsAccount))]
2425
[Alias("Get-AdlAnalyticsAccount")]
2526
public class GetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
2627
{
@@ -46,13 +47,14 @@ public override void ExecuteCmdlet()
4647
if (!string.IsNullOrEmpty(Name))
4748
{
4849
// Get for single account
49-
WriteObject(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name));
50+
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name)));
5051
}
5152
else
5253
{
5354
// List all accounts in given resource group if avaliable otherwise all accounts in the subscription
54-
var list = DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null);
55-
WriteObject(list, true);
55+
WriteObject(DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null)
56+
.Select(element => new PSDataLakeAnalyticsAccount(element))
57+
.ToList(), true);
5658
}
5759
}
5860
}

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsDataSource.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2222
{
23-
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsDataSource", DefaultParameterSetName = ListStorageParameterSetName), OutputType(typeof(StorageAccountInfo), typeof(DataLakeStoreAccountInfo), typeof(IEnumerable<AdlDataSource>))]
23+
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsDataSource", DefaultParameterSetName = ListStorageParameterSetName), OutputType(typeof(PSStorageAccountInfo), typeof(PSDataLakeStoreAccountInfo), typeof(IEnumerable<AdlDataSource>))]
2424
[Alias("Get-AdlAnalyticsDataSource")]
2525
public class GetAzureDataLakeAnalyticsDataSource : DataLakeAnalyticsCmdletBase
2626
{
@@ -70,11 +70,11 @@ public override void ExecuteCmdlet()
7070
{
7171
if (ParameterSetName.Equals(BlobParameterSetName, StringComparison.InvariantCultureIgnoreCase))
7272
{
73-
WriteObject(DataLakeAnalyticsClient.GetStorageAccount(ResourceGroupName, Account, Blob));
73+
WriteObject(new PSStorageAccountInfo(DataLakeAnalyticsClient.GetStorageAccount(ResourceGroupName, Account, Blob)));
7474
}
7575
else if ((ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase)))
7676
{
77-
WriteObject(DataLakeAnalyticsClient.GetDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore));
77+
WriteObject(new PSDataLakeStoreAccountInfo(DataLakeAnalyticsClient.GetDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore)));
7878
}
7979
else
8080
{

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsAccount.cs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2323
{
24-
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))]
24+
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(PSDataLakeAnalyticsAccount))]
2525
[Alias("New-AdlAnalyticsAccount")]
2626
public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
2727
{
@@ -54,6 +54,24 @@ public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
5454
[ValidateNotNull]
5555
public Hashtable Tags { get; set; }
5656

57+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
58+
HelpMessage = "The maximum supported degree of parallelism for this account.")]
59+
[ValidateNotNull]
60+
[ValidateRange(1, int.MaxValue)]
61+
public int? MaxDegreeOfParallelism { get; set; }
62+
63+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
64+
HelpMessage = "The maximum supported jobs running under the account at the same time.")]
65+
[ValidateNotNull]
66+
[ValidateRange(1, int.MaxValue)]
67+
public int? MaxJobCount { get; set; }
68+
69+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
70+
HelpMessage = "The number of days that job metadata is retained.")]
71+
[ValidateNotNull]
72+
[ValidateRange(1, 180)]
73+
public int? QueryStoreRetention { get; set; }
74+
5775
public override void ExecuteCmdlet()
5876
{
5977
try
@@ -87,8 +105,8 @@ public override void ExecuteCmdlet()
87105
Name = DefaultDataLakeStore
88106
};
89107

90-
WriteObject(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, Location, defaultStorage,
91-
customTags: Tags));
108+
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, Location, defaultStorage,
109+
customTags: Tags, maxDegreeOfParallelism: MaxDegreeOfParallelism, maxJobCount: MaxJobCount, queryStoreRetention: QueryStoreRetention)));
92110
}
93111
}
94112
}

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/NewAzureRmDataLakeAnalyticsCatalogSecret.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public override void ExecuteCmdlet()
7272

7373
var toUse = Uri ?? new Uri(string.Format("https://{0}:{1}", DatabaseHost, Port));
7474

75-
WriteObject(DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName,
76-
Secret.GetNetworkCredential().Password, toUse.AbsoluteUri));
75+
DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName,
76+
Secret.GetNetworkCredential().Password, toUse.AbsoluteUri);
7777
}
7878
}
7979
}

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/SetAzureRmDataLakeAnalyticsAccount.cs

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2121
{
22-
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))]
22+
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(PSDataLakeAnalyticsAccount))]
2323
[Alias("Set-AdlAnalyticsAccount")]
2424
public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
2525
{
@@ -29,36 +29,39 @@ public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
2929
public string Name { get; set; }
3030

3131
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false,
32-
HelpMessage =
33-
"Name of the new Data Lake account to set as the default storage for this DataLakeAnalytics account.")]
34-
[ValidateNotNullOrEmpty]
35-
public string DefaultDataLakeStore { get; set; }
36-
37-
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false,
3832
HelpMessage =
3933
"A string,string dictionary of tags associated with this account that should replace the current set of tags"
4034
)]
4135
[ValidateNotNull]
4236
public Hashtable Tags { get; set; }
4337

44-
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = false,
38+
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false,
4539
HelpMessage = "Name of resource group under which you want to update the account.")]
4640
[ValidateNotNullOrEmpty]
4741
public string ResourceGroupName { get; set; }
4842

43+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
44+
HelpMessage = "The maximum supported degree of parallelism for this account.")]
45+
[ValidateNotNull]
46+
[ValidateRange(1, int.MaxValue)]
47+
public int? MaxDegreeOfParallelism { get; set; }
48+
49+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
50+
HelpMessage = "The maximum supported jobs running under the account at the same time.")]
51+
[ValidateNotNull]
52+
[ValidateRange(1, int.MaxValue)]
53+
public int? MaxJobCount { get; set; }
54+
55+
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false,
56+
HelpMessage = "The number of days that job metadata is retained.")]
57+
[ValidateNotNull]
58+
[ValidateRange(1, 180)]
59+
public int? QueryStoreRetention { get; set; }
60+
4961
public override void ExecuteCmdlet()
5062
{
51-
DataLakeStoreAccountInfo defaultAccount = null;
52-
if (!string.IsNullOrEmpty(DefaultDataLakeStore))
53-
{
54-
defaultAccount = new DataLakeStoreAccountInfo
55-
{
56-
Name = DefaultDataLakeStore
57-
};
58-
}
59-
60-
WriteObject(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, null, defaultAccount,
61-
null, null, Tags));
63+
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, null, null,
64+
null, null, Tags, MaxDegreeOfParallelism, MaxJobCount, QueryStoreRetention)));
6265
}
6366
}
6467
}

0 commit comments

Comments
 (0)