Skip to content

Commit

Permalink
Dns ZoneType Change (#15236)
Browse files Browse the repository at this point in the history
* WIP: Initial CRUD and List test for record and zone

* WIP: Port of cloud issues

* WIP:  OneTimeTearDown and setup working. No double test runs

* WIP: don't make zone twice

* WIP: Commit test

* WIP: Fix changelog and readme

* WIP: Fix yaml

* WIP: Fix yml 2

* WIP: Remove unused function

* Remove .swp file

* Remove SWP file

* Update DNS Track 2 test

* Add Tests Recordings

* Fix Class name

* WIP: Update tests

* WIP: Make exception test clearner

* WIP: Update live test records

* Revert json change

* Small fixes

* WIP: Update SLN

* WIP: Dns gen update

* Revert "WIP: Dns gen update"

This reverts commit 2c0317c.

* WIP: make zonetype obsolete

* WIP: make zone type readonly

* WIP: update test

* WIP: Make all private relate fields obsolete

* WIP: only change things we want to change

* WIP: Update test

* WIP: Update test

* WIP: update test correctly

Co-authored-by: bqauntump <[email protected]>
  • Loading branch information
bquantump and bqauntump authored Sep 18, 2020
1 parent 29d3020 commit 37c15b5
Show file tree
Hide file tree
Showing 30 changed files with 958 additions and 1,197 deletions.
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; }
/// <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

0 comments on commit 37c15b5

Please sign in to comment.