Skip to content

Commit 868e90b

Browse files
committed
Merging conflicts in protection profile object
Changing Replication start time type.
1 parent 202061c commit 868e90b

File tree

3 files changed

+16
-153
lines changed

3 files changed

+16
-153
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public class CreateAzureSiteRecoveryProtectionProfileObject : RecoveryServicesCm
110110
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToEnterprise, Mandatory = true)]
111111
[Parameter(ParameterSetName = ASRParameterSets.EnterpriseToAzure, Mandatory = true)]
112112
[ValidateNotNullOrEmpty]
113-
public int ReplicationStartTime { get; set; }
113+
public TimeSpan? ReplicationStartTime { get; set; }
114114

115115
/// <summary>
116116
/// Gets or sets a value indicating whether Replica should be Deleted on
@@ -173,7 +173,7 @@ private void EnterpriseToAzureProtectionProfileObject()
173173
ReplicationMethod = this.ReplicationMethod,
174174
RecoveryAzureSubscription = this.RecoveryAzureSubscription,
175175
RecoveryAzureStorageAccountName = this.RecoveryAzureStorageAccount,
176-
ReplicationFrequencySecond = this.ReplicationFrequencyInSeconds,
176+
ReplicationFrequencyInSeconds = this.ReplicationFrequencyInSeconds,
177177
RecoveryPoints = this.RecoveryPoints,
178178
ApplicationConsistentSnapshotFrequencyInHours = this.ApplicationConsistentSnapshotFrequencyInHours,
179179
CompressionEnabled = this.CompressionEnabled,
@@ -196,7 +196,7 @@ private void EnterpriseToEnterpriseProtectionProfileObject()
196196
ReplicationMethod = this.ReplicationMethod,
197197
RecoveryAzureSubscription = null,
198198
RecoveryAzureStorageAccountName = null,
199-
ReplicationFrequencySecond = this.ReplicationFrequencyInSeconds,
199+
ReplicationFrequencyInSeconds = this.ReplicationFrequencyInSeconds,
200200
RecoveryPoints = this.RecoveryPoints,
201201
ApplicationConsistentSnapshotFrequencyInHours = this.ApplicationConsistentSnapshotFrequencyInHours,
202202
CompressionEnabled = this.CompressionEnabled,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public override void ExecuteCmdlet()
177177
this.ValidateUsageById(this.ProtectionEntity.ReplicationProvider);
178178
}
179179

180-
if (this.ProtectionProfile.ReplicationType == Constants.HyperVReplicaAzure)
180+
if (this.ProtectionProfile.ReplicationProvider == Constants.HyperVReplicaAzure)
181181
{
182182
input.ProtectionProfileId = this.ProtectionProfile.ID;
183183
AzureEnableProtectionInput azureInput = new AzureEnableProtectionInput();

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/lib/PSObjects.cs

Lines changed: 12 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ public ASRProtectionContainer(ProtectionContainer pc)
320320

321321
asrProtectionProfile.ApplicationConsistentSnapshotFrequencyInHours =
322322
details.AppConsistencyFreq;
323-
asrProtectionProfile.RecoveryAzureStorageAccount =
323+
asrProtectionProfile.RecoveryAzureStorageAccountName =
324324
details.ActiveStorageAccount.StorageAccountName;
325325
asrProtectionProfile.RecoveryAzureSubscription =
326326
details.ActiveStorageAccount.SubscriptionId;
327-
asrProtectionProfile.ReplicationFrequencySecond = details.ReplicationInterval;
327+
asrProtectionProfile.ReplicationFrequencyInSeconds = details.ReplicationInterval;
328328
asrProtectionProfile.ReplicationMethod = details.OnlineIrStartTime.HasValue ?
329329
Constants.OnlineReplicationMethod :
330330
Constants.OfflineReplicationMethod;
@@ -345,9 +345,9 @@ public ASRProtectionContainer(ProtectionContainer pc)
345345

346346
asrProtectionProfile.CompressionEnabled = details.IsCompressionEnabled;
347347

348-
asrProtectionProfile.RecoveryAzureStorageAccount = null;
348+
asrProtectionProfile.RecoveryAzureStorageAccountName = null;
349349
asrProtectionProfile.RecoveryAzureSubscription = null;
350-
asrProtectionProfile.ReplicationFrequencySecond = 0;
350+
asrProtectionProfile.ReplicationFrequencyInSeconds = 0;
351351

352352
asrProtectionProfile.RecoveryPoints = details.NosOfRps;
353353
asrProtectionProfile.ReplicationMethod = details.IsOnlineIr ?
@@ -359,7 +359,7 @@ public ASRProtectionContainer(ProtectionContainer pc)
359359

360360
asrProtectionProfile.ID = profile.ID;
361361
asrProtectionProfile.Name = profile.Name;
362-
asrProtectionProfile.ReplicationType = profile.ReplicationProvider;
362+
asrProtectionProfile.ReplicationProvider = profile.ReplicationProvider;
363363
asrProtectionProfile.CanDissociate = profile.CanDissociate;
364364

365365
this.AvailableProtectionProfiles.Add(asrProtectionProfile);
@@ -500,6 +500,11 @@ public ASRProtectionProfile(ProtectionProfile protectionProfile)
500500
/// </summary>
501501
public string ReplicationMethod { get; set; }
502502

503+
/// <summary>
504+
/// Gets or sets a value indicating whether profile can be dissociated or not.
505+
/// </summary>
506+
public bool CanDissociate { get; set; }
507+
503508
/// <summary>
504509
/// Gets or sets Association Details.
505510
/// </summary>
@@ -518,7 +523,7 @@ public ASRProtectionProfile(ProtectionProfile protectionProfile)
518523
/// <summary>
519524
/// Gets or sets Replication Frequency in seconds.
520525
/// </summary>
521-
public int ReplicationFrequencySecond { get; set; }
526+
public int ReplicationFrequencyInSeconds { get; set; }
522527

523528
/// <summary>
524529
/// Gets or sets Recovery Points.
@@ -543,7 +548,7 @@ public ASRProtectionProfile(ProtectionProfile protectionProfile)
543548
/// <summary>
544549
/// Gets or sets Replication Start Time.
545550
/// </summary>
546-
public int ReplicationStartTime { get; set; }
551+
public TimeSpan? ReplicationStartTime { get; set; }
547552

548553
/// <summary>
549554
/// Gets or sets a value indicating whether Replica Deletion should be enabled.
@@ -1450,148 +1455,6 @@ public ASRProviderError(ProviderError error)
14501455
public string ErrorLevel { get; set; }
14511456
}
14521457

1453-
/// <summary>
1454-
/// Protection profile association details.
1455-
/// </summary>
1456-
[DataContract(Namespace = "http://schemas.microsoft.com/windowsazure")]
1457-
[SuppressMessage(
1458-
"Microsoft.StyleCop.CSharp.MaintainabilityRules",
1459-
"SA1402:FileMayOnlyContainASingleClass",
1460-
Justification = "Keeping all related public classes together.")]
1461-
public class ASRProtectionProfileAssociationDetails
1462-
{
1463-
/// <summary>
1464-
/// Gets or sets the PrimaryProtectionContainerId.
1465-
/// </summary>
1466-
[DataMember(Order = 1)]
1467-
public string PrimaryProtectionContainerId { get; set; }
1468-
1469-
/// <summary>
1470-
/// Gets or sets the RecoveryProtectionContainerId.
1471-
/// </summary>
1472-
[DataMember(Order = 2)]
1473-
public string RecoveryProtectionContainerId { get; set; }
1474-
1475-
/// <summary>
1476-
/// Gets or sets the association status. This is a string representation of the
1477-
/// enumeration type <see cref="CloudPairingStatus"/>.
1478-
/// </summary>
1479-
[DataMember(Order = 3)]
1480-
public string AssociationStatus { get; set; }
1481-
}
1482-
1483-
/// <summary>
1484-
/// Azure Site Recovery Protection Profile.
1485-
/// </summary>
1486-
[SuppressMessage(
1487-
"Microsoft.StyleCop.CSharp.MaintainabilityRules",
1488-
"SA1402:FileMayOnlyContainASingleClass",
1489-
Justification = "Keeping all related objects together.")]
1490-
public class ASRProtectionProfile
1491-
{
1492-
/// <summary>
1493-
/// Initializes a new instance of the <see cref="ASRProtectionProfile" /> class.
1494-
/// </summary>
1495-
public ASRProtectionProfile()
1496-
{
1497-
}
1498-
1499-
/// <summary>
1500-
/// Initializes a new instance of the <see cref="ASRProtectionProfile" /> class with
1501-
/// required parameters.
1502-
/// </summary>
1503-
/// <param name="protectionProfile">Protection container object</param>
1504-
public ASRProtectionProfile(ProtectionProfile protectionProfile)
1505-
{
1506-
this.ID = protectionProfile.ID;
1507-
this.Name = protectionProfile.Name;
1508-
this.ReplicationType = protectionProfile.ReplicationProvider;
1509-
}
1510-
1511-
#region Properties
1512-
/// <summary>
1513-
/// Gets or sets name of the Protection profile.
1514-
/// </summary>
1515-
public string Name { get; set; }
1516-
1517-
/// <summary>
1518-
/// Gets or sets Protection profile ID.
1519-
/// </summary>
1520-
public string ID { get; set; }
1521-
1522-
/// <summary>
1523-
/// Gets or sets Replication Type (HyperVReplica, HyperVReplicaAzure)
1524-
/// </summary>
1525-
public string ReplicationType { get; set; }
1526-
1527-
/// <summary>
1528-
/// Gets or sets a value indicating whether profile can be dissociated or not.
1529-
/// </summary>
1530-
public bool CanDissociate { get; set; }
1531-
1532-
/// <summary>
1533-
/// Gets or sets Replication Method.
1534-
/// </summary>
1535-
public string ReplicationMethod { get; set; }
1536-
1537-
/////// <summary>
1538-
/////// Gets or sets Recovery Protection Container.
1539-
/////// </summary>
1540-
////public ProtectionContainer RecoveryProtectionContainer { get; set; }
1541-
1542-
/// <summary>
1543-
/// Gets or sets Association Details.
1544-
/// </summary>
1545-
public List<ASRProtectionProfileAssociationDetails> AssociationDetail { get; set; }
1546-
1547-
/// <summary>
1548-
/// Gets or sets Recovery Azure Subscription.
1549-
/// </summary>
1550-
public string RecoveryAzureSubscription { get; set; }
1551-
1552-
/// <summary>
1553-
/// Gets or sets Recovery Azure Storage Account.
1554-
/// </summary>
1555-
public string RecoveryAzureStorageAccount { get; set; }
1556-
1557-
/// <summary>
1558-
/// Gets or sets Replication Frequency in seconds.
1559-
/// </summary>
1560-
public int ReplicationFrequencySecond { get; set; }
1561-
1562-
/// <summary>
1563-
/// Gets or sets Recovery Points.
1564-
/// </summary>
1565-
public int RecoveryPoints { get; set; }
1566-
1567-
/// <summary>
1568-
/// Gets or sets Application Consistent Snapshot Frequency in hours.
1569-
/// </summary>
1570-
public int ApplicationConsistentSnapshotFrequencyInHours { get; set; }
1571-
1572-
/// <summary>
1573-
/// Gets or sets a value indicating whether Compression is Enabled.
1574-
/// </summary>
1575-
public bool CompressionEnabled { get; set; }
1576-
1577-
/// <summary>
1578-
/// Gets or sets the replication port.
1579-
/// </summary>
1580-
public int ReplicationPort { get; set; }
1581-
1582-
/// <summary>
1583-
/// Gets or sets Replication Start Time.
1584-
/// </summary>
1585-
public TimeSpan? ReplicationStartTime { get; set; }
1586-
1587-
/// <summary>
1588-
/// Gets or sets a value indicating whether Replica Deletion should be enabled.
1589-
/// </summary>
1590-
public bool AllowReplicaDeletion { get; set; }
1591-
1592-
#endregion
1593-
}
1594-
15951458
/// <summary>
15961459
/// Disk details.
15971460
/// </summary>

0 commit comments

Comments
 (0)