Generating a warning when I/O size limit is exceeded A function is doing IO operation . If the IO reaches a size more than warning limit storage array will send the event to host. The same function will fetch the event.

I have used the verb-noun pattern and the name of the function is as below.


  "Get-SoftAlertAfterRunIO"


It is not making sense as it is not only getting, it is also generating.

Another name I can use is: 


  Generate-SoftAlert


But it is not an approved verb. What could be the equivalent verb for generate?

Or is there any good name to reflect the behavior of this code.

The full code is given below

    function Generate-SoftAlert  {
    param
    (        
        $VolumeObject,
        $Size
    )  

    $Path = $VolumeObject.Path
    $IOTimeStamp = StartIO -Path $Path -LimitSizeInGB $Size 

    $IOStarttimeInArray = $IOTimeStamp.IOStarttimeInArray
    $IOStarttimeInHost = $IOTimeStamp.IOStartTimeInHost

    $IOEndtimeInArray = $IOTimeStamp.IOEndtimeInArray
    $IOEndtimeInHost = $IOTimeStamp.IOendTimeInHost

    $VolumeName = $VolumeObject.Name
    $IsSoftAlertInArray= Test-SoftAlertInArray -VolumeName $VolumeName -FromTimeStamp $IOStarttimeInArray -ToTimestamp $IOEndtimeInArray

    $DiskNumber = $VolumeObject.DiskNumber
    $SoftAlert = Get-SoftAlertInHost -After $IOStarttimeInHost -Before $IOEndtimeInHost -DiskNumber $DiskNumber
    $IsSoftAlert = ($SoftAlert -ne $null)

    $Message = $SoftAlert.Message
    $IsLogSense = $false
    If($IsSoftAlert -eq $true)
    {
        $IsLogSense = Test-LogSenseMessage -LogMessage $Message -DiskNumber $DiskNumber -thresholdInGb $WarningLimit   
    }

    return [pscustomobject]@{
        SoftAlert = $IsSoftAlert        
        LogSense = $IsLogSense
        SoftAlertInArray = $IsSoftAlertInArray
    }
}
Apply Approved Verbs for Windows PowerShell Commands article from Windows PowerShell Cmdlet Concepts, use New-SoftAlert:


  Common Verbs
  
  Windows PowerShell uses the VerbsCommon enumeration class to
  define generic actions that can apply to almost any cmdlet…
  
  Verb (alias): New (n)
  
  Action: Creates a resource. (The Set verb can also be used when creating a resource that includes data, such as the Set-Variable
  cmdlet.)
  
  Comments: For this action, do not use verbs such as Create, Generate, Build, Make, or Allocate.