Skip to content

Commit

Permalink
ADL: Update the link for the release notes, add basic argument and re…
Browse files Browse the repository at this point in the history
…fresh tests (Azure#3351)

* ADL: Update the link for the release notes

using an aka.ms link to shorten it as well as be able to control the
link location outside of the new releases.

* Update tests and include new optional basic param

* Update change log and run latest autorest for ADLA

* Add test for basic param support and re-record.

* tested out the href, it doesn't work, reverting.
  • Loading branch information
begoldsm authored and shahabhijeet committed Jun 19, 2017
1 parent 4951f8f commit 20ceebb
Show file tree
Hide file tree
Showing 131 changed files with 3,279 additions and 3,427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.1.3-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="5.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.1.1-preview" />
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.6.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="6.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.2.0" />
<ProjectReference Include="..\Management.DataLake.Analytics\Microsoft.Azure.Management.DataLake.Analytics.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,37 @@ public void GetCatalogItemsTest()
commonData.DatabaseName, CommonTestFixture.SchemaName);

Assert.True(tableListResponse.Count() >= 1);
Assert.True(tableListResponse.ElementAt(0).ColumnList != null && tableListResponse.ElementAt(0).ColumnList.Count() > 0);

// look for the table we created
Assert.True(tableListResponse.Any(table => table.Name.Equals(commonData.TableName)));

// Get the table list with only basic info
tableListResponse = clientToUse.Catalog.ListTables(
commonData.SecondDataLakeAnalyticsAccountName,
commonData.DatabaseName, CommonTestFixture.SchemaName, basic: true);

Assert.True(tableListResponse.Count() >= 1);
Assert.True(tableListResponse.ElementAt(0).ColumnList == null || tableListResponse.ElementAt(0).ColumnList.Count() == 0);

// get the table list in just the db
tableListResponse = clientToUse.Catalog.ListTablesByDatabase(
commonData.SecondDataLakeAnalyticsAccountName,
commonData.DatabaseName);

Assert.True(tableListResponse.Count() >= 1);
Assert.True(tableListResponse.ElementAt(0).ColumnList != null && tableListResponse.ElementAt(0).ColumnList.Count > 0);

// look for the table we created
Assert.True(tableListResponse.Any(table => table.Name.Equals(commonData.TableName)));

// Get the table list in the db with only basic info
tableListResponse = clientToUse.Catalog.ListTablesByDatabase(
commonData.SecondDataLakeAnalyticsAccountName,
commonData.DatabaseName, basic: true);

Assert.True(tableListResponse.Count() >= 1);
Assert.True(tableListResponse.ElementAt(0).ColumnList == null || tableListResponse.ElementAt(0).ColumnList.Count() == 0);

// Get the specific table as well
var tableGetResponse = clientToUse.Catalog.GetTable(
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ internal partial class AccountOperations : IServiceOperations<DataLakeAnalyticsA
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.Equals("ResourceNotFound", StringComparison.OrdinalIgnoreCase))
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.ToLowerInvariant().Contains("resourcenotfound"))
{
var _toReturn = new AzureOperationResponse<bool>();
_toReturn.Request = _httpRequest;
Expand Down Expand Up @@ -390,7 +390,7 @@ internal partial class AccountOperations : IServiceOperations<DataLakeAnalyticsA
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.Equals("ResourceNotFound", StringComparison.OrdinalIgnoreCase))
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.ToLowerInvariant().Contains("resourcenotfound"))
{
var _toReturn = new AzureOperationResponse<bool>();
_toReturn.Request = _httpRequest;
Expand Down Expand Up @@ -597,7 +597,7 @@ internal partial class AccountOperations : IServiceOperations<DataLakeAnalyticsA
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.Equals("ResourceNotFound", StringComparison.OrdinalIgnoreCase))
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.ToLowerInvariant().Contains("resourcenotfound"))
{
var _toReturn = new AzureOperationResponse<bool>();
_toReturn.Request = _httpRequest;
Expand Down Expand Up @@ -793,7 +793,7 @@ internal partial class AccountOperations : IServiceOperations<DataLakeAnalyticsA
{
ex = new CloudException(_errorBody.Message);
ex.Body = _errorBody;
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.Equals("ResourceNotFound", StringComparison.OrdinalIgnoreCase))
if (_httpResponse.StatusCode == HttpStatusCode.NotFound && ex.Body.Code.ToLowerInvariant().Contains("resourcenotfound"))
{
var _toReturn = new AzureOperationResponse<bool>();
_toReturn.Request = _httpRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class DataLakeAnalyticsCustomizationHelper
/// This constant is used as the default package version to place in the user agent.
/// It should mirror the package version in the project.json file.
/// </summary>
internal const string PackageVersion = "3.0.0";
internal const string PackageVersion = "3.0.1";

internal const string DefaultAdlaDnsSuffix = "azuredatalakeanalytics.net";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

Expand Down Expand Up @@ -3208,6 +3208,12 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
/// resources included with the resources in the response, e.g.
/// Categories?$count=true. Optional.
/// </param>
/// <param name='basic'>
/// The basic switch indicates what level of information to return when listing
/// tables. When basic is true, only database_name, schema_name, table_name and
/// version are returned for each table, otherwise all table metadata is
/// returned. By default, it is false
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -3229,7 +3235,7 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IPage<USqlTable>>> ListTablesWithHttpMessagesAsync(string accountName, string databaseName, string schemaName, ODataQuery<USqlTable> odataQuery = default(ODataQuery<USqlTable>), string select = default(string), bool? count = default(bool?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IPage<USqlTable>>> ListTablesWithHttpMessagesAsync(string accountName, string databaseName, string schemaName, ODataQuery<USqlTable> odataQuery = default(ODataQuery<USqlTable>), string select = default(string), bool? count = default(bool?), bool? basic = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (accountName == null)
{
Expand Down Expand Up @@ -3264,6 +3270,7 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
tracingParameters.Add("schemaName", schemaName);
tracingParameters.Add("select", select);
tracingParameters.Add("count", count);
tracingParameters.Add("basic", basic);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListTables", tracingParameters);
}
Expand Down Expand Up @@ -3291,6 +3298,10 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
{
_queryParameters.Add(string.Format("$count={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(count, Client.SerializationSettings).Trim('"'))));
}
if (basic != null)
{
_queryParameters.Add(string.Format("basic={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(basic, Client.SerializationSettings).Trim('"'))));
}
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
Expand Down Expand Up @@ -7770,6 +7781,12 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
/// resources included with the resources in the response, e.g.
/// Categories?$count=true. Optional.
/// </param>
/// <param name='basic'>
/// The basic switch indicates what level of information to return when listing
/// tables. When basic is true, only database_name, schema_name, table_name and
/// version are returned for each table, otherwise all table metadata is
/// returned. By default, it is false
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -7791,7 +7808,7 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IPage<USqlTable>>> ListTablesByDatabaseWithHttpMessagesAsync(string accountName, string databaseName, ODataQuery<USqlTable> odataQuery = default(ODataQuery<USqlTable>), string select = default(string), bool? count = default(bool?), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IPage<USqlTable>>> ListTablesByDatabaseWithHttpMessagesAsync(string accountName, string databaseName, ODataQuery<USqlTable> odataQuery = default(ODataQuery<USqlTable>), string select = default(string), bool? count = default(bool?), bool? basic = false, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (accountName == null)
{
Expand Down Expand Up @@ -7821,6 +7838,7 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
tracingParameters.Add("databaseName", databaseName);
tracingParameters.Add("select", select);
tracingParameters.Add("count", count);
tracingParameters.Add("basic", basic);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListTablesByDatabase", tracingParameters);
}
Expand All @@ -7847,6 +7865,10 @@ internal CatalogOperations(DataLakeAnalyticsCatalogManagementClient client)
{
_queryParameters.Add(string.Format("$count={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(count, Client.SerializationSettings).Trim('"'))));
}
if (basic != null)
{
_queryParameters.Add(string.Format("basic={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(basic, Client.SerializationSettings).Trim('"'))));
}
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
Expand Down
Loading

0 comments on commit 20ceebb

Please sign in to comment.