Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DNS SDK for 2017-10-01 API Version #4118

Merged
merged 6 commits into from
Mar 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/SDKs/Dns/AzSdk.RP.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>Network_2017-10-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
57 changes: 32 additions & 25 deletions src/SDKs/Dns/Dns.Tests/ScenarioTests/RecordSetScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,19 +466,18 @@ public void ListRecordsInZoneAcrossTypes()
ListRecordsInZone(isCrossType: true);
}

[Fact(Skip = "needs re-recording. XUnit released version will not support overloaded test names")]
[Fact]
public void ListRecordsInZoneWithSuffixAcrossTypes()
{
ListRecordsInZoneWithSuffixCrossType(isCrossType: true);
}

[Fact(Skip ="needs re-recording. XUnit released version will not support overloaded test names")]
[Fact]
public void ListRecordsInZoneWithSuffix()
{
ListRecordsInZoneWithSuffixCrossType(isCrossType: false);
}


private void ListRecordsInZone(
bool isCrossType,
[System.Runtime.CompilerServices.CallerMemberName] string methodName
Expand All @@ -505,32 +504,40 @@ [System.Runtime.CompilerServices.CallerMemberName] string methodName

if (isCrossType)
{
var listresponse = testContext.DnsClient.RecordSets
var listresponse1 = testContext.DnsClient.RecordSets
.ListByDnsZone(
testContext.ResourceGroup.Name,
testContext.ZoneName);

// not checking for the record count as this will return standard SOA and auth NS records as well
Assert.NotNull(listresponse);
Assert.True(
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[0],
recordSetReturned.Name))
&&
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[1],
recordSetReturned.Name))
&&
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[2],
recordSetReturned.Name)),
"The returned records do not meet expectations");
var listresponse2 = testContext.DnsClient.RecordSets
.ListAllByDnsZone(
testContext.ResourceGroup.Name,
testContext.ZoneName);

foreach (var listresponse in new[] { listresponse1, listresponse2 })
{
// not checking for the record count as this will return standard SOA and auth NS records as well
Assert.NotNull(listresponse);
Assert.True(
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[0],
recordSetReturned.Name))
&&
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[1],
recordSetReturned.Name))
&&
listresponse.Any(
recordSetReturned =>
string.Equals(
recordSetNames[2],
recordSetReturned.Name)),
"The returned records do not meet expectations");
}
}
else
{
Expand Down
19 changes: 19 additions & 0 deletions src/SDKs/Dns/Dns.Tests/ScenarioTests/ZoneScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,25 @@ public void CrudZoneFullCycle()
assertZoneInvariants(updateResponse);
Assert.Equal(3, updateResponse.Tags.Count);

// Call Patch operation
retrievedZone.Tags = new Dictionary<string, string>
{
{"tag1", "value1"},
{"tag2", "value2"},
{"tag3", "value3"},
{"tag4", "value4"}
};

updateResponse =
dnsClient.Zones.Update(
resourceGroup.Name,
zoneName,
ifMatch: null,
tags: retrievedZone.Tags);

assertZoneInvariants(updateResponse);
Assert.Equal(4, updateResponse.Tags.Count);

// Delete the zone
DeleteZones(dnsClient, resourceGroup, new[] {zoneName});
}
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.

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.

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.

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.

6 changes: 3 additions & 3 deletions src/SDKs/Dns/Management.Dns/Generated/DnsManagementClient.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
Expand Down Expand Up @@ -288,7 +288,7 @@ private void Initialize()
RecordSets = new RecordSetsOperations(this);
Zones = new ZonesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2017-09-01";
ApiVersion = "2017-10-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down
4 changes: 2 additions & 2 deletions src/SDKs/Dns/Management.Dns/Generated/IDnsManagementClient.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
Expand Down
61 changes: 59 additions & 2 deletions src/SDKs/Dns/Management.Dns/Generated/IRecordSetsOperations.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
Expand Down Expand Up @@ -253,6 +253,41 @@ public partial interface IRecordSetsOperations
/// </exception>
Task<AzureOperationResponse<IPage<RecordSet>>> ListByDnsZoneWithHttpMessagesAsync(string resourceGroupName, string zoneName, int? top = default(int?), string recordsetnamesuffix = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists all record sets in a DNS zone.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='zoneName'>
/// The name of the DNS zone (without a terminating dot).
/// </param>
/// <param name='top'>
/// The maximum number of record sets to return. If not specified,
/// returns up to 100 record sets.
/// </param>
/// <param name='recordSetNameSuffix'>
/// The suffix label of the record set name that has to be used to
/// filter the record set enumerations. If this parameter is specified,
/// Enumeration will return only records that end with
/// .&lt;recordSetNameSuffix&gt;
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<RecordSet>>> ListAllByDnsZoneWithHttpMessagesAsync(string resourceGroupName, string zoneName, int? top = default(int?), string recordSetNameSuffix = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists the record sets of a specified type in a DNS zone.
/// </summary>
/// <param name='nextPageLink'>
Expand Down Expand Up @@ -296,5 +331,27 @@ public partial interface IRecordSetsOperations
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<RecordSet>>> ListByDnsZoneNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists all record sets in a DNS zone.
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<RecordSet>>> ListAllByDnsZoneNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
37 changes: 35 additions & 2 deletions src/SDKs/Dns/Management.Dns/Generated/IZonesOperations.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
Expand Down Expand Up @@ -116,6 +116,39 @@ public partial interface IZonesOperations
/// </exception>
Task<AzureOperationResponse<Zone>> GetWithHttpMessagesAsync(string resourceGroupName, string zoneName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Updates a DNS zone. Does not modify DNS records within the zone.
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
/// </param>
/// <param name='zoneName'>
/// The name of the DNS zone (without a terminating dot).
/// </param>
/// <param name='ifMatch'>
/// The etag of the DNS zone. Omit this value to always overwrite the
/// current zone. Specify the last-seen etag value to prevent
/// accidentally overwritting any concurrent changes.
/// </param>
/// <param name='tags'>
/// Resource tags.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<Zone>> UpdateWithHttpMessagesAsync(string resourceGroupName, string zoneName, string ifMatch = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists the DNS zones within a resource group.
/// </summary>
/// <param name='resourceGroupName'>
Expand Down
7 changes: 3 additions & 4 deletions src/SDKs/Dns/Management.Dns/Generated/Models/ARecord.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns.Models
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Azure.Management.Dns;
using Newtonsoft.Json;
using System.Linq;

Expand All @@ -24,7 +23,7 @@ public partial class ARecord
/// </summary>
public ARecord()
{
CustomInit();
CustomInit();
}

/// <summary>
Expand Down
7 changes: 3 additions & 4 deletions src/SDKs/Dns/Management.Dns/Generated/Models/AaaaRecord.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns.Models
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Azure.Management.Dns;
using Newtonsoft.Json;
using System.Linq;

Expand All @@ -24,7 +23,7 @@ public partial class AaaaRecord
/// </summary>
public AaaaRecord()
{
CustomInit();
CustomInit();
}

/// <summary>
Expand Down
7 changes: 3 additions & 4 deletions src/SDKs/Dns/Management.Dns/Generated/Models/CaaRecord.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Dns.Models
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Azure.Management.Dns;
using Newtonsoft.Json;
using System.Linq;

Expand All @@ -24,7 +23,7 @@ public partial class CaaRecord
/// </summary>
public CaaRecord()
{
CustomInit();
CustomInit();
}

/// <summary>
Expand Down
Loading