Skip to content

Breaking changes for Az.RecoveryServices.SiteRecovery #8094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ function Test-CreatePolicy

# Import Azure RecoveryServices Vault Settings File
Import-AzureRmRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath
$currentJob = New-AzureRmRecoveryServicesAsrPolicy -Name $ProtectionProfileName -ReplicationProvider HyperVReplicaAzure -ReplicationFrequencyInSeconds 30 -RecoveryPoints 1 -ApplicationConsistentSnapshotFrequencyInHours 0 -RecoveryAzureStorageAccountId $StorageAccountID -Encryption Disable
$currentJob = New-AzureRmRecoveryServicesAsrPolicy -Name $ProtectionProfileName -ReplicationProvider HyperVReplicaAzure -ReplicationFrequencyInSeconds 30 -RecoveryPoints 1 -ApplicationConsistentSnapshotFrequencyInHours 0 -RecoveryAzureStorageAccountId $StorageAccountID
WaitForJobCompletion -JobId $currentJob.Name
$ProtectionProfile = Get-AzureRmRecoveryServicesAsrPolicy -Name $ProtectionProfileName
$ProtectionProfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function Test-SiteRecoveryCreatePolicy
Import-AzureRmRecoveryServicesAsrVaultSettingsFile -Path $vaultSettingsFilePath

# Create profile
$Job = New-AzureRmRecoveryServicesAsrPolicy -Name $PolicyName -ReplicationProvider HyperVReplicaAzure -ReplicationFrequencyInSeconds 30 -RecoveryPoints 1 -ApplicationConsistentSnapshotFrequencyInHours 0 -Encryption Disable -RecoveryAzureStorageAccountId $RecoveryAzureStorageAccountId
$Job = New-AzureRmRecoveryServicesAsrPolicy -Name $PolicyName -ReplicationProvider HyperVReplicaAzure -ReplicationFrequencyInSeconds 30 -RecoveryPoints 1 -ApplicationConsistentSnapshotFrequencyInHours 0 -RecoveryAzureStorageAccountId $RecoveryAzureStorageAccountId
WaitForJobCompletion -JobId $Job.Name -JobQueryWaitTimeInSeconds $JobQueryWaitTimeInSeconds

# Get a profile created (with name ppAzure)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
-->
## Current Release


## Version 1.0.0
* General availability of `Az.RecoveryServices` module
* General availability of `Az.RecoveryServices` module
* Remove -Encryption parameter from New/Set-AzRecoveryServicesAsrPolicy
Original file line number Diff line number Diff line change
Expand Up @@ -211,18 +211,6 @@ public class NewAzureRmRecoveryServicesAsrPolicy : SiteRecoveryCmdletBase
[ValidateNotNullOrEmpty]
public string RecoveryAzureStorageAccountId { get; set; }

/// <summary>
/// Gets or sets if encryption should be enabled or disabled.
/// todo : vipin add in breaking changes list.Mark obsolete for now.
/// </summary>
[Parameter(ParameterSetName = ASRParameterSets.HyperVToAzure)]
[DefaultValue(Constants.Disable)]
[Obsolete("cmdlet parameter will be removed in upcoming breaking release")]
[ValidateSet(
Constants.Enable,
Constants.Disable)]
public string Encryption { get; set; }

/// <summary>
/// Gets or sets the multiVm sync status for the policy.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,6 @@ public class UpdateAzureRmRecoveryServicesAsrPolicy : SiteRecoveryCmdletBase
[ValidateNotNullOrEmpty]
public string RecoveryAzureStorageAccountId { get; set; }

/// <summary>
/// Gets or sets encryption should be enabled or disabled.
/// </summary>

[Parameter(ParameterSetName = ASRParameterSets.HyperVToAzure)]
[Parameter(ParameterSetName = ASRParameterSets.Default)]
[Obsolete("cmdlet parameter will be removed in upcoming breaking release")]
[ValidateNotNullOrEmpty]
[ValidateSet(
Constants.Enable,
Constants.Disable)]
public string Encryption { get; set; }

/// <summary>
/// Gets or sets multiVm sync status for the policy.
/// </summary>
Expand Down Expand Up @@ -352,8 +339,6 @@ private void HyperVToAzurePolicyObject()
{
ApplicationConsistentSnapshotFrequencyInHours =
this.applicationConsistentSnapshotFrequencyInHours,
// encryption is removed from latest API . Service is setting the default vault internally.
// todo :: Warning.
OnlineReplicationStartTime = this.replicationStartTime.ToString(),
RecoveryPointHistoryDuration = this.recoveryPoints,
ReplicationInterval = this.replicationFrequencyInSeconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Creates an Azure Site Recovery replication policy.
New-AzRecoveryServicesAsrPolicy [-HyperVToAzure] -Name <String> -ReplicationProvider <String>
-ReplicationFrequencyInSeconds <String> [-NumberOfRecoveryPointsToRetain <Int32>]
[-ApplicationConsistentSnapshotFrequencyInHours <Int32>] [-ReplicationStartTime <TimeSpan>]
[-RecoveryAzureStorageAccountId <String>] [-Encryption <String>] [-DefaultProfile <IAzureContextContainer>]
[-RecoveryAzureStorageAccountId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -219,22 +219,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Encryption
{{Fill Encryption Description}}

```yaml
Type: System.String
Parameter Sets: HyperVToAzure
Aliases:
Accepted values: Enable, Disable

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -HyperVToAzure
Switch parameter to specify policy is to be used to replicate Hyper-V virtual machines to Azure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Update-AzRecoveryServicesAsrPolicy -InputObject <ASRPolicy> [-ReplicationMethod
[-ReplicationFrequencyInSeconds <String>] [-NumberOfRecoveryPointsToRetain <Int32>]
[-ApplicationConsistentSnapshotFrequencyInHours <Int32>] [-Compression <String>] [-ReplicationPort <UInt16>]
[-Authentication <String>] [-ReplicationStartTime <TimeSpan>] [-ReplicaDeletion <String>]
[-RecoveryAzureStorageAccountId <String>] [-Encryption <String>] [-DefaultProfile <IAzureContextContainer>]
[-RecoveryAzureStorageAccountId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -51,7 +51,7 @@ Update-AzRecoveryServicesAsrPolicy [-AzureToVMware] -InputObject <ASRPolicy>
Update-AzRecoveryServicesAsrPolicy [-HyperVToAzure] -InputObject <ASRPolicy>
[-ReplicationFrequencyInSeconds <String>] [-NumberOfRecoveryPointsToRetain <Int32>]
[-ApplicationConsistentSnapshotFrequencyInHours <Int32>] [-ReplicationStartTime <TimeSpan>]
[-RecoveryAzureStorageAccountId <String>] [-Encryption <String>] [-DefaultProfile <IAzureContextContainer>]
[-RecoveryAzureStorageAccountId <String>] [-DefaultProfile <IAzureContextContainer>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand Down Expand Up @@ -185,22 +185,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Encryption
{{Fill Encryption Description}}

```yaml
Type: System.String
Parameter Sets: Default, HyperVToAzure
Aliases:
Accepted values: Enable, Disable

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -HyperVToAzure
Switch parameter indicating that the specfied policy is used to replicate Hyper-V virtual machines to Azure.

Expand Down