Skip to content

Commit 326ebb9

Browse files
committed
Merge pull request #252 from MabOneSdk/pikumar-dev1
Changing cmdletName and updating hydra dll.
2 parents ad81bb1 + 20a8459 commit 326ebb9

File tree

7 files changed

+13
-23
lines changed

7 files changed

+13
-23
lines changed

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/BaseObjects.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public AzureRmRecoveryServicesContainerContext(ContainerType containerType, stri
5454

5555
public class AzureRmRecoveryServicesBackupEngineContext : AzureRmRecoveryServicesBackupManagementContext
5656
{
57-
public BackupEngineType BackupEngineType { get; set; }
57+
public string BackupEngineType { get; set; }
5858

5959
public AzureRmRecoveryServicesBackupEngineContext() { }
6060

61-
public AzureRmRecoveryServicesBackupEngineContext(BackupEngineType backupEngineType, string backupManagementType)
61+
public AzureRmRecoveryServicesBackupEngineContext(string backupEngineType, string backupManagementType)
6262
: base(backupManagementType)
6363
{
6464
BackupEngineType = backupEngineType;
@@ -88,7 +88,7 @@ public class AzureRmRecoveryServicesBackupEngineBase : AzureRmRecoveryServicesBa
8888
public string Name { get; set; }
8989

9090
public AzureRmRecoveryServicesBackupEngineBase(BackupEngineResource backupEngine)
91-
: base(ConversionUtils.GetPsBackupEngineType(((BackupEngineBase)backupEngine.Properties).BackupEngineType),
91+
: base(((BackupEngineBase)backupEngine.Properties).BackupEngineType,
9292
((BackupEngineBase)backupEngine.Properties).BackupManagementType)
9393
{
9494
Name = backupEngine.Name;

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/CommonModels/Enums.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,19 @@ public enum ContainerType
2727
Windows
2828
}
2929

30-
public enum BackupEngineType
31-
{
32-
Invalid = 0,
33-
34-
DpmEngine,
35-
36-
DpmVenusEngine
37-
}
38-
3930
public enum BackupManagementType
4031
{
4132
AzureVM = 1,
4233
MARS,
4334
SCDPM
4435
}
4536

37+
public enum BackupEngineType
38+
{
39+
DpmBackupEngine = 1,
40+
AzureBackupServerEngine
41+
}
42+
4643
public enum WorkloadType
4744
{
4845
AzureVM = 1,

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/CommonModels/Utils.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,6 @@ public static ContainerType GetPsContainerType(string containerType)
150150
}
151151
}
152152

153-
public static BackupEngineType GetPsBackupEngineType(string backupEngineType)
154-
{
155-
BackupEngineType type = 0;
156-
Enum.TryParse(backupEngineType, out type);
157-
return type;
158-
}
159-
160153
public static WorkloadType GetPsWorkloadType(string workloadType)
161154
{
162155
if (workloadType == Microsoft.Azure.Management.RecoveryServices.Backup.Models.WorkloadType.VM)

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Test/ScenarioTests/IaasVm/PolicyTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Test-PolicyScenario
2828
$schedulePolicy = Get-AzureRmRecoveryServicesSchedulePolicyObject -WorkloadType "AzureVM"
2929
$retPolicy = Get-AzureRmRecoveryServicesBackupRetentionPolicyObject -WorkloadType "AzureVM"
3030

31-
$temp = Get-AzureRmRecoveryServicesProtectionPolicy -Name "pwtest1"
31+
$temp = Get-AzureRmRecoveryServicesBackupProtectionPolicy -Name "pwtest1"
3232
Set-AzureRmRecoveryServicesBackupProtectionPolicy -RetentionPolicy $retPolicy -SchedulePolicy $schedulePolicy -Policy $temp
3333

3434
#cleanup
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2727
/// <summary>
2828
/// Get list of containers
2929
/// </summary>
30-
[Cmdlet(VerbsCommon.Get, "AzureRmBackupManagementServer"), OutputType(typeof(AzureRmRecoveryServicesContainerBase))]
31-
public class GetAzureRmBackupManagementServer : RecoveryServicesBackupCmdletBase
30+
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupManagementServer"), OutputType(typeof(AzureRmRecoveryServicesContainerBase))]
31+
public class GetAzureRmRecoveryServicesBackupManagementServer : RecoveryServicesBackupCmdletBase
3232
{
3333
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Container.Name)]
3434
[ValidateNotNullOrEmpty]

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Container/UnregisterAzureRmBackupManagementServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public override void ExecuteCmdlet()
3838
{
3939
base.ExecuteCmdlet();
4040

41-
if ((AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.DpmEngine && AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.DpmVenusEngine)||
41+
if ((AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.DpmBackupEngine.ToString() && AzureRmBackupManagementServer.BackupEngineType != BackupEngineType.AzureBackupServerEngine.ToString())||
4242
AzureRmBackupManagementServer.BackupManagementType != BackupManagementType.SCDPM)
4343
{
4444
throw new ArgumentException(String.Format(Resources.UnsupportedAzureRmBackupManagementServerException, AzureRmBackupManagementServer.BackupEngineType, AzureRmBackupManagementServer.BackupManagementType));

0 commit comments

Comments
 (0)