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

Dns ZoneType Change #15236

Merged
merged 36 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b2a4f14
WIP: Initial CRUD and List test for record and zone
bquantump Aug 11, 2020
38b9eb1
WIP: Port of cloud issues
bquantump Aug 12, 2020
e15afb3
WIP: OneTimeTearDown and setup working. No double test runs
bquantump Aug 16, 2020
4c799eb
WIP: don't make zone twice
bquantump Aug 17, 2020
3f88fd3
WIP: Commit test
Aug 18, 2020
90204f1
WIP: Fix changelog and readme
bquantump Aug 18, 2020
ce4d0de
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
bquantump Aug 18, 2020
6fee9cf
WIP: Fix yaml
bquantump Aug 18, 2020
66d2634
WIP: Fix yml 2
bquantump Aug 18, 2020
a92d37c
WIP: Remove unused function
bquantump Aug 19, 2020
c0abf80
Remove .swp file
bquantump Aug 20, 2020
8fed2c7
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
bquantump Aug 20, 2020
f34768b
Remove SWP file
bquantump Aug 20, 2020
040df84
Update DNS Track 2 test
bquantump Aug 27, 2020
f28d520
Add Tests Recordings
bquantump Aug 27, 2020
936583d
Fix Class name
bquantump Aug 27, 2020
6cf295d
WIP: Update tests
bquantump Sep 1, 2020
212e5c4
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
bquantump Sep 1, 2020
88c43bf
WIP: Make exception test clearner
bquantump Sep 1, 2020
a3e2c57
WIP: Update live test records
bquantump Sep 1, 2020
5cf8665
Revert json change
bquantump Sep 2, 2020
556c220
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
bquantump Sep 2, 2020
becddf3
Small fixes
bquantump Sep 4, 2020
932730f
WIP: Update SLN
bquantump Sep 11, 2020
2c0317c
WIP: Dns gen update
bquantump Sep 16, 2020
0f02877
Revert "WIP: Dns gen update"
bquantump Sep 17, 2020
67eba6d
WIP: make zonetype obsolete
bquantump Sep 17, 2020
0e2d874
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net
bquantump Sep 17, 2020
bb4b9c6
WIP: make zone type readonly
bquantump Sep 17, 2020
3520322
WIP: update test
bquantump Sep 17, 2020
f43c483
WIP: Make all private relate fields obsolete
bquantump Sep 17, 2020
3ddd8b7
WIP: only change things we want to change
bquantump Sep 18, 2020
3990ca9
Merge branch 'master' of https://github.com/bquantump/azure-sdk-for-net
bquantump Sep 18, 2020
18738ce
WIP: Update test
bquantump Sep 18, 2020
70bd17b
WIP: Update test
bquantump Sep 18, 2020
aa1154d
WIP: update test correctly
bquantump Sep 18, 2020
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
77 changes: 40 additions & 37 deletions sdk/dns/Azure.ResourceManager.Dns/Azure.ResourceManager.Dns.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,44 @@ EndProject
Project("{B89A7445-9F90-4BEF-A2CD-E38E1C6AD1DF}") = "Azure.ResourceManager.Dns.Tests", "tests\Azure.ResourceManager.Dns.Tests.csproj", "{B27A3240-EDB9-4C64-ABD4-02F492C27D64}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|x64.ActiveCfg = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|x64.Build.0 = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|x86.ActiveCfg = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Debug|x86.Build.0 = Debug|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|Any CPU.Build.0 = Release|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|x64.ActiveCfg = Release|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|x64.Build.0 = Release|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|x86.ActiveCfg = Release|Any CPU
{334FB216-0D38-4370-92DB-65BC85EBFDB5}.Release|x86.Build.0 = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|x64.ActiveCfg = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|x64.Build.0 = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|x86.ActiveCfg = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Debug|x86.Build.0 = Debug|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|Any CPU.Build.0 = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|x64.ActiveCfg = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|x64.Build.0 = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|x86.ActiveCfg = Release|Any CPU
{B27A3240-EDB9-4C64-ABD4-02F492C27D64}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {22B5C190-A09C-48DF-A800-D892011143EE}
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|x64.ActiveCfg = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|x64.Build.0 = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|x86.ActiveCfg = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Debug|x86.Build.0 = Debug|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|Any CPU.Build.0 = Release|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|x64.ActiveCfg = Release|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|x64.Build.0 = Release|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|x86.ActiveCfg = Release|Any CPU
{7C8507C6-BFAE-4DD2-B4AD-FE1A49B8E246}.Release|x86.Build.0 = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|x64.ActiveCfg = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|x64.Build.0 = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|x86.ActiveCfg = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Debug|x86.Build.0 = Debug|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|Any CPU.Build.0 = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|x64.ActiveCfg = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|x64.Build.0 = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|x86.ActiveCfg = Release|Any CPU
{3EC07824-4ECC-4909-8F2A-4796B3B157C6}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@

<PropertyGroup>
<!-- TODO: As part of release process, this PropertyGroup can be removed once RP is approved for namespace -->
<NoWarn>$(NoWarn);AZC0001</NoWarn>
<NoWarn>$(NoWarn);AZC0001;CS0618</NoWarn>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

// <auto-generated/>

using System;
#nullable disable

namespace Azure.ResourceManager.Dns.Models
{
/// <summary> The type of this DNS zone (Public or Private). </summary>
[Obsolete("Enum is no longer support since privat dns is no longer supported (public only); please use the privatedns API")]
public enum ZoneType
{
/// <summary> Public. </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;

namespace Azure.ResourceManager.Dns.Models
{
/// <summary> Describes a DNS zone. </summary>
public partial class Zone : Resource
{
/// <summary> The type of this DNS zone (Public or Private). </summary>
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")]
public ZoneType? ZoneType { get; }
/// <summary> A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. </summary>
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")]
public IList<SubResource> RegistrationVirtualNetworks { get; }
Copy link
Member

Choose a reason for hiding this comment

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

Do we need [Obsolete] on these two properties?

Copy link
Member Author

@bquantump bquantump Sep 17, 2020

Choose a reason for hiding this comment

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

hmm actually do want to do this? Since a user could want to view these and they would get a compile error trying to get these unless that suppress that warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

they are only read-only, so they would only come back from a GET on a private DNS zone

Copy link
Member

Choose a reason for hiding this comment

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

compile warning not error.

Copy link
Member

@allenjzhang allenjzhang Sep 17, 2020

Choose a reason for hiding this comment

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

I think [Obsolete] can be applied here. If user is using these properties, they will get a compiler warning which is what we wanted.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well depends on how one builds I suppose. Dotnet core on Ubuntu throws a compile error.

I will make this change.

/// <summary> A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. </summary>
[Obsolete("Private DNS is not allowed in this API anymore, use the privatedns API")]
public IList<SubResource> ResolutionVirtualNetworks { get; }
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protected void InitializeClients()
}
protected void initNewRecord()
{
ResourcesManagementClient = this.GetResourceManagementClient();
ResourcesOperations = ResourcesManagementClient.Resources;
ResourceProvidersOperations = ResourcesManagementClient.Providers;
ResourceGroupsOperations = ResourcesManagementClient.ResourceGroups;
Expand Down
3 changes: 1 addition & 2 deletions sdk/dns/Azure.ResourceManager.Dns/tests/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Azure.ResourceManager.Dns.Models;
using System.Collections.Generic;
using System.Net;
using NUnit.Framework;

namespace Azure.Management.Dns.Tests
{
Expand All @@ -28,7 +27,7 @@ public static bool AreEqualPrereq(
return false;
}

if (first.Location.ToLower() != second.Location.ToLower())
if (!String.Equals(first.Location, second.Location, StringComparison.OrdinalIgnoreCase))
{
return false;
}
Expand Down
Loading