Skip to content

Commit cfff3fb

Browse files
committed
Taking in PR comments
The Protection Profile model related changes will be taken up in the next iteration.
1 parent 2524b65 commit cfff3fb

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,6 @@ ClientRequestId: {3}</value>
204204
<value>Cannot generate vault credentials for this vault. Download it from the Azure Portal.</value>
205205
</data>
206206
<data name="StorageIsNotAssociatedWithTheAccount" xml:space="preserve">
207-
<value>Storage {0} is not associated with the account</value>
207+
<value>Storage account {0} is not associated with the account</value>
208208
</data>
209209
</root>

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/CreateAzureSiteRecoveryProtectionProfileObject.cs

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ namespace Microsoft.Azure.Commands.RecoveryServices
2323
/// <summary>
2424
/// Creates Azure Site Recovery Protection Profile object in memory.
2525
/// </summary>
26-
[Cmdlet(VerbsCommon.New, "AzureSiteRecoveryProtectionProfile", DefaultParameterSetName = ASRParameterSets.Default)]
26+
[Cmdlet(VerbsCommon.New, "AzureSiteRecoveryProtectionProfile", DefaultParameterSetName = ASRParameterSets.EnterpriseToEnterprise)]
2727
[OutputType(typeof(ASRProtectionProfile))]
2828
public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCmdletBase
2929
{
3030
#region Parameters
3131

3232
/// <summary>
33-
/// Gets or sets Replication Type of the Protection Profile.
33+
/// Gets or sets Replication Provider of the Protection Profile.
3434
/// </summary>
3535
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
3636
[ValidateNotNullOrEmpty]
@@ -42,7 +42,8 @@ public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCm
4242
/// <summary>
4343
/// Gets or sets a value for Replication Method of the Protection Profile.
4444
/// </summary>
45-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
45+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
46+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
4647
[ValidateNotNullOrEmpty]
4748
[ValidateSet(
4849
"Online",
@@ -66,50 +67,57 @@ public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCm
6667
/// <summary>
6768
/// Gets or sets Replication Frequency of the Protection Profile in seconds.
6869
/// </summary>
69-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
70+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
71+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
7072
[ValidateNotNullOrEmpty]
71-
public int ReplicationFrequencySecond { get; set; }
73+
public int ReplicationFrequencyInSeconds { get; set; }
7274

7375
/// <summary>
7476
/// Gets or sets Recovery Points of the Protection Profile.
7577
/// </summary>
76-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
78+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
79+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
7780
[ValidateNotNullOrEmpty]
7881
public int RecoveryPoints { get; set; }
7982

8083
/// <summary>
8184
/// Gets or sets Application Consistent Snapshot Frequency of the Protection Profile in hours.
8285
/// </summary>
83-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
86+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
87+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
8488
[ValidateNotNullOrEmpty]
8589
public int ApplicationConsistentSnapshotFrequencyInHours { get; set; }
8690

8791
/// <summary>
8892
/// Gets or sets a value indicating whether Compression needs to be Enabled on the Protection Profile.
8993
/// </summary>
90-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
94+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
95+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
9196
[ValidateNotNullOrEmpty]
9297
public bool CompressionEnabled { get; set; }
9398

9499
/// <summary>
95100
/// Gets or sets the Replication Port of the Protection Profile.
96101
/// </summary>
97-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
102+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
103+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
98104
[ValidateNotNullOrEmpty]
99105
public int ReplicationPort { get; set; }
100106

101107
/// <summary>
102108
/// Gets or sets Replication Start time of the Protection Profile.
103109
/// </summary>
104-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
110+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
111+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
105112
[ValidateNotNullOrEmpty]
106113
public int ReplicationStartTime { get; set; }
107114

108115
/// <summary>
109116
/// Gets or sets a value indicating whether Replica should be Deleted on
110117
/// disabling protection of a protection entity protected by the Protection Profile.
111118
/// </summary>
112-
[Parameter(ParameterSetName = ASRParameterSets.Default, Mandatory = true)]
119+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
120+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
113121
[ValidateNotNullOrEmpty]
114122
public bool AllowReplicaDeletion { get; set; }
115123

@@ -165,7 +173,7 @@ private void EnterpriseToAzureProtectionProfileObject()
165173
ReplicationMethod = this.ReplicationMethod,
166174
RecoveryAzureSubscription = this.RecoveryAzureSubscription,
167175
RecoveryAzureStorageAccountName = this.RecoveryAzureStorageAccount,
168-
ReplicationFrequencySecond = this.ReplicationFrequencySecond,
176+
ReplicationFrequencySecond = this.ReplicationFrequencyInSeconds,
169177
RecoveryPoints = this.RecoveryPoints,
170178
ApplicationConsistentSnapshotFrequencyInHours = this.ApplicationConsistentSnapshotFrequencyInHours,
171179
CompressionEnabled = this.CompressionEnabled,
@@ -188,7 +196,7 @@ private void EnterpriseToEnterpriseProtectionProfileObject()
188196
ReplicationMethod = this.ReplicationMethod,
189197
RecoveryAzureSubscription = null,
190198
RecoveryAzureStorageAccountName = null,
191-
ReplicationFrequencySecond = this.ReplicationFrequencySecond,
199+
ReplicationFrequencySecond = this.ReplicationFrequencyInSeconds,
192200
RecoveryPoints = this.RecoveryPoints,
193201
ApplicationConsistentSnapshotFrequencyInHours = this.ApplicationConsistentSnapshotFrequencyInHours,
194202
CompressionEnabled = this.CompressionEnabled,

0 commit comments

Comments
 (0)