Skip to content

Commit 0438fb3

Browse files
author
Siddharth Chatrola
committed
Warning message in all managed cache commands
1 parent 46a4285 commit 0438fb3

11 files changed

+22
-0
lines changed

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class GetAzureManagedCache : ManagedCacheCmdletBase
2828

2929
public override void ExecuteCmdlet()
3030
{
31+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
32+
3133
List<PSCacheService> cacheServices = CacheClient.GetCacheServices(Name);
3234
if (!string.IsNullOrEmpty(Name) && cacheServices.Count == 0)
3335
{

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheAccessKey.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public class GetAzureManagedCacheAccessKey : ManagedCacheCmdletBase
2727

2828
public override void ExecuteCmdlet()
2929
{
30+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
31+
3032
CachingKeysResponse response = CacheClient.GetAccessKeys(Name);
3133
WriteObject(new CacheAccessKeys(Name, response));
3234
}

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheLocation.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public class AzureManagedCacheLocation : ManagedCacheCmdletBase
2424
{
2525
public override void ExecuteCmdlet()
2626
{
27+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
28+
2729
List<Microsoft.Azure.Management.ManagedCache.Models.RegionsResponse.Region> locations = CacheClient.GetLocations();
2830
WriteObject(locations);
2931
}

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/GetAzureManagedCacheNamedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class GetAzureManagedCacheNamedCache : ManagedCacheCmdletBase
3030

3131
public override void ExecuteCmdlet()
3232
{
33+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
34+
3335
string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name);
3436
CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); };
3537
WriteObject(new PSCacheServiceWithNamedCaches(CacheClient.GetNamedCache(cacheServiceName, NamedCache)));

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class NewAzureManagedCache : ManagedCacheCmdletBase, IDynamicParameters
3737

3838
public override void ExecuteCmdlet()
3939
{
40+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
41+
4042
cacheServiceName = CacheClient.NormalizeCacheServiceName(Name);
4143

4244
CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); };

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheAccessKey.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public class NewAzureManagedCacheAccessKey : ManagedCacheCmdletBase
3434

3535
public override void ExecuteCmdlet()
3636
{
37+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
38+
3739
if (string.IsNullOrEmpty(KeyType))
3840
{
3941
KeyType = PrimaryKeyType;

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/NewAzureManagedCacheNamedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public class NewAzureManagedCacheNamedCache : ManagedCacheCmdletBase
5050

5151
public override void ExecuteCmdlet()
5252
{
53+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
54+
5355
if (string.IsNullOrEmpty(ExpiryPolicy))
5456
{
5557
ExpiryPolicy = _DefaultExpiryPolicy;

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public class RemoveAzureManagedCache : ManagedCacheCmdletBase
3131

3232
public override void ExecuteCmdlet()
3333
{
34+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
35+
3436
ConfirmAction(
3537
Force.IsPresent,
3638
string.Format(Properties.Resources.RemoveServiceWarning, Name),

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/RemoveAzureManagedCacheNamedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class RemoveAzureManagedCacheNamedCache : ManagedCacheCmdletBase
3737

3838
public override void ExecuteCmdlet()
3939
{
40+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
41+
4042
string cacheServiceName = CacheClient.NormalizeCacheServiceName(Name);
4143
CacheClient.ProgressRecorder = (p) => { WriteVerbose(p); };
4244
CacheClient.RemoveNamedCache(cacheServiceName, NamedCache, ConfirmAction, Force.IsPresent);

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public class SetAzureManagedCache : ManagedCacheCmdletBase, IDynamicParameters
3838

3939
public override void ExecuteCmdlet()
4040
{
41+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
42+
4143
CacheClient.ProgressRecorder = (message) => { WriteVerbose(message); };
4244
string memory = memoryDynamicParameterSet.GetMemoryValue(Sku);
4345
PSCacheService cacheService = new PSCacheService(

src/ServiceManagement/ManagedCache/Commands.ManagedCache/Service/SetAzureManagedCacheNamedCache.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public class SetAzureManagedCacheNamedCache : ManagedCacheCmdletBase
5353

5454
public override void ExecuteCmdlet()
5555
{
56+
WriteWarning("Managed Cache will be retired on 11/30/2016. Please migrate to Azure Redis Cache. For more information, see http://go.microsoft.com/fwlink/?LinkID=717458");
57+
5658
if (string.IsNullOrEmpty(ExpiryPolicy))
5759
{
5860
ExpiryPolicy = _DefaultExpiryPolicy;

0 commit comments

Comments
 (0)