Skip to content

Commit 8bb31e3

Browse files
committed
Merge pull request #42 from AsrOneSdk/sanjkuma-dev
Use WriteWarning instead of WriteDebug.
2 parents 702c98d + 498d7e7 commit 8bb31e3

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices.Test/ScenarioTests/RecoveryServicesTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ function Test-E2E_DeleteAndDissociate
7272
{
7373
if ($association.AssociationStatus -eq "Paired")
7474
{
75-
// We have got the paired profile. Fire delete and dissociate
75+
# We have got the paired profile. Fire delete and dissociate
7676
$pcPri = Get-AzureSiteRecoveryProtectionContainer -Id $association.PrimaryProtectionContainerId
7777
$pcRec = Get-AzureSiteRecoveryProtectionContainer -Id $association.RecoveryProtectionContainerId
7878
$job = Start-AzureSiteRecoveryProtectionProfileDissociationJob -PrimaryProtectionContainer $pcPri -RecoveryProtectionContainer $pcRec -ProtectionProfile $profile
7979

8080
# Validate_ProfileDissociation_JobSucceeded
8181
if ($Validate_ProfileDissociation_JobSucceeded -eq $true)
8282
{
83-
WaitForJobCompletion -JobId $job.ID
83+
WaitForJobCompletion -JobId $job.ID -NumOfSecondsToWait 600
8484
$job = Get-AzureSiteRecoveryJob -Id $job.ID
8585
Assert-True { $job.State -eq "Succeeded" }
8686
}
@@ -134,7 +134,7 @@ function Test-E2E_CreateAndAssociate
134134
# Validate_ProfileAssociation_JobSucceeded
135135
if ($Validate_ProfileAssociation_JobSucceeded -eq $true)
136136
{
137-
WaitForJobCompletion -JobId $job.ID
137+
WaitForJobCompletion -JobId $job.ID -NumOfSecondsToWait 600
138138
$job = Get-AzureSiteRecoveryJob -Id $job.ID
139139
Assert-True { $job.State -eq "Succeeded" }
140140
}

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/RecoveryServicesCmdletBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,10 @@ protected void ValidateUsageById(string replicationProvider, string paramName)
180180
}
181181
else
182182
{
183-
this.WriteDebugWithTimestamp(
183+
this.WriteWarningWithTimestamp(
184+
string.Format(
184185
Properties.Resources.IDBasedParamUsageNotSupportedFromNextRelease,
185-
paramName);
186+
paramName));
186187
}
187188
}
188189

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/SetAzureSiteRecoveryProtectionEntity.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,10 @@ public override void ExecuteCmdlet()
187187
}
188188
else
189189
{
190-
this.WriteDebugWithTimestamp(
190+
this.WriteWarningWithTimestamp(
191+
string.Format(
191192
Properties.Resources.MandatoryParamFromNextRelease,
192-
"ProtectionProfile");
193+
"ProtectionProfile"));
193194
string pcId = this.ProtectionContainerId ?? this.ProtectionEntity.ProtectionContainerId;
194195
var pc = RecoveryServicesClient.GetAzureSiteRecoveryProtectionContainer(
195196
pcId);

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryCommitFailoverJob.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ public override void ExecuteCmdlet()
9595
{
9696
if (string.IsNullOrEmpty(this.Direction))
9797
{
98-
this.WriteDebugWithTimestamp(
99-
Properties.Resources.MandatoryParamFromNextRelease,
100-
Constants.Direction);
98+
this.WriteWarningWithTimestamp(
99+
string.Format(
100+
Properties.Resources.MandatoryParamFromNextRelease,
101+
Constants.Direction));
101102
}
102103

103104
switch (this.ParameterSetName)

src/ServiceManagement/RecoveryServices/Commands.RecoveryServices/Service/StartAzureSiteRecoveryTestFailoverJob.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,18 @@ public override void ExecuteCmdlet()
156156
{
157157
if (this.NetworkType == null)
158158
{
159-
this.WriteDebugWithTimestamp(
160-
Properties.Resources.MandatoryParamFromNextRelease,
161-
Constants.NetworkType);
159+
this.WriteWarningWithTimestamp(
160+
string.Format(
161+
Properties.Resources.MandatoryParamFromNextRelease,
162+
Constants.NetworkType));
162163
}
163164

164165
if (this.VmNetworkId != null)
165166
{
166-
this.WriteDebugWithTimestamp(
167-
Properties.Resources.IDBasedParamUsageNotSupportedFromNextRelease,
168-
"VmNetworkId");
167+
this.WriteWarningWithTimestamp(
168+
string.Format(
169+
Properties.Resources.IDBasedParamUsageNotSupportedFromNextRelease,
170+
"VmNetworkId"));
169171
}
170172

171173
if (this.NetworkType == Constants.Existing && (this.Network == null && this.VmNetworkId == null))

0 commit comments

Comments
 (0)