Skip to content

Commit ba0e969

Browse files
committed
Merge branch 'dev1' of https://github.com/MabOneSdk/azure-powershell into pragrawa-dev1
2 parents 7f06bc0 + 9a3b8ed commit ba0e969

File tree

8 files changed

+24
-31
lines changed

8 files changed

+24
-31
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public static ContainerType GetPsContainerType(string containerType)
150150
{
151151
return ContainerType.AzureVM;
152152
}
153-
else if (containerType == Microsoft.Azure.Management.RecoveryServices.Backup.Models.ContainerType.MABContainer.ToString())
153+
else if (containerType == Microsoft.Azure.Management.RecoveryServices.Backup.Models.ContainerType.Windows.ToString())
154154
{
155155
return ContainerType.Windows;
156156
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Providers/PsBackupProviderManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public IPsBackupProvider GetProviderInstance(ContainerType containerType, Backup
5151
else if (backupManagementType == BackupManagementType.SCDPM)
5252
providerType = PsBackupProviderTypes.Dpm;
5353
else
54-
throw new ArgumentException(String.Format("BackupManagementType {0} is not expected for ContainerType {1}", backupManagementType, containerType));
54+
throw new ArgumentException(String.Format("BackupManagementType {0} is not expected for ContainerType {1}", backupManagementType.ToString(), containerType));
5555
break;
5656
//case ContainerType.AzureSqlContainer:
5757
// if (backupManagementType.HasValue)

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

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
#Have to hard-code this because time keeps changing with every run and we cannot use recorded sessions
16-
$fixedStartDate = Get-Date -Date "2016-03-21 12:00:00"
16+
$fixedStartDate = Get-Date -Date "2016-04-12 22:00:00"
1717
$fixedStartDate = $fixedStartDate.ToUniversalTime()
18-
$fixedEndDate = Get-Date -Date "2016-03-22 12:00:00"
18+
$fixedEndDate = Get-Date -Date "2016-04-13 20:00:00"
1919
$fixedEndDate = $fixedEndDate.ToUniversalTime()
2020

2121
function SetVaultContext
2222
{
23-
$vault = Get-AzureRmRecoveryServicesVault -ResourceGroupName "phaniktRSV" -Name "phaniktRs1";
23+
$vault = Get-AzureRmRecoveryServicesVault -ResourceGroupName "kazhengtest" -Name "pshtesting";
2424
Set-AzureRmRecoveryServicesVaultContext -Vault $vault;
2525
}
2626

2727
function Test-GetJobsScenario
2828
{
2929
SetVaultContext;
30-
$jobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate
30+
$jobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate
3131
foreach ($job in $jobs)
3232
{
3333
Assert-NotNull $job.InstanceId
@@ -44,7 +44,7 @@ function Test-GetJobsTimeFilter
4444

4545
SetVaultContext;
4646

47-
$filteredJobs = Get-AzureRmRecoveryServicesJob -From $startTime -To $endTime
47+
$filteredJobs = Get-AzureRmRecoveryServicesBackupJob -From $startTime -To $endTime
4848

4949
# Adding a second here and there to make sure comparison works fine
5050
$startTime.AddSeconds(-1);
@@ -68,7 +68,7 @@ function Test-GetJobsStatusFilter
6868

6969
SetVaultContext;
7070

71-
$filteredJobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate -Status $status;
71+
$filteredJobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate -Status $status;
7272

7373
foreach ($job in $filteredJobs)
7474
{
@@ -82,7 +82,7 @@ function Test-GetJobsOperationFilter
8282

8383
SetVaultContext;
8484

85-
$filteredJobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate -Operation $operation;
85+
$filteredJobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate -Operation $operation;
8686

8787
foreach ($job in $filteredJobs)
8888
{
@@ -96,7 +96,7 @@ function Test-GetJobsBackupManagementTypeFilter
9696

9797
SetVaultContext;
9898

99-
$filteredJobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate -BackupManagementType $type;
99+
$filteredJobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate -BackupManagementType $type;
100100

101101
foreach ($job in $filteredJobs)
102102
{
@@ -107,11 +107,11 @@ function Test-GetJobsBackupManagementTypeFilter
107107
function Test-GetJobDetails
108108
{
109109
SetVaultContext;
110-
$jobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate
110+
$jobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate
111111
foreach ($job in $jobs)
112112
{
113-
$jobDetails = Get-AzureRmRecoveryServicesJobDetails -Job $job;
114-
$jobDetails2 = Get-AzureRmRecoveryServicesJobDetails -JobId $job.InstanceId
113+
$jobDetails = Get-AzureRmRecoveryServicesBackupJobDetails -Job $job;
114+
$jobDetails2 = Get-AzureRmRecoveryServicesBackupJobDetails -JobId $job.InstanceId
115115

116116
Assert-AreEqual $jobDetails.InstanceId $job.InstanceId
117117
Assert-AreEqual $jobDetails2.InstanceId $job.InstanceId
@@ -123,20 +123,20 @@ function Test-GetJobDetails
123123
function Test-WaitJobScenario
124124
{
125125
SetVaultContext;
126-
$jobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate
126+
$jobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate
127127
foreach ($job in $jobs)
128128
{
129-
$waitedJob = Wait-AzureRmRecoveryServicesJob -Job $job
129+
$waitedJob = Wait-AzureRmRecoveryServicesBackupJob -Job $job
130130
Assert-AreNotEqual $waitedJob.Status "InProgress"
131131
Assert-AreNotEqual $waitedJob.Status "Cancelling"
132132
}
133-
$waitedJobs = Wait-AzureRmRecoveryServicesJob -Job $jobs
133+
$waitedJobs = Wait-AzureRmRecoveryServicesBackupJob -Job $jobs
134134
}
135135

136136
function Test-WaitJobPipeScenario
137137
{
138138
SetVaultContext;
139-
$waitedJobs = Get-AzureRmRecoveryServicesJob -From $fixedStartDate -To $fixedEndDate | Wait-AzureRmRecoveryServicesJob
139+
$waitedJobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate | Wait-AzureRmRecoveryServicesBackupJob
140140
foreach ($waitedJob in $waitedJobs)
141141
{
142142
Assert-AreNotEqual $waitedJob.Status "InProgress"
@@ -146,18 +146,11 @@ function Test-WaitJobPipeScenario
146146

147147
function Test-CancelJobScenario
148148
{
149-
$startTime = Get-Date -Date "2016-04-10 21:00:00"
150-
$startTime = $startTime.ToUniversalTime();
151-
$endTime = Get-Date -Date "2016-04-11 21:00:00"
152-
$endTime = $endTime.ToUniversalTime();
153-
154-
$vault = Get-AzureRmRecoveryServicesVault -ResourceGroupName "kazhengtest" -Name "pshtesting";
155-
Set-AzureRmRecoveryServicesVaultContext -Vault $vault;
156-
157-
$runningJobs = Get-AzureRmRecoveryServicesJob -From $startTime -To $endTime -Status "InProgress" -Operation "Backup"
149+
SetVaultContext;
150+
$runningJobs = Get-AzureRmRecoveryServicesBackupJob -From $fixedStartDate -To $fixedEndDate -Status "InProgress" -Operation "Backup"
158151
foreach ($runningJob in $runningJobs)
159152
{
160-
$cancelledJob = Stop-AzureRmRecoveryServicesJob -Job $runningJob
153+
$cancelledJob = Stop-AzureRmRecoveryServicesBackupJob -Job $runningJob
161154
Assert-AreNotEqual $cancelledJob.Status "InProgress"
162155
}
163156
}

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Jobs/GetAzureRmRecoveryServicesJob.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2424
/// <summary>
2525
/// Get list of jobs
2626
/// </summary>
27-
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesJob"), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
27+
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupJob"), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
2828
public class GetAzureRmRecoveryServicesJob : RecoveryServicesBackupCmdletBase
2929
{
3030
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Job.StatusFilter, Position = 1)]

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Jobs/GetAzureRmRecoveryServicesJobDetails.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2020
{
21-
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesJobDetails", DefaultParameterSetName = JobFilterSet), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
21+
[Cmdlet(VerbsCommon.Get, "AzureRmRecoveryServicesBackupJobDetails", DefaultParameterSetName = JobFilterSet), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
2222
public class GetAzureRmRecoveryServicesJobDetails : RecoveryServicesBackupCmdletBase
2323
{
2424
protected const string IdFilterSet = "IdFilterSet";

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Jobs/StopAzureRmRecoveryServicesJob.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2626
{
27-
[Cmdlet("Stop", "AzureRmRecoveryServicesJob", DefaultParameterSetName = JobFilterSet), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
27+
[Cmdlet("Stop", "AzureRmRecoveryServicesBackupJob", DefaultParameterSetName = JobFilterSet), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
2828
public class StopAzureRmRecoveryServicesJob : RecoveryServicesBackupCmdletBase
2929
{
3030
protected const string IdFilterSet = "IdFilterSet";

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup/Cmdlets/Jobs/WaitAzureRmRecoveryServicesJob.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets
2525
{
26-
[Cmdlet("Wait", "AzureRmRecoveryServicesJob"), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
26+
[Cmdlet("Wait", "AzureRmRecoveryServicesBackupJob"), OutputType(typeof(AzureRmRecoveryServicesJobBase))]
2727
public class WaitAzureRmRecoveryServicesJob : RecoveryServicesBackupCmdletBase
2828
{
2929
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsg.Job.WaitJobOrListFilter, ValueFromPipeline = true, Position = 1)]

0 commit comments

Comments
 (0)