@@ -58,6 +58,13 @@ public class TestAzureRmVMAEMExtension : VirtualMachineExtensionBaseCmdlet
58
58
HelpMessage = "Time that should be waited for the Strorage Metrics or Diagnostics data to be available in minutes. Default is 15 minutes" ) ]
59
59
public int WaitTimeInMinutes { get ; set ; }
60
60
61
+ [ Parameter (
62
+ Mandatory = false ,
63
+ Position = 4 ,
64
+ ValueFromPipelineByPropertyName = false ,
65
+ HelpMessage = "Disables the test for table content" ) ]
66
+ public SwitchParameter SkipTableContentCheck { get ; set ; }
67
+
61
68
public TestAzureRmVMAEMExtension ( )
62
69
{
63
70
this . WaitTimeInMinutes = 15 ;
@@ -214,17 +221,21 @@ public override void ExecuteCmdlet()
214
221
var filterMinute = Microsoft . WindowsAzure . Storage . Table . TableQuery .
215
222
GenerateFilterConditionForDate ( "Timestamp" , "gt" , DateTime . Now . AddMinutes ( AEMExtensionConstants . ContentAgeInMinutes * - 1 ) ) ;
216
223
217
- if ( storageConfigOk && this . _Helper . CheckTableAndContent ( account , "$MetricsMinutePrimaryTransactionsBlob" , filterMinute , "." , false , this . WaitTimeInMinutes ) )
224
+ if ( ! this . SkipTableContentCheck . IsPresent && storageConfigOk && this . _Helper . CheckTableAndContent ( account , "$MetricsMinutePrimaryTransactionsBlob" , filterMinute , "." , false , this . WaitTimeInMinutes ) )
218
225
219
226
{
220
227
this . _Helper . WriteHost ( "OK " , ConsoleColor . Green ) ;
221
228
accountResult . PartialResults . Add ( new AEMTestResult ( "Storage Metrics data check for {0}" , true , account ) ) ;
222
229
}
223
- else
230
+ else if ( ! this . SkipTableContentCheck . IsPresent )
224
231
{
225
232
accountResult . PartialResults . Add ( new AEMTestResult ( "Storage Metrics data check for {0}" , false , account ) ) ;
226
233
this . _Helper . WriteHost ( "NOT OK " , ConsoleColor . Red ) ;
227
234
}
235
+ else
236
+ {
237
+ this . _Helper . WriteHost ( "Skipped " , ConsoleColor . Yellow ) ;
238
+ }
228
239
}
229
240
else
230
241
{
@@ -437,7 +448,7 @@ public override void ExecuteCmdlet()
437
448
438
449
439
450
var ok = false ;
440
- if ( ( ! String . IsNullOrEmpty ( deploymentId ) ) && ( ! String . IsNullOrEmpty ( roleName ) ) && ( ! String . IsNullOrEmpty ( wadstorage ) ) )
451
+ if ( ! this . SkipTableContentCheck . IsPresent && ( ! String . IsNullOrEmpty ( deploymentId ) ) && ( ! String . IsNullOrEmpty ( roleName ) ) && ( ! String . IsNullOrEmpty ( wadstorage ) ) )
441
452
{
442
453
443
454
if ( this . OSType . Equals ( AEMExtensionConstants . OSTypeLinux , StringComparison . InvariantCultureIgnoreCase ) )
@@ -456,16 +467,20 @@ public override void ExecuteCmdlet()
456
467
457
468
458
469
}
459
- if ( ok )
470
+ if ( ok && ! this . SkipTableContentCheck . IsPresent )
460
471
{
461
472
wadConfigResult . PartialResults . Add ( new AEMTestResult ( "IaaSDiagnostics data check" , true ) ) ;
462
473
this . _Helper . WriteHost ( "OK " , ConsoleColor . Green ) ;
463
474
}
464
- else
475
+ else if ( ! this . SkipTableContentCheck . IsPresent )
465
476
{
466
477
wadConfigResult . PartialResults . Add ( new AEMTestResult ( "IaaSDiagnostics data check" , false ) ) ;
467
478
this . _Helper . WriteHost ( "NOT OK " , ConsoleColor . Red ) ;
468
479
}
480
+ else
481
+ {
482
+ this . _Helper . WriteHost ( "Skipped " , ConsoleColor . Yellow ) ;
483
+ }
469
484
}
470
485
else
471
486
{
0 commit comments