Skip to content

Commit 28fd60f

Browse files
SiddharthChatrolaMsHovsep
authored andcommitted
[Release 1.6.0] Import, Export, Reset cmdlet added and vNet fixes (#2559)
* Using latest nuget package and use SubnetId instead of Subnet and VirtualNetwork * Import, Export and Reboot powershell cmdlets + SubnetId change in vnet + RP API version change * Added help and solved few mistake in error messages * Export should not prompt, minor message changes * Update help for SubnetId * Merging changes suggested by Steve in documentation * Updated comment for "Format" * Help doc modified * ChangeLog updated * Fixed escape sequence in PowerShell help * Updating Microsoft.Azure.Management.Redis nuget package * Fixing build issues * Adding records into csproj file and fix build issues * Remove actual credentials after generating records
1 parent 480bd36 commit 28fd60f

29 files changed

+2833
-1063
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
##2016.07.11 version 1.6.0
2+
* Azure Redis Cache
3+
* New cmdlet added for Reset-AzureRmRedisCache
4+
* New cmdlet added for Export-AzureRmRedisCache
5+
* New cmdlet added for Import-AzureRmRedisCache
6+
* Modified cmdlet New-AzureRmRedisCache to include parameter change for vNet
27
* Azure SQL DB Backup/Restore
38
* Cmdlets for LTR (Long Term Retention) backup feature
49
* Get-AzureRmSqlServerBackupLongTermRetentionVault

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.11.0-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
5858
<Private>True</Private>
5959
</Reference>
60-
<Reference Include="Microsoft.Azure.Management.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
61-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.2.0.1-preview\lib\net45\Microsoft.Azure.Management.Redis.dll</HintPath>
60+
<Reference Include="Microsoft.Azure.Management.Redis, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
61+
<SpecificVersion>False</SpecificVersion>
62+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.3.1.0-preview\lib\net45\Microsoft.Azure.Management.Redis.dll</HintPath>
6263
<Private>True</Private>
6364
</Reference>
6465
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -220,6 +221,12 @@
220221
<None Include="ScenarioTests\RedisCacheTests.ps1">
221222
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
222223
</None>
224+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestExportAzureRmRedisCache.json">
225+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
226+
</None>
227+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestImportAzureRmRedisCache.json">
228+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
229+
</None>
223230
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRedisCache.json">
224231
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
225232
</None>
@@ -232,6 +239,9 @@
232239
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestRemoveAzureRedisCacheDiagnostics.json">
233240
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
234241
</None>
242+
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestResetAzureRmRedisCache.json">
243+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
244+
</None>
235245
<None Include="SessionRecords\Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests\TestSetAzureRedisCacheDiagnostics.json">
236246
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
237247
</None>

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 TestRemoveAzureRedisCacheDiagnostics()
8282
{
8383
RedisCacheController.NewInstance.RunPowerShellTest("Test-RemoveAzureRedisCacheDiagnostics");
8484
}
85+
86+
[Fact]
87+
[Trait(Category.AcceptanceType, Category.CheckIn)]
88+
public void TestResetAzureRmRedisCache()
89+
{
90+
RedisCacheController.NewInstance.RunPowerShellTest("Test-ResetAzureRmRedisCache");
91+
}
92+
93+
[Fact]
94+
[Trait(Category.AcceptanceType, Category.CheckIn)]
95+
public void TestExportAzureRmRedisCache()
96+
{
97+
RedisCacheController.NewInstance.RunPowerShellTest("Test-ExportAzureRmRedisCache");
98+
}
99+
100+
[Fact]
101+
[Trait(Category.AcceptanceType, Category.CheckIn)]
102+
public void TestImportAzureRmRedisCache()
103+
{
104+
RedisCacheController.NewInstance.RunPowerShellTest("Test-ImportAzureRmRedisCache");
105+
}
85106
}
86107
}

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

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,44 @@ function Test-RemoveAzureRedisCacheDiagnostics
425425
Remove-AzureRmRedisCacheDiagnostics -ResourceGroupName $resourceGroupName -Name $cacheName -Force
426426
}
427427

428+
<#
429+
.SYNOPSIS
430+
Tests ResetRMAzureRedisCache
431+
#>
432+
function Test-ResetAzureRmRedisCache
433+
{
434+
$resourceGroupName = "SunnyAAPT6"
435+
$cacheName = "sunny-reboot"
436+
$rebootType = "PrimaryNode"
437+
438+
Reset-AzureRmRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -RebootType $rebootType -Force
439+
}
440+
441+
<#
442+
.SYNOPSIS
443+
Tests ExportRMAzureRedisCache
444+
#>
445+
function Test-ExportAzureRmRedisCache
446+
{
447+
$resourceGroupName = "SunnyAAPT6"
448+
$cacheName = "sunny-importexport"
449+
$prefix = "sunny"
450+
$container = "<container sas key>"
451+
Export-AzureRmRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Prefix $prefix -Container $container
452+
}
453+
454+
<#
455+
.SYNOPSIS
456+
Tests ImportAzureRmRedisCache
457+
#>
458+
function Test-ImportAzureRmRedisCache
459+
{
460+
$resourceGroupName = "SunnyAAPT6"
461+
$cacheName = "sunny-importexport"
462+
$files = @("<blob sas key>")
463+
Import-AzureRmRedisCache -ResourceGroupName $resourceGroupName -Name $cacheName -Files $files -Force
464+
}
465+
428466
<#
429467
.SYNOPSIS
430468
Sleeps but only during recording.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
{
2+
"Entries": [
3+
{
4+
"RequestUri": "/subscriptions/f8f8f139-2fd5-4d86-afca-21f21f35806e/resourceGroups/SunnyAAPT6/providers/Microsoft.Cache/Redis/sunny-importexport/export?api-version=2016-04-01",
5+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjhmOGYxMzktMmZkNS00ZDg2LWFmY2EtMjFmMjFmMzU4MDZlL3Jlc291cmNlR3JvdXBzL1N1bm55QUFQVDYvcHJvdmlkZXJzL01pY3Jvc29mdC5DYWNoZS9SZWRpcy9zdW5ueS1pbXBvcnRleHBvcnQvZXhwb3J0P2FwaS12ZXJzaW9uPTIwMTYtMDQtMDE=",
6+
"RequestMethod": "POST",
7+
"RequestBody": "{\r\n \"prefix\": \"sunny\",\r\n \"container\": \"https://sunnystoragenew.blob.core.windows.net/sunny-importexport?sv=2015-04-05&sr=c&sig=HezZtBZ3DURmEGDduauE7pvETY4kqlPI8JCNa8ATmaw%3D&st=2016-05-27T00%3A00%3A00Z&se=2016-05-28T00%3A00%3A00Z&sp=rwdl\"\r\n}",
8+
"RequestHeaders": {
9+
"Content-Type": [
10+
"application/json; charset=utf-8"
11+
],
12+
"Content-Length": [
13+
"243"
14+
],
15+
"x-ms-client-request-id": [
16+
"f0d0ac00-24e0-433e-855c-a62a23be37ea"
17+
],
18+
"accept-language": [
19+
"en-US"
20+
],
21+
"User-Agent": [
22+
"Microsoft.Azure.Management.Redis.RedisManagementClient/2.0.0.0"
23+
]
24+
},
25+
"ResponseBody": "",
26+
"ResponseHeaders": {
27+
"Content-Length": [
28+
"0"
29+
],
30+
"Expires": [
31+
"-1"
32+
],
33+
"Pragma": [
34+
"no-cache"
35+
],
36+
"x-ms-request-id": [
37+
"e316991e-488a-4e31-8d8a-b8bde47dba48"
38+
],
39+
"x-rp-server-mvid": [
40+
"0efde996-c8d1-4dec-b71e-394eba9ff135"
41+
],
42+
"Strict-Transport-Security": [
43+
"max-age=31536000; includeSubDomains"
44+
],
45+
"x-ms-ratelimit-remaining-subscription-writes": [
46+
"1199"
47+
],
48+
"x-ms-correlation-request-id": [
49+
"c8f898e0-57da-4e5b-b269-d2dc62024932"
50+
],
51+
"x-ms-routing-request-id": [
52+
"CENTRALUS:20160527T013651Z:c8f898e0-57da-4e5b-b269-d2dc62024932"
53+
],
54+
"Cache-Control": [
55+
"no-cache"
56+
],
57+
"Date": [
58+
"Fri, 27 May 2016 01:36:50 GMT"
59+
],
60+
"Location": [
61+
"https://management.azure.com/subscriptions/f8f8f139-2fd5-4d86-afca-21f21f35806e/providers/Microsoft.Cache/locations/Central%20US/operationresults/e316991e-488a-4e31-8d8a-b8bde47dba48?api-version=2015-08-01"
62+
],
63+
"Server": [
64+
"Microsoft-HTTPAPI/2.0"
65+
]
66+
},
67+
"StatusCode": 202
68+
},
69+
{
70+
"RequestUri": "/subscriptions/f8f8f139-2fd5-4d86-afca-21f21f35806e/providers/Microsoft.Cache/locations/Central%20US/operationresults/e316991e-488a-4e31-8d8a-b8bde47dba48?api-version=2015-08-01",
71+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjhmOGYxMzktMmZkNS00ZDg2LWFmY2EtMjFmMjFmMzU4MDZlL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FjaGUvbG9jYXRpb25zL0NlbnRyYWwlMjBVUy9vcGVyYXRpb25yZXN1bHRzL2UzMTY5OTFlLTQ4OGEtNGUzMS04ZDhhLWI4YmRlNDdkYmE0OD9hcGktdmVyc2lvbj0yMDE1LTA4LTAx",
72+
"RequestMethod": "GET",
73+
"RequestBody": "",
74+
"RequestHeaders": {
75+
"User-Agent": [
76+
"Microsoft.Azure.Management.Redis.RedisManagementClient/2.0.0.0"
77+
]
78+
},
79+
"ResponseBody": "",
80+
"ResponseHeaders": {
81+
"Content-Length": [
82+
"0"
83+
],
84+
"Expires": [
85+
"-1"
86+
],
87+
"Pragma": [
88+
"no-cache"
89+
],
90+
"x-ms-request-id": [
91+
"cdbbef91-11f0-4aff-8e7e-dcea52a25d68"
92+
],
93+
"x-rp-server-mvid": [
94+
"0efde996-c8d1-4dec-b71e-394eba9ff135"
95+
],
96+
"Strict-Transport-Security": [
97+
"max-age=31536000; includeSubDomains"
98+
],
99+
"x-ms-ratelimit-remaining-subscription-reads": [
100+
"14998"
101+
],
102+
"x-ms-correlation-request-id": [
103+
"f16e0980-74fa-490c-b478-7f20e2b8f81d"
104+
],
105+
"x-ms-routing-request-id": [
106+
"CENTRALUS:20160527T013721Z:f16e0980-74fa-490c-b478-7f20e2b8f81d"
107+
],
108+
"Cache-Control": [
109+
"no-cache"
110+
],
111+
"Date": [
112+
"Fri, 27 May 2016 01:37:20 GMT"
113+
],
114+
"Location": [
115+
"https://management.azure.com/subscriptions/f8f8f139-2fd5-4d86-afca-21f21f35806e/providers/Microsoft.Cache/locations/Central%20US/operationresults/e316991e-488a-4e31-8d8a-b8bde47dba48?api-version=2015-08-01"
116+
],
117+
"Server": [
118+
"Microsoft-HTTPAPI/2.0"
119+
]
120+
},
121+
"StatusCode": 202
122+
},
123+
{
124+
"RequestUri": "/subscriptions/f8f8f139-2fd5-4d86-afca-21f21f35806e/providers/Microsoft.Cache/locations/Central%20US/operationresults/e316991e-488a-4e31-8d8a-b8bde47dba48?api-version=2015-08-01",
125+
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZjhmOGYxMzktMmZkNS00ZDg2LWFmY2EtMjFmMjFmMzU4MDZlL3Byb3ZpZGVycy9NaWNyb3NvZnQuQ2FjaGUvbG9jYXRpb25zL0NlbnRyYWwlMjBVUy9vcGVyYXRpb25yZXN1bHRzL2UzMTY5OTFlLTQ4OGEtNGUzMS04ZDhhLWI4YmRlNDdkYmE0OD9hcGktdmVyc2lvbj0yMDE1LTA4LTAx",
126+
"RequestMethod": "GET",
127+
"RequestBody": "",
128+
"RequestHeaders": {
129+
"User-Agent": [
130+
"Microsoft.Azure.Management.Redis.RedisManagementClient/2.0.0.0"
131+
]
132+
},
133+
"ResponseBody": "",
134+
"ResponseHeaders": {
135+
"Content-Length": [
136+
"0"
137+
],
138+
"Expires": [
139+
"-1"
140+
],
141+
"Pragma": [
142+
"no-cache"
143+
],
144+
"x-ms-request-id": [
145+
"74d8b1a5-2df5-4112-be34-16a66e54a94c"
146+
],
147+
"x-rp-server-mvid": [
148+
"0efde996-c8d1-4dec-b71e-394eba9ff135"
149+
],
150+
"Strict-Transport-Security": [
151+
"max-age=31536000; includeSubDomains"
152+
],
153+
"x-ms-ratelimit-remaining-subscription-reads": [
154+
"14995"
155+
],
156+
"x-ms-correlation-request-id": [
157+
"e1447899-b665-49fe-aef4-5230c7b910a5"
158+
],
159+
"x-ms-routing-request-id": [
160+
"CENTRALUS:20160527T013751Z:e1447899-b665-49fe-aef4-5230c7b910a5"
161+
],
162+
"Cache-Control": [
163+
"no-cache"
164+
],
165+
"Date": [
166+
"Fri, 27 May 2016 01:37:51 GMT"
167+
],
168+
"Server": [
169+
"Microsoft-HTTPAPI/2.0"
170+
]
171+
},
172+
"StatusCode": 200
173+
}
174+
],
175+
"Names": {},
176+
"Variables": {
177+
"SubscriptionId": "f8f8f139-2fd5-4d86-afca-21f21f35806e"
178+
}
179+
}

0 commit comments

Comments
 (0)