Skip to content

Commit 36e731c

Browse files
committed
Merge pull request #221 from MabOneSdk/mkheranidev1
Removing location from RPResponse and taking dependancy on vault loca…
2 parents 0badd7d + 9cc971c commit 36e731c

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Helpers/Conversions/RecoveryPointConversions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ public static List<AzureRmRecoveryServicesRecoveryPointBase> GetPSAzureRecoveryP
3535
AzureRmRecoveryServicesIaasVmRecoveryPoint rpBase = new AzureRmRecoveryServicesIaasVmRecoveryPoint()
3636
{
3737
BackupManagementType = item.BackupManagementType,
38-
ContainerName = item.ContainerName,
3938
ItemName = item.Name,
39+
ContainerName = item.ContainerName,
4040
ContainerType = item.ContainerType,
4141
RecoveryPointTime = Convert.ToDateTime(recPoint.RecoveryPointTime).ToLocalTime(),
4242
RecoveryPointType = recPoint.RecoveryPointType,
43+
RecoveryPointId = rp.Id,
4344
WorkloadType = item.WorkloadType,
4445
RecoveryPointAdditionalInfo = recPoint.RecoveryPointAdditionalInfo,
4546
};
@@ -67,7 +68,6 @@ public static AzureRmRecoveryServicesRecoveryPointBase GetPSAzureRecoveryPoints(
6768
RecoveryPointTime = Convert.ToDateTime(recPoint.RecoveryPointTime).ToLocalTime(),
6869
RecoveryPointType = recPoint.RecoveryPointType,
6970
RecoveryPointId = rpResponse.RecPoint.Id,
70-
Region = rpResponse.Location,
7171
WorkloadType = item.WorkloadType,
7272
RecoveryPointAdditionalInfo = recPoint.RecoveryPointAdditionalInfo,
7373
};

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.HydraAdapter/BMSAPIs/RestoreDiskAPIs.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public BaseRecoveryServicesJobResponse RestoreDisk(AzureRmRecoveryServicesIaasVm
2323
{
2424
string resourceGroupName = BmsAdapter.GetResourceGroupName();
2525
string resourceName = BmsAdapter.GetResourceName();
26+
string location = BmsAdapter.GetResourceLocation();
2627

2728
string containerName = rp.ContainerName;
2829
string protectedItemName = rp.ItemName;
@@ -35,7 +36,7 @@ public BaseRecoveryServicesJobResponse RestoreDisk(AzureRmRecoveryServicesIaasVm
3536
CreateNewCloudService = false,
3637
RecoveryPointId = recoveryPointId,
3738
RecoveryType = RecoveryType.RestoreDisks,
38-
Region = rp.Region,
39+
Region = location,
3940
StorageAccountName = storageAccountId,
4041
SubnetName = string.Empty,
4142
VirtualMachineName = string.Empty,

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.HydraAdapter/ClientProxyBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,10 @@ public string GetResourceGroupName()
6767
{
6868
return PSRecoveryServicesClient.arsVault.ResouceGroupName;
6969
}
70+
71+
public string GetResourceLocation()
72+
{
73+
return PSRecoveryServicesClient.arsVault.Location;
74+
}
7075
}
7176
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/AzureVmModels/AzureRmRecoveryServicesAzureVmRecoveryPoint.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public class AzureRmRecoveryServicesIaasVmRecoveryPoint : AzureRmRecoveryService
2828
///
2929
public string RecoveryPointAdditionalInfo { get; set; }
3030

31-
public string Region { get; set; }
32-
3331
public AzureRmRecoveryServicesIaasVmRecoveryPoint()
3432
{
3533

0 commit comments

Comments
 (0)