Skip to content

Commit d4cfc4e

Browse files
author
Siddharth Chatrola
committed
Redis Cache: 6 new cmdlets and update to existing cmdlets
1 parent de77b11 commit d4cfc4e

File tree

72 files changed

+28112
-5512
lines changed

Some content is hidden

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

72 files changed

+28112
-5512
lines changed

src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/AzureRM.Storage.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function Get-AzureRmStorageAccountKey
136136
{
137137
$getTask = $client.StorageAccounts.ListKeysWithHttpMessagesAsync($ResourceGroupName, $name, $null, [System.Threading.CancellationToken]::None)
138138
$result = $getTask.GetAwaiter().GetResult()
139-
Write-Output $result.Body
139+
Write-Output $result.Body.Keys
140140
}
141141
else
142142
{

src/ResourceManager/RedisCache/AzureRM.RedisCache.psd1

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,24 @@ FunctionsToExport = @()
8181
CmdletsToExport = 'Remove-AzureRmRedisCachePatchSchedule',
8282
'New-AzureRmRedisCacheScheduleEntry',
8383
'Get-AzureRmRedisCachePatchSchedule',
84-
'New-AzureRmRedisCachePatchSchedule', 'Reset-AzureRmRedisCache',
85-
'Export-AzureRmRedisCache', 'Import-AzureRmRedisCache',
84+
'New-AzureRmRedisCachePatchSchedule',
85+
'Reset-AzureRmRedisCache',
86+
'Export-AzureRmRedisCache',
87+
'Import-AzureRmRedisCache',
8688
'Remove-AzureRmRedisCacheDiagnostics',
87-
'Set-AzureRmRedisCacheDiagnostics', 'Set-AzureRmRedisCache',
88-
'New-AzureRmRedisCacheKey', 'Get-AzureRmRedisCacheKey',
89-
'Get-AzureRmRedisCache', 'Remove-AzureRmRedisCache',
90-
'New-AzureRmRedisCache'
89+
'Set-AzureRmRedisCacheDiagnostics',
90+
'Set-AzureRmRedisCache',
91+
'New-AzureRmRedisCacheKey',
92+
'Get-AzureRmRedisCacheKey',
93+
'Get-AzureRmRedisCache',
94+
'Remove-AzureRmRedisCache',
95+
'New-AzureRmRedisCache',
96+
'New-AzureRmRedisCacheLink',
97+
'Remove-AzureRmRedisCacheLink',
98+
'Get-AzureRmRedisCacheLink',
99+
'New-AzureRmRedisCacheFirewallRule',
100+
'Remove-AzureRmRedisCacheFirewallRule',
101+
'Get-AzureRmRedisCacheFirewallRule'
91102

92103
# Variables to export from this module
93104
# VariablesToExport = @()

src/ResourceManager/RedisCache/Commands.RedisCache.Test/Commands.RedisCache.Test.csproj

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@
5555
<Private>True</Private>
5656
</Reference>
5757
<Reference Include="Microsoft.Azure.Management.Redis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
58-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.4.2.0-preview\lib\net45\Microsoft.Azure.Management.Redis.dll</HintPath>
58+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.4.4.0\lib\net452\Microsoft.Azure.Management.Redis.dll</HintPath>
5959
<Private>True</Private>
6060
</Reference>
61-
<Reference Include="Microsoft.Azure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
62-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.5.0.2-preview\lib\net45\Microsoft.Azure.Management.Storage.dll</HintPath>
61+
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
62+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
6363
<Private>True</Private>
6464
</Reference>
6565
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -95,11 +95,11 @@
9595
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
9696
</Reference>
9797
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
98-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
98+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
9999
<Private>True</Private>
100100
</Reference>
101101
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
102-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
102+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.10\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
103103
<Private>True</Private>
104104
</Reference>
105105
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -236,15 +236,21 @@
236236
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestDiagnosticOperations.json">
237237
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
238238
</None>
239-
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestImportExportReboot.json">
239+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestFirewallRule.json">
240240
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
241241
</None>
242-
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCache.json">
242+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestGeoReplication.json">
243+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
244+
</None>
245+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestImportExportReboot.json">
243246
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
244247
</None>
245248
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestMaxMemoryPolicyErrorCheck.json">
246249
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
247250
</None>
251+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCache.json">
252+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
253+
</None>
248254
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCacheClustering.json">
249255
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
250256
</None>
@@ -257,10 +263,18 @@
257263
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestSetNonExistingRedisCacheTest.json">
258264
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
259265
</None>
266+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestZones.json">
267+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
268+
</None>
260269
</ItemGroup>
261270
<ItemGroup>
262271
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
263272
</ItemGroup>
264273
<ItemGroup />
265274
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
275+
<Import Project="..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
276+
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
277+
<Error Condition="!Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" />
278+
<Error Condition="Exists('..\..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
279+
</Target>
266280
</Project>

src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ public void RunPowerShellTest(params string[] scripts)
8383
d.Add("Microsoft.Features", null);
8484
d.Add("Microsoft.Authorization", null);
8585
var providersToIgnore = new Dictionary<string, string>();
86-
providersToIgnore.Add("Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient", "2016-02-01");
8786
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
8887

8988
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");

src/ResourceManager/RedisCache/Commands.RedisCache.Test/ScenarioTests/RedisCacheTests.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,26 @@ public void TestDiagnosticOperations()
8282
{
8383
RedisCacheController.NewInstance.RunPowerShellTest("Test-DiagnosticOperations");
8484
}
85+
86+
[Fact]
87+
[Trait(Category.AcceptanceType, Category.CheckIn)]
88+
public void TestGeoReplication()
89+
{
90+
RedisCacheController.NewInstance.RunPowerShellTest("Test-GeoReplication");
91+
}
92+
93+
[Fact]
94+
[Trait(Category.AcceptanceType, Category.CheckIn)]
95+
public void TestFirewallRule()
96+
{
97+
RedisCacheController.NewInstance.RunPowerShellTest("Test-FirewallRule");
98+
}
99+
100+
[Fact]
101+
[Trait(Category.AcceptanceType, Category.CheckIn)]
102+
public void TestZones()
103+
{
104+
RedisCacheController.NewInstance.RunPowerShellTest("Test-Zones");
105+
}
85106
}
86107
}

0 commit comments

Comments
 (0)