Skip to content

Commit

Permalink
Honoring Disk encryption set Id as input for VMWare to Azure and Hype…
Browse files Browse the repository at this point in the history
…V to Azure scenarios
  • Loading branch information
AnuTalluri committed Dec 12, 2019
1 parent fd9b320 commit 1dfab13
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,27 @@ public AzureVmDiskDetails()
/// </summary>
/// <param name="vhdType">VHD type.</param>
/// <param name="vhdId">The VHD id.</param>
/// <param name="diskId">The disk id.</param>
/// <param name="vhdName">VHD name.</param>
/// <param name="maxSizeMB">Max side in MB.</param>
/// <param name="targetDiskLocation">Blob uri of the Azure
/// disk.</param>
/// <param name="targetDiskName">The target Azure disk name.</param>
/// <param name="lunId">Ordinal\LunId of the disk for the Azure
/// VM.</param>
public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string diskId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string), string diskEncryptionSetId = default(string))
{
VhdType = vhdType;
VhdId = vhdId;
DiskId = diskId;
VhdName = vhdName;
MaxSizeMB = maxSizeMB;
TargetDiskLocation = targetDiskLocation;
TargetDiskName = targetDiskName;
LunId = lunId;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand All @@ -67,6 +72,12 @@ public AzureVmDiskDetails()
[JsonProperty(PropertyName = "vhdId")]
public string VhdId { get; set; }

/// <summary>
/// Gets or sets the disk id.
/// </summary>
[JsonProperty(PropertyName = "diskId")]
public string DiskId { get; set; }

/// <summary>
/// Gets or sets VHD name.
/// </summary>
Expand Down Expand Up @@ -97,5 +108,11 @@ public AzureVmDiskDetails()
[JsonProperty(PropertyName = "lunId")]
public string LunId { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
Expand Down Expand Up @@ -38,11 +40,14 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput()
/// resource group Id for resource manager deployment.</param>
/// <param name="useManagedDisks">A value indicating whether managed
/// disks should be used during failover.</param>
public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string))
/// <param name="diskIdToDiskEncryptionMap">The disk Id to disk
/// encryption set map.</param>
public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), IDictionary<string, string> diskIdToDiskEncryptionMap = default(IDictionary<string, string>))
{
RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId;
RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId;
UseManagedDisks = useManagedDisks;
DiskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap;
CustomInit();
}

Expand Down Expand Up @@ -72,5 +77,11 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput()
[JsonProperty(PropertyName = "useManagedDisks")]
public string UseManagedDisks { get; set; }

/// <summary>
/// Gets or sets the disk Id to disk encryption set map.
/// </summary>
[JsonProperty(PropertyName = "diskIdToDiskEncryptionMap")]
public IDictionary<string, string> DiskIdToDiskEncryptionMap { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ public InMageAzureV2DiskInputDetails()
/// <param name="logStorageAccountId">The LogStorageAccountId.</param>
/// <param name="diskType">The DiskType. Possible values include:
/// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS'</param>
public InMageAzureV2DiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public InMageAzureV2DiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string))
{
DiskId = diskId;
LogStorageAccountId = logStorageAccountId;
DiskType = diskType;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand Down Expand Up @@ -67,5 +70,11 @@ public InMageAzureV2DiskInputDetails()
[JsonProperty(PropertyName = "diskType")]
public string DiskType { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public InMageAzureV2EnableProtectionInput()
/// failover VM is to be created.</param>
/// <param name="diskType">The DiskType. Possible values include:
/// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS'</param>
public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList<InMageAzureV2DiskInputDetails> disksToInclude = default(IList<InMageAzureV2DiskInputDetails>), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList<InMageAzureV2DiskInputDetails> disksToInclude = default(IList<InMageAzureV2DiskInputDetails>), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string))
{
MasterTargetId = masterTargetId;
ProcessServerId = processServerId;
Expand All @@ -76,6 +78,7 @@ public InMageAzureV2EnableProtectionInput()
TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId;
TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId;
DiskType = diskType;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand Down Expand Up @@ -180,5 +183,11 @@ public InMageAzureV2EnableProtectionInput()
[JsonProperty(PropertyName = "diskType")]
public string DiskType { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
<PropertyGroup>
<PackageId>Microsoft.Azure.Management.RecoveryServices.SiteRecovery</PackageId>
<Description>Provides developers with libraries for the updated recovery services site recovery feature under Azure Resource manager.</Description>
<Version>2.0.3-preview</Version>
<Version>2.0.4-preview</Version>
<AssemblyName>Microsoft.Azure.Management.RecoveryServices.SiteRecovery</AssemblyName>
<PackageTags>Recoveryservices;SiteRecovery;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
Updates in this release:
- Azure Site Recovery (ASR) service now supports protection for VMs encrypted without AD app.
* Incremental changes:
** Azure Site Recovery (ASR) service now supports protection for VMs encrypted without AD app
]]>
Updates in this release:
* Incremental changes:
** Azure Site Recovery (ASR) service now supports Customer-managed keys for managed disks in VMWare to Azure and HyperV to Azure scenarios.
]]>
</PackageReleaseNotes>
</PropertyGroup>
<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[assembly: AssemblyTitle("Microsoft Azure Recovery Services SiteRecovery Library")]
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Recovery Services SiteRecovery Resources.")]

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.3.0")]
[assembly: AssemblyVersion("2.0.4.0")]
[assembly: AssemblyFileVersion("2.0.4.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
Expand Down

0 comments on commit 1dfab13

Please sign in to comment.