Skip to content

Commit ee80e93

Browse files
committed
Bug fixes in new protection profile cmdlet
1 parent 7a72b59 commit ee80e93

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCm
7676
/// <summary>
7777
/// Gets or sets Replication Frequency of the Protection Profile in seconds.
7878
/// </summary>
79-
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise)]
80-
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure)]
79+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
80+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
8181
[ValidateNotNullOrEmpty]
8282
[ValidateSet(
8383
Constants.Thirty,
@@ -113,7 +113,7 @@ public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCm
113113
/// <summary>
114114
/// Gets or sets the Replication Port of the Protection Profile.
115115
/// </summary>
116-
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise)]
116+
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
117117
[ValidateNotNullOrEmpty]
118118
public ushort ReplicationPort { get; set; }
119119

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ HyperVReplicaProtectionProfileInput hyperVReplicaProtectionProfileInput
170170
ReplicationFrequencyInSeconds = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.ReplicationFrequencyInSeconds,
171171
OnlineReplicationStartTime = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.ReplicationStartTime,
172172
CompressionEnabled = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.CompressionEnabled,
173-
OnlineReplicationMethod = (string.Compare(this.ProtectionProfile.HyperVReplicaProviderSettingsObject.ReplicationMethod, Constants.OnlineReplicationMethod, StringComparison.OrdinalIgnoreCase) == 1) ? true : false,
173+
OnlineReplicationMethod = (string.Compare(this.ProtectionProfile.HyperVReplicaProviderSettingsObject.ReplicationMethod, Constants.OnlineReplicationMethod, StringComparison.OrdinalIgnoreCase) == 0) ? true : false,
174174
RecoveryPoints = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.RecoveryPoints,
175175
ReplicationPort = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.ReplicationPort,
176176
AllowReplicaDeletion = this.ProtectionProfile.HyperVReplicaProviderSettingsObject.AllowReplicaDeletion,

0 commit comments

Comments
 (0)