Skip to content

Commit a4846a2

Browse files
authored
Merge pull request Azure#5028 from AsrOneSdk/siteRecoveryChanges
Marking Obsolete SiteRecovery and classic SiteRecovery. RecoveryServices.SiteRecovery can be used instead.
2 parents 9601aed + c26fb18 commit a4846a2

File tree

106 files changed

+444
-42
lines changed

Some content is hidden

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

106 files changed

+444
-42
lines changed

src/ResourceManager/SiteRecovery/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Add deprecation warnings for all cmdlets in this module in preparation for the next breaking change release.
22+
- Please see the upcoming breaking changes guide for more information on how to migrate your cmdlets from AzureRM.
2123

2224
## Version 5.0.1
2325
* Fixed assembly loading issue that caused some cmdlets to fail when executing

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Fabrics/GetAzureRmSiteRecoveryFabric.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2929
/// </summary>
3030
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryFabric", DefaultParameterSetName = ASRParameterSets.Default)]
3131
[OutputType(typeof(List<ASRFabric>))]
32+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
33+
"Get-AzureRmRecoveryServicesAsrFabric cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
34+
false)]
3235
public class GetAzureRmSiteRecoveryFabric : SiteRecoveryCmdletBase
3336
{
3437
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Fabrics/NewAzureRmSiteRecoveryFabric.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.New, "AzureRmSiteRecoveryFabric", DefaultParameterSetName = ASRParameterSets.Default)]
2929
[OutputType(typeof(ASRJob))]
30+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
31+
"New-AzureRmRecoveryServicesAsrFabric cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
32+
false)]
3033
public class NewAzureRmSiteRecoveryFabric : SiteRecoveryCmdletBase
3134
{
3235
#region Parameters
@@ -56,7 +59,7 @@ public override void ExecuteSiteRecoveryCmdlet()
5659
{
5760
base.ExecuteSiteRecoveryCmdlet();
5861

59-
string fabricType = string.IsNullOrEmpty(this.Type)? FabricProviders.HyperVSite : this.Type;
62+
string fabricType = string.IsNullOrEmpty(this.Type) ? FabricProviders.HyperVSite : this.Type;
6063

6164
LongRunningOperationResponse response =
6265
RecoveryServicesClient.CreateAzureSiteRecoveryFabric(this.Name, fabricType);

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Fabrics/RemoveAzureRmSiteRecoveryFabric.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.Remove, "AzureRmSiteRecoveryFabric", DefaultParameterSetName = ASRParameterSets.Default, SupportsShouldProcess = true)]
2929
[OutputType(typeof(ASRJob))]
30+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
31+
"Remove-AzureRmRecoveryServicesAsrFabric cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
32+
false)]
3033
public class RemoveAzureRmSiteRecoveryFabric : SiteRecoveryCmdletBase
3134
{
3235
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/GetAzureSiteRecoveryJob.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2525
/// </summary>
2626
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByParam)]
2727
[OutputType(typeof(IEnumerable<ASRJob>))]
28+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
29+
"Get-AzureRmRecoveryServicesAsrJob cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
30+
false)]
2831
public class GetAzureSiteRecoveryJob : SiteRecoveryCmdletBase
2932
{
3033
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/RestartAzureSiteRecoveryJob.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.SiteRecovery
@@ -22,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2223
/// </summary>
2324
[Cmdlet(VerbsLifecycle.Restart, "AzureRmSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)]
2425
[OutputType(typeof(ASRJob))]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"Restart-AzureRmRecoveryServicesAsrJob cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2529
public class RestartAzureSiteRecoveryJob : SiteRecoveryCmdletBase
2630
{
2731
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/ResumeAzureSiteRecoveryJob.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.SiteRecovery
@@ -22,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2223
/// </summary>
2324
[Cmdlet(VerbsLifecycle.Resume, "AzureRmSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)]
2425
[OutputType(typeof(ASRJob))]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"Resume-AzureRmRecoveryServicesAsrJob cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2529
public class ResumeAzureSiteRecoveryJob : SiteRecoveryCmdletBase
2630
{
2731
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Job/StopAzureSiteRecoveryJob.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.SiteRecovery
@@ -22,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2223
/// </summary>
2324
[Cmdlet(VerbsLifecycle.Stop, "AzureRmSiteRecoveryJob", DefaultParameterSetName = ASRParameterSets.ByObject)]
2425
[OutputType(typeof(ASRJob))]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"Stop-AzureRmRecoveryServicesAsrJob cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2529
public class StopAzureSiteRecoveryJob : SiteRecoveryCmdletBase
2630
{
2731
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Network/GetAzureRMSiteRecoveryNetwork.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Collections.Generic;
1718
using System.Linq;
1819
using System.Management.Automation;
@@ -24,6 +25,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2425
/// </summary>
2526
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryNetwork", DefaultParameterSetName = ASRParameterSets.Default)]
2627
[OutputType(typeof(IEnumerable<ASRNetwork>))]
28+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
29+
"Get-AzureRmRecoveryServicesAsrNetwork cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
30+
false)]
2731
public class GetAzureRmSiteRecoveryNetwork : SiteRecoveryCmdletBase
2832
{
2933
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Network/GetAzureRMSiteRecoveryNetworkMapping.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Collections.Generic;
1718
using System.Linq;
1819
using System.Management.Automation;
@@ -24,6 +25,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2425
/// </summary>
2526
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryNetworkMapping", DefaultParameterSetName = ASRParameterSets.Default)]
2627
[OutputType(typeof(IEnumerable<ASRNetworkMapping>))]
28+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
29+
"Get-AzureRmRecoveryServicesAsrNetworkMapping cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
30+
false)]
2731
public class GetAzureRmSiteRecoveryNetworkMapping : SiteRecoveryCmdletBase
2832
{
2933
/// <summary>
@@ -165,7 +169,7 @@ private void FilterE2AMappingsLegacy()
165169
/// Filter Enterprise to Enterprise Network mappings
166170
/// </summary>
167171
private void FilterE2EMappings()
168-
{
172+
{
169173
foreach (NetworkMapping networkMapping in networkMappingsListResponse.NetworkMappingsList)
170174
{
171175
string primaryFabricName = Utilities.GetValueFromArmId(networkMapping.Id, ARMResourceTypeConstants.ReplicationFabrics);

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Network/NewAzureRMSiteRecoveryNetworkMapping.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2323
/// </summary>
2424
[Cmdlet(VerbsCommon.New, "AzureRmSiteRecoveryNetworkMapping")]
2525
[OutputType(typeof(ASRJob))]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"New-AzureRmRecoveryServicesAsrNetworkMapping cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2629
public class NewAzureRmSiteRecoveryNetworkMapping : SiteRecoveryCmdletBase
2730
{
2831
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Network/RemoveAzureRMSiteRecoveryNetworkMapping.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.SiteRecovery.Models;
16+
using System;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.SiteRecovery
@@ -22,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2223
/// </summary>
2324
[Cmdlet(VerbsCommon.Remove, "AzureRmSiteRecoveryNetworkMapping")]
2425
[OutputType(typeof(ASRJob))]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"Remove-AzureRmRecoveryServicesAsrNetworkMapping cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2529
public class RemoveAzureRmSiteRecoveryNetworkMapping : SiteRecoveryCmdletBase
2630
{
2731
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/GetAzureSiteRecoveryPolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2727
/// Retrieves Azure Site Recovery Policy.
2828
/// </summary>
2929
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryPolicy", DefaultParameterSetName = ASRParameterSets.Default)]
30+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
31+
"Get-AzureRmRecoveryServicesAsrPolicy cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
32+
false)]
3033
[OutputType(typeof(IEnumerable<ASRPolicy>))]
3134
public class GetAzureSiteRecoveryPolicy : SiteRecoveryCmdletBase
3235
{

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/NewAzureSiteRecoveryPolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2323
/// Creates Azure Site Recovery Policy object in memory.
2424
/// </summary>
2525
[Cmdlet(VerbsCommon.New, "AzureRmSiteRecoveryPolicy", DefaultParameterSetName = ASRParameterSets.EnterpriseToAzure)]
26+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
27+
"New-AzureRmRecoveryServicesAsrPolicy cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
28+
false)]
2629
public class NewAzureSiteRecoveryPolicy : SiteRecoveryCmdletBase
2730
{
2831
/// <summary>

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/RemoveAzureSiteRecoveryPolicy.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2121
/// Removes Azure Site Recovery Policy.
2222
/// </summary>
2323
[Cmdlet(VerbsCommon.Remove, "AzureRmSiteRecoveryPolicy")]
24+
[System.Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
25+
"Remove-AzureRmRecoveryServicesAsrPolicy cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
26+
false)]
2427
public class RemoveAzureSiteRecoveryPolicy : SiteRecoveryCmdletBase
2528
{
2629
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyAssociationJob.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2525
/// </summary>
2626
[Cmdlet(VerbsLifecycle.Start, "AzureRmSiteRecoveryPolicyAssociationJob", DefaultParameterSetName = ASRParameterSets.EnterpriseToAzure)]
2727
[OutputType(typeof(ASRJob))]
28+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
29+
"New-AzureRmRecoveryServicesAsrProtectionContainerMapping cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
30+
false)]
2831
public class StartAzureSiteRecoveryPolicyAssociationJob : SiteRecoveryCmdletBase
2932
{
3033
#region Parameters

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/StartAzureSiteRecoveryPolicyDissociationJob.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2424
/// </summary>
2525
[Cmdlet(VerbsLifecycle.Start, "AzureRmSiteRecoveryPolicyDissociationJob", DefaultParameterSetName = ASRParameterSets.EnterpriseToAzure)]
2626
[OutputType(typeof(ASRJob))]
27+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
28+
"Remove-AzureRmRecoveryServicesAsrProtectionContainerMapping cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
29+
false)]
2730
public class StartAzureSiteRecoveryPolicyDissociationJob : SiteRecoveryCmdletBase
2831
{
2932

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Policy/UpdateAzureRmSiteRecoveryPolicy.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2727
/// Updates Azure Site Recovery Policy.
2828
/// </summary>
2929
[Cmdlet(VerbsData.Update, "AzureRmSiteRecoveryPolicy", DefaultParameterSetName = ASRParameterSets.Default)]
30+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
31+
"Update-AzureRmRecoveryServicesAsrPolicy cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
32+
false)]
3033
public class UpdateAzureRmSiteRecoveryPolicy : SiteRecoveryCmdletBase
3134
{
3235
#region Private
@@ -188,7 +191,7 @@ private void EnterpriseToEnterprisePolicyObject()
188191
this.replicationMethod = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ReplicationMethod)) ?
189192
((string.Compare(this.ReplicationMethod, Constants.OnlineReplicationMethod, StringComparison.OrdinalIgnoreCase) == 0) ? "OverNetwork" : "Offline") :
190193
((string.Compare(replicationProviderSettings.InitialReplicationMethod, Constants.OnlineReplicationMethod, StringComparison.OrdinalIgnoreCase) == 0) ? "OverNetwork" : "Offline");
191-
this.replicationFrequencyInSeconds = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ReplicationFrequencyInSeconds)) ?
194+
this.replicationFrequencyInSeconds = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ReplicationFrequencyInSeconds)) ?
192195
PSRecoveryServicesClient.ConvertReplicationFrequencyToUshort(this.ReplicationFrequencyInSeconds) :
193196
replicationProviderSettings.ReplicationFrequencyInSeconds;
194197
this.recoveryPoints = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.RecoveryPoints)) ?
@@ -212,7 +215,7 @@ private void EnterpriseToEnterprisePolicyObject()
212215
this.replicaDeletion = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ReplicaDeletion)) ?
213216
this.ReplicaDeletion :
214217
replicationProviderSettings.ReplicaDeletionOption;
215-
218+
216219
var updatePolicyProperties = new UpdatePolicyProperties();
217220

218221
if (string.Compare(this.Policy.ReplicationProvider, Constants.HyperVReplica2012, StringComparison.OrdinalIgnoreCase) == 0)
@@ -240,7 +243,7 @@ private void EnterpriseToEnterprisePolicyObject()
240243
InitialReplicationMethod = this.replicationMethod,
241244
OnlineReplicationStartTime = this.replicationStartTime,
242245
RecoveryPoints = this.recoveryPoints,
243-
ReplicaDeletion = this.replicaDeletion,
246+
ReplicaDeletion = this.replicaDeletion,
244247
ReplicationPort = this.replicationPort,
245248
ReplicationFrequencyInSeconds = replicationFrequencyInSeconds
246249
};
@@ -284,7 +287,7 @@ private void EnterpriseToAzurePolicyObject()
284287
replicationProviderSettings.RecoveryPoints;
285288
this.applicationConsistentSnapshotFrequencyInHours = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ApplicationConsistentSnapshotFrequencyInHours)) ?
286289
this.ApplicationConsistentSnapshotFrequencyInHours :
287-
replicationProviderSettings.ApplicationConsistentSnapshotFrequencyInHours;
290+
replicationProviderSettings.ApplicationConsistentSnapshotFrequencyInHours;
288291
this.replicationStartTime = this.MyInvocation.BoundParameters.ContainsKey(Utilities.GetMemberName(() => this.ReplicationStartTime)) ?
289292
this.replicationStartTime :
290293
replicationProviderSettings.OnlineReplicationStartTime;

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/Properties/Resources.Designer.cs

Lines changed: 10 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectableItem/GetAzureRmSiteRecoveryProtectableItem.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryProtectableItem", DefaultParameterSetName = ASRParameterSets.ByObject)]
2929
[OutputType(typeof(IEnumerable<ASRProtectableItem>))]
30+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
31+
"Get-AzureRmRecoveryServicesAsrProtectableItem cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
32+
false)]
3033
public class GetAzureRmSiteRecoveryProtectableItem : SiteRecoveryCmdletBase
3134
{
3235
#region Parameters
@@ -86,8 +89,8 @@ private void GetByFriendlyName()
8689
ProtectableItemListResponse protectableItemListResponse = RecoveryServicesClient.GetAzureSiteRecoveryProtectableItem(
8790
Utilities.GetValueFromArmId(this.ProtectionContainer.ID, ARMResourceTypeConstants.ReplicationFabrics),
8891
this.ProtectionContainer.Name);
89-
ProtectableItem protectableItem =
90-
protectableItemListResponse.ProtectableItems.SingleOrDefault(t =>
92+
ProtectableItem protectableItem =
93+
protectableItemListResponse.ProtectableItems.SingleOrDefault(t =>
9194
string.Compare(t.Properties.FriendlyName, this.FriendlyName, StringComparison.OrdinalIgnoreCase) == 0);
9295

9396
if (protectableItem != null)

src/ResourceManager/SiteRecovery/Commands.SiteRecovery/ProtectionContainer/GetAzureRmSiteRecoveryProtectionContainer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ namespace Microsoft.Azure.Commands.SiteRecovery
2828
/// </summary>
2929
[Cmdlet(VerbsCommon.Get, "AzureRmSiteRecoveryProtectionContainer", DefaultParameterSetName = ASRParameterSets.Default)]
3030
[OutputType(typeof(IEnumerable<ASRProtectionContainer>))]
31+
[Obsolete("This cmdlet has been marked for deprecation in an upcoming release. Please use the " +
32+
"Get-AzureRmRecoveryServicesAsrProtectionContainer cmdlet from the AzureRm.RecoveryServices.SiteRecovery module instead.",
33+
false)]
3134
public class GetAzureRmSiteRecoveryProtectionContainer : SiteRecoveryCmdletBase
3235
{
3336
#region Parameters

0 commit comments

Comments
 (0)