Skip to content
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
6 changes: 6 additions & 0 deletions src/SDKs/Dns/Dns.Tests/Dns.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.ResourceManager" Version="1.6.0-preview" />
</ItemGroup>

<ItemGroup>
<!--<PackageReference Include="Microsoft.Azure.Management.Dns" Version="1.8.0-preview" />-->
Expand All @@ -25,4 +28,7 @@
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="15.3.0" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karravi-msft this has been long ignore for your RP. Please use latest version of ResourceManager nuget 1.6.0 (at least) and re-record your tests.
This has been long been ignored because there have been cases where your nuget has to meet some deadline.
Please use the latest version of Resource manager nuget for your testing your management client.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved

</ItemGroup>
</Project>
24 changes: 20 additions & 4 deletions src/SDKs/Dns/Dns.Tests/ScenarioTests/RecordSetScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ public RecordSet GetNewTestRecordSkeleton(
string recordSetName,
uint ttl = 42)
{
return new RecordSet
return new RecordSet(name: recordSetName)
{
Name = recordSetName,
Etag = null,
TTL = ttl,
};
Expand Down Expand Up @@ -221,7 +220,7 @@ public void CrudRecordSetFullCycle()
ifMatch: null);

// Delete the zone
var deleteResponse = testContext.DnsClient.Zones.Delete(
testContext.DnsClient.Zones.Delete(
testContext.ResourceGroup.Name,
testContext.ZoneName,
ifMatch: null);
Expand Down Expand Up @@ -359,6 +358,23 @@ public void CreateGetTxt()
this.RecordSetCreateGet(RecordType.TXT, setTestRecords);
}

[Fact]
public void CreateGetCaa()
{
Action<RecordSet> setTestRecords = createParams =>
{
createParams.CaaRecords = new List<CaaRecord>
{
new CaaRecord() { Flags = 0, Tag = "issue", Value = "contoso.com" },
new CaaRecord() { Flags = 0, Tag = "issue", Value = "fabrikam.com" },
};

return;
};

this.RecordSetCreateGet(RecordType.CAA, setTestRecords);
}

[Fact]
public void CreateGetCname()
{
Expand Down Expand Up @@ -832,7 +848,7 @@ [System.Runtime.CompilerServices.CallerMemberName] string methodName
recordType,
ifMatch: null);

var deleteResponse = testContext.DnsClient.Zones.Delete(
testContext.DnsClient.Zones.Delete(
testContext.ResourceGroup.Name,
testContext.ZoneName,
ifMatch: null);
Expand Down
16 changes: 4 additions & 12 deletions src/SDKs/Dns/Dns.Tests/ScenarioTests/ZoneScenarioTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,16 @@ public void UpdateZonePreconditionFailed()
null),
ex => ex.Body.Code == "PreconditionFailed");

var result = dnsClient.Zones.Delete(
dnsClient.Zones.Delete(
resourceGroup.Name,
zoneName,
ifMatch: null);
Assert.Equal(result.Status, OperationStatus.Succeeded);

result = dnsClient.Zones.Delete(
dnsClient.Zones.Delete(
resourceGroup.Name,
"hiya.com",
ifMatch: null);
Assert.Null(result);
//Assert.Null(result);
}
}

Expand Down Expand Up @@ -536,10 +535,6 @@ public void CrudZoneSetsTheCurrentAndMaxRecordSetNumbersInResponse()
new Zone
{
Location = location,
MaxNumberOfRecordSets = 42,
// Test that specifying this value does not break Create (it must be ignored on server side).
NumberOfRecordSets = 65,
// Test that specifying this value does not break Create (it must be ignored on server side).
});

// Retrieve the zone after create
Expand All @@ -554,8 +549,6 @@ public void CrudZoneSetsTheCurrentAndMaxRecordSetNumbersInResponse()
{
{"tag1", "value1"}
};
retrievedZone.NumberOfRecordSets = null;
retrievedZone.MaxNumberOfRecordSets = null;

// Delete the zone
DeleteZones(dnsClient, resourceGroup, new[] {zoneName});
Expand Down Expand Up @@ -592,10 +585,9 @@ public static void DeleteZones(
{
foreach (string zoneName in zoneNames)
{
var response = dnsClient.Zones.Delete(
dnsClient.Zones.Delete(
resourceGroup.Name,
zoneName);
Assert.True(response.Status == OperationStatus.Succeeded);
}
}

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.

43 changes: 21 additions & 22 deletions src/SDKs/Dns/Management.Dns/Generated/DnsManagementClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
// 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.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Dns
{
using Azure;
using Management;
using Rest;
using Rest.Azure;
using Rest.Serialization;
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
using Models;
using Newtonsoft.Json;
using System.Collections;
Expand All @@ -34,12 +34,12 @@ public partial class DnsManagementClient : ServiceClient<DnsManagementClient>, I
/// <summary>
/// Gets or sets json serialization settings.
/// </summary>
public Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; private set; }
public JsonSerializerSettings SerializationSettings { get; private set; }

/// <summary>
/// Gets or sets json deserialization settings.
/// </summary>
public Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; private set; }
public JsonSerializerSettings DeserializationSettings { get; private set; }

/// <summary>
/// Credentials needed for the client to connect to Azure.
Expand Down Expand Up @@ -90,7 +90,7 @@ public partial class DnsManagementClient : ServiceClient<DnsManagementClient>, I
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected DnsManagementClient(params System.Net.Http.DelegatingHandler[] handlers) : base(handlers)
protected DnsManagementClient(params DelegatingHandler[] handlers) : base(handlers)
{
Initialize();
}
Expand All @@ -104,7 +104,7 @@ protected DnsManagementClient(params System.Net.Http.DelegatingHandler[] handler
/// <param name='handlers'>
/// Optional. The delegating handlers to add to the http client pipeline.
/// </param>
protected DnsManagementClient(System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : base(rootHandler, handlers)
protected DnsManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers)
{
Initialize();
}
Expand All @@ -121,7 +121,7 @@ protected DnsManagementClient(System.Net.Http.HttpClientHandler rootHandler, par
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
protected DnsManagementClient(System.Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
protected DnsManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
Expand All @@ -145,7 +145,7 @@ protected DnsManagementClient(System.Uri baseUri, params System.Net.Http.Delegat
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
protected DnsManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
protected DnsManagementClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
Expand All @@ -166,7 +166,7 @@ protected DnsManagementClient(System.Uri baseUri, System.Net.Http.HttpClientHand
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public DnsManagementClient(ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
public DnsManagementClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (credentials == null)
{
Expand Down Expand Up @@ -194,7 +194,7 @@ public DnsManagementClient(ServiceClientCredentials credentials, params System.N
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public DnsManagementClient(ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
public DnsManagementClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (credentials == null)
{
Expand Down Expand Up @@ -222,7 +222,7 @@ public DnsManagementClient(ServiceClientCredentials credentials, System.Net.Http
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public DnsManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers) : this(handlers)
public DnsManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers)
{
if (baseUri == null)
{
Expand Down Expand Up @@ -258,7 +258,7 @@ public DnsManagementClient(System.Uri baseUri, ServiceClientCredentials credenti
/// <exception cref="System.ArgumentNullException">
/// Thrown when a required parameter is null
/// </exception>
public DnsManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers) : this(rootHandler, handlers)
public DnsManagementClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers)
{
if (baseUri == null)
{
Expand Down Expand Up @@ -288,32 +288,32 @@ private void Initialize()
RecordSets = new RecordSetsOperations(this);
Zones = new ZonesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2016-04-01";
ApiVersion = "2017-09-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
SerializationSettings = new Newtonsoft.Json.JsonSerializerSettings
SerializationSettings = new JsonSerializerSettings
{
Formatting = Newtonsoft.Json.Formatting.Indented,
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
ContractResolver = new ReadOnlyJsonContractResolver(),
Converters = new System.Collections.Generic.List<Newtonsoft.Json.JsonConverter>
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
};
SerializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings = new Newtonsoft.Json.JsonSerializerSettings
DeserializationSettings = new JsonSerializerSettings
{
DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc,
NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
ContractResolver = new ReadOnlyJsonContractResolver(),
Converters = new System.Collections.Generic.List<Newtonsoft.Json.JsonConverter>
Converters = new List<JsonConverter>
{
new Iso8601TimeSpanConverter()
}
Expand All @@ -324,4 +324,3 @@ private void Initialize()
}
}
}

15 changes: 7 additions & 8 deletions src/SDKs/Dns/Management.Dns/Generated/IDnsManagementClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// 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.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

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

Expand All @@ -28,12 +28,12 @@ public partial interface IDnsManagementClient : System.IDisposable
/// <summary>
/// Gets or sets json serialization settings.
/// </summary>
Newtonsoft.Json.JsonSerializerSettings SerializationSettings { get; }
JsonSerializerSettings SerializationSettings { get; }

/// <summary>
/// Gets or sets json deserialization settings.
/// </summary>
Newtonsoft.Json.JsonSerializerSettings DeserializationSettings { get; }
JsonSerializerSettings DeserializationSettings { get; }

/// <summary>
/// Credentials needed for the client to connect to Azure.
Expand Down Expand Up @@ -81,4 +81,3 @@ public partial interface IDnsManagementClient : System.IDisposable

}
}

25 changes: 12 additions & 13 deletions src/SDKs/Dns/Management.Dns/Generated/IRecordSetsOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
// 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.0.0
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.Dns
{
using Azure;
using Management;
using Rest;
using Rest.Azure;
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
Expand All @@ -37,7 +37,7 @@ public partial interface IRecordSetsOperations
/// </param>
/// <param name='recordType'>
/// The type of DNS record in this record set. Possible values include:
/// 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// </param>
/// <param name='parameters'>
/// Parameters supplied to the Update operation.
Expand Down Expand Up @@ -78,8 +78,8 @@ public partial interface IRecordSetsOperations
/// <param name='recordType'>
/// The type of DNS record in this record set. Record sets of type SOA
/// can be updated but not created (they are created when the DNS zone
/// is created). Possible values include: 'A', 'AAAA', 'CNAME', 'MX',
/// 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// is created). Possible values include: 'A', 'AAAA', 'CAA', 'CNAME',
/// 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// </param>
/// <param name='parameters'>
/// Parameters supplied to the CreateOrUpdate operation.
Expand Down Expand Up @@ -125,8 +125,8 @@ public partial interface IRecordSetsOperations
/// <param name='recordType'>
/// The type of DNS record in this record set. Record sets of type SOA
/// cannot be deleted (they are deleted when the DNS zone is deleted).
/// Possible values include: 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR',
/// 'SOA', 'SRV', 'TXT'
/// Possible values include: 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS',
/// 'PTR', 'SOA', 'SRV', 'TXT'
/// </param>
/// <param name='ifMatch'>
/// The etag of the record set. Omit this value to always delete the
Expand Down Expand Up @@ -160,7 +160,7 @@ public partial interface IRecordSetsOperations
/// </param>
/// <param name='recordType'>
/// The type of DNS record in this record set. Possible values include:
/// 'A', 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// 'A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down Expand Up @@ -189,7 +189,7 @@ public partial interface IRecordSetsOperations
/// </param>
/// <param name='recordType'>
/// The type of record sets to enumerate. Possible values include: 'A',
/// 'AAAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SOA', 'SRV', 'TXT'
/// </param>
/// <param name='top'>
/// The maximum number of record sets to return. If not specified,
Expand Down Expand Up @@ -298,4 +298,3 @@ public partial interface IRecordSetsOperations
Task<AzureOperationResponse<IPage<RecordSet>>> ListByDnsZoneNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}

Loading