Skip to content

Commit 179166f

Browse files
committed
Merge pull request #616 from vladca/rel095_tm
TrafficManager Endpoint management cmdlets
2 parents 5ead947 + 39ed970 commit 179166f

File tree

59 files changed

+11535
-703
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+11535
-703
lines changed

ChangeLog.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@
8989
* Azure Resource Manager cmdlets
9090
* Fixed formatting of output for Get-UsageAggregates
9191
* Fixed executing Get-UsageAggregates when first cmdlet being called.
92+
* Added TrafficManager cmdlets
93+
* Enable-AzureTrafficManagerProfile
94+
* Disable-AzureTrafficManagerProfile
95+
* New-AzureTrafficManagerEndpoint
96+
* Get-AzureTrafficManagerEndpoint
97+
* Set-AzureTrafficManagerEndpoint
98+
* Remove-AzureTrafficManagerEndpoint
99+
* Enable-AzureTrafficManagerEndpoint
100+
* Disable-AzureTrafficManagerEndpoint
101+
* Upgraded TrafficManager cmdlets
102+
* Get-AzureTrafficManagerProfile
103+
* Name is now optional (it will list all profiles in resource group)
104+
* Resource group is now optional (it will list all profiles in subscription)
92105

93106
* Azure Data Factory cmdlets
94107
* Upgraded management library to 1.0.0 with breaking JSON format change.

src/ResourceManager.sln

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.StreamAnalytics.Te
4949
EndProject
5050
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "ResourceManager\Insights\Commands.Insights\Commands.Insights.csproj", "{DEA446A1-84E2-46CC-B780-EB4AFDE2460E}"
5151
EndProject
52-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManagement.Automation.Test", "ResourceManager\Automation\Commands.Automation.Test\Commands.ResourceManagement.Automation.Test.csproj", "{127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}"
52+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ResourceManagement.Automation.Test", "ResourceManager\Automation\Commands.Automation.Test\Commands.ResourceManagement.Automation.Test.csproj", "{59D1B5DC-9175-43EC-90C6-CBA601B3565F}"
5353
EndProject
5454
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Websites", "ResourceManager\Websites\Commands.Websites\Commands.Websites.csproj", "{80A92297-7C92-456B-8EE7-9FB6CE30149D}"
5555
EndProject
@@ -63,6 +63,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Dns", "ResourceMan
6363
EndProject
6464
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Dns.Test", "ResourceManager\Dns\Commands.Dns.Test\Commands.Dns.Test.csproj", "{133561EC-99AF-4ADC-AF41-39C4D3AD323B}"
6565
EndProject
66+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager2.Test", "ResourceManager\TrafficManager\Commands.TrafficManager2.Test\Commands.TrafficManager2.Test.csproj", "{5764A3A4-586C-4536-8481-13007CAC111B}"
67+
EndProject
68+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.TrafficManager2", "ResourceManager\TrafficManager\Commands.TrafficManager2\Commands.TrafficManager2.csproj", "{270CBB5F-BB8A-4E33-B35B-95698E607D97}"
69+
EndProject
6670
Global
6771
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6872
Debug|Any CPU = Debug|Any CPU
@@ -173,6 +177,14 @@ Global
173177
{133561EC-99AF-4ADC-AF41-39C4D3AD323B}.Debug|Any CPU.Build.0 = Debug|Any CPU
174178
{133561EC-99AF-4ADC-AF41-39C4D3AD323B}.Release|Any CPU.ActiveCfg = Release|Any CPU
175179
{133561EC-99AF-4ADC-AF41-39C4D3AD323B}.Release|Any CPU.Build.0 = Release|Any CPU
180+
{5764A3A4-586C-4536-8481-13007CAC111B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
181+
{5764A3A4-586C-4536-8481-13007CAC111B}.Debug|Any CPU.Build.0 = Debug|Any CPU
182+
{5764A3A4-586C-4536-8481-13007CAC111B}.Release|Any CPU.ActiveCfg = Release|Any CPU
183+
{5764A3A4-586C-4536-8481-13007CAC111B}.Release|Any CPU.Build.0 = Release|Any CPU
184+
{270CBB5F-BB8A-4E33-B35B-95698E607D97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
185+
{270CBB5F-BB8A-4E33-B35B-95698E607D97}.Debug|Any CPU.Build.0 = Debug|Any CPU
186+
{270CBB5F-BB8A-4E33-B35B-95698E607D97}.Release|Any CPU.ActiveCfg = Release|Any CPU
187+
{270CBB5F-BB8A-4E33-B35B-95698E607D97}.Release|Any CPU.Build.0 = Release|Any CPU
176188
EndGlobalSection
177189
GlobalSection(SolutionProperties) = preSolution
178190
HideSolutionNode = FALSE
@@ -188,9 +200,8 @@ Global
188200
{7E6683BE-ECFF-4709-89EB-1325E9E70512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
189201
{127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
190202
{13E031E4-8A43-4B87-9D72-D70180C31C11} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
191-
{F4ABAD68-64A5-4B23-B09C-42559A7524DE} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
192203
{469F20E0-9D40-41AD-94C3-B47AD15A4C00} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
193204
{133561EC-99AF-4ADC-AF41-39C4D3AD323B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
194-
{13E031E4-8A43-4B87-9D72-D70180C31C11} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
205+
{5764A3A4-586C-4536-8481-13007CAC111B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
195206
EndGlobalSection
196207
EndGlobal

src/ResourceManager/Automation/Commands.Automation.Test/Commands.ResourceManagement.Automation.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<ProductVersion>
77
</ProductVersion>
88
<SchemaVersion>2.0</SchemaVersion>
9-
<ProjectGuid>{59D1B5DC-9175-43EC-90C6-CBA601B3565F}</ProjectGuid>
9+
<ProjectGuid>{127D0D51-FDEA-4E1A-8CD8-34DEB5C2F7F6}</ProjectGuid>
1010
<OutputType>Library</OutputType>
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
1212
<RootNamespace>Microsoft.Azure.Commands.ResourceManager.Automation.Test</RootNamespace>

src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/Commands.TrafficManager2.Test.csproj

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<Compile Include="Properties\AssemblyInfo.cs" />
9898
<Compile Include="ScenarioTests\ProfileTests.cs" />
9999
<Compile Include="ScenarioTests\EndpointTests.cs" />
100-
<Compile Include="ScenarioTests\WatmV2TestsBase.cs" />
100+
<Compile Include="ScenarioTests\TestController.cs" />
101101
<Compile Include="UnitTests\AddAzureTrafficManagerEndpointConfigTests.cs" />
102102
<Compile Include="UnitTests\RemoveAzureTrafficManagerEndpointConfigTests.cs" />
103103
</ItemGroup>
@@ -113,29 +113,8 @@
113113
<None Include="ScenarioTests\ProfileTests.ps1">
114114
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
115115
</None>
116-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.EndpointTests\TestAddEndpoint.json">
117-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
118-
</None>
119-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.EndpointTests\TestDeleteEndpoint.json">
120-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
121-
</None>
122-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestCreateDeleteUsingProfile.json">
123-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
124-
</None>
125-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestCrudWithEndpoint.json">
126-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
127-
</None>
128-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestProfileCrud.json">
129-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
130-
</None>
131-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestProfileCrudWithPiping.json">
132-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
133-
</None>
134-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestProfileNewAlreadyExists.json">
135-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
136-
</None>
137-
<None Include="SessionRecords\Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.ProfileTests\TestProfileRemoveNonExisting.json">
138-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
116+
<None Include="SessionRecords\**\*.json">
117+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
139118
</None>
140119
</ItemGroup>
141120
<ItemGroup>

src/ResourceManager/TrafficManager/Commands.TrafficManager2.Test/ScenarioTests/EndpointTests.cs

Lines changed: 94 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,111 @@ namespace Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests
1717
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1818
using Xunit;
1919

20-
public class EndpointTests : WatmV2TestsBase
20+
public class EndpointTests
2121
{
2222
[Fact]
2323
[Trait(Category.AcceptanceType, Category.CheckIn)]
2424
public void TestAddEndpoint()
2525
{
26-
this.RunPowerShellTest("Test-AddEndpoint");
26+
TestController.NewInstance.RunPowerShellTest("Test-AddEndpoint");
2727
}
2828

2929
[Fact]
3030
[Trait(Category.AcceptanceType, Category.CheckIn)]
3131
public void TestDeleteEndpoint()
3232
{
33-
this.RunPowerShellTest("Test-DeleteEndpoint");
33+
TestController.NewInstance.RunPowerShellTest("Test-DeleteEndpoint");
34+
}
35+
36+
[Fact]
37+
[Trait(Category.AcceptanceType, Category.CheckIn)]
38+
public void TestEndpointCrud()
39+
{
40+
TestController.NewInstance.RunPowerShellTest("Test-EndpointCrud");
41+
}
42+
43+
[Fact]
44+
[Trait(Category.AcceptanceType, Category.CheckIn)]
45+
public void TestEndpointCrudPiping()
46+
{
47+
TestController.NewInstance.RunPowerShellTest("Test-EndpointCrudPiping");
48+
}
49+
50+
[Fact]
51+
[Trait(Category.AcceptanceType, Category.CheckIn)]
52+
public void TestCreateExistingEndpoint()
53+
{
54+
TestController.NewInstance.RunPowerShellTest("Test-CreateExistingEndpoint");
55+
}
56+
57+
[Fact]
58+
[Trait(Category.AcceptanceType, Category.CheckIn)]
59+
public void TestCreateExistingEndpointFromNonExistingProfile()
60+
{
61+
TestController.NewInstance.RunPowerShellTest("Test-CreateExistingEndpointFromNonExistingProfile");
62+
}
63+
64+
[Fact]
65+
[Trait(Category.AcceptanceType, Category.CheckIn)]
66+
public void TestRemoveExistingEndpointFromNonExistingProfile()
67+
{
68+
TestController.NewInstance.RunPowerShellTest("Test-RemoveExistingEndpointFromNonExistingProfile");
69+
}
70+
71+
[Fact]
72+
[Trait(Category.AcceptanceType, Category.CheckIn)]
73+
public void TestGetExistingEndpointFromNonExistingProfile()
74+
{
75+
TestController.NewInstance.RunPowerShellTest("Test-GetExistingEndpointFromNonExistingProfile");
76+
}
77+
78+
[Fact]
79+
[Trait(Category.AcceptanceType, Category.CheckIn)]
80+
public void TestRemoveNonExistingEndpointFromProfile()
81+
{
82+
TestController.NewInstance.RunPowerShellTest("Test-RemoveNonExistingEndpointFromProfile");
83+
}
84+
85+
[Fact(Skip = "Bug")]
86+
[Trait(Category.AcceptanceType, Category.CheckIn)]
87+
public void TestEnableEndpoint()
88+
{
89+
TestController.NewInstance.RunPowerShellTest("Test-EnableEndpoint");
90+
}
91+
92+
[Fact(Skip = "Bug")]
93+
[Trait(Category.AcceptanceType, Category.CheckIn)]
94+
public void TestDisableEndpoint()
95+
{
96+
TestController.NewInstance.RunPowerShellTest("Test-DisableEndpoint");
97+
}
98+
99+
[Fact(Skip = "Bug")]
100+
[Trait(Category.AcceptanceType, Category.CheckIn)]
101+
public void TestEnableEndpointUsingPiping()
102+
{
103+
TestController.NewInstance.RunPowerShellTest("Test-EnableEndpointUsingPiping");
104+
}
105+
106+
[Fact(Skip = "Bug")]
107+
[Trait(Category.AcceptanceType, Category.CheckIn)]
108+
public void TestDisableEndpointUsingPiping()
109+
{
110+
TestController.NewInstance.RunPowerShellTest("Test-DisableEndpointUsingPiping");
111+
}
112+
113+
[Fact]
114+
[Trait(Category.AcceptanceType, Category.CheckIn)]
115+
public void TestEnableNonExistingEndpoint()
116+
{
117+
TestController.NewInstance.RunPowerShellTest("Test-EnableNonExistingEndpoint");
118+
}
119+
120+
[Fact]
121+
[Trait(Category.AcceptanceType, Category.CheckIn)]
122+
public void TestDisableNonExistingEndpoint()
123+
{
124+
TestController.NewInstance.RunPowerShellTest("Test-DisableNonExistingEndpoint");
34125
}
35126
}
36127
}

0 commit comments

Comments
 (0)