AzStackHciPorts/AzStackHci.Ports.Helpers.psm1

Import-LocalizedData -BindingVariable lpTxt -FileName AzStackHci.Ports.Strings.psd1

class HealthModel
{
    # Attributes for Azure Monitor schema
    [string]$Name #Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer.
    [string]$Title #User-facing name; one or more sentences indicating the direct issue.
    [string]$Severity #Severity of the result (Critical, Warning, Informational, Hidden) – this answers how important the result is. Critical is the only update-blocking severity.
    [string]$Description #Detailed overview of the issue and what impact the issue has on the stamp.
    [psobject]$Tags #Key-value pairs that allow grouping/filtering individual tests. For example, "Group": "ReadinessChecks", "UpdateType": "ClusterAware"
    [string]$Status #The status of the check running (i.e. Failed, Succeeded, In Progress) – this answers whether the check ran, and passed or failed.
    [string]$Remediation #Set of steps that can be taken to resolve the issue found.
    [string]$TargetResourceID #The unique identifier for the affected resource (such as a node or drive).
    [string]$TargetResourceName #The name of the affected resource.
    [string]$TargetResourceType #The type of resource being referred to (well-known set of nouns in infrastructure, aligning with Monitoring).
    [datetime]$Timestamp #The Time in which the HealthCheck was called.
    [psobject[]]$AdditionalData #Property bag of key value pairs for additional information.
    [string]$HealthCheckSource #The name of the services called for the HealthCheck (I.E. Test-AzureStack, Test-Cluster).
}

class AzStackHciPort
{
    [int[]]$PortNumber
    [string[]]$Protocol
    [string]$ProcessName
}

class AzStackHciPortTarget : HealthModel
{
    # Attribute for performing check
    [AzStackHciPort]$Port

    # Additional Attributes for end user interaction
    [string[]]$Service # short cut property to Service from tags
    [string[]]$OperationType # short cut property to Operation Type from tags
    [string[]]$Group # short cut property to group from tags
    [bool]$System # targets for system checks such as proxy traversal
}

function Get-AzStackHciPortTarget
{
    <#
        .SYNOPSIS
            Retrieve Ports from built target packs
        .DESCRIPTION
            Retrieve Ports from built target packs
        .EXAMPLE
            PS> Get-AzStackHciPortTarget
            Get all port targets
        .EXAMPLE
            Get-AzStackHciPortTarget -Service ARC | ft Name, Title, Service, OperationType -AutoSize
            Get all ARC port targets
        .EXAMPLE
            PS> Get-AzStackHciPortTarget -Service ARC -OperationType Workload | ft Name, Title, Service, OperationType -AutoSize
            Get all ARC targets for workloads
        .EXAMPLE
            PS> Get-AzStackHciPortTarget -OperationType Workload | ft Name, Title, Service, OperationType -AutoSize
            Get all targets for workloads
        .EXAMPLE
            PS> Get-AzStackHciPortTarget -OperationType ARC -OperationType Update -Additive | ft Name, Title, Service, OperationType -AutoSize
            Get all ARC targets and all targets for Update
        .INPUTS
            Service - String array
            OperationType - String array
            Additive - Switch
        .OUTPUTS
            PSObject
        .NOTES
    #>

    [CmdletBinding()]
    param (

        [Parameter(Mandatory = $false)]
        [string[]]
        $Service,

        [Parameter(Mandatory = $false)]
        [string[]]
        $OperationType,

        [Parameter(Mandatory = $false)]
        [string[]]
        $FilePath,

        [Parameter(Mandatory = $false)]
        [switch]
        $Additive,

        [Parameter(Mandatory = $false)]
        [switch]
        $IncludeSystem

    )
    try
    {
        Import-AzStackHciPortTarget -FilePath $FilePath
        $executionTargets = @()
        # Additive allows the user to "-OR" their parameter values
        if ($Additive)
        {
            Log-Info -Message $lpTxt.Additively
            if (-not [string]::IsNullOrEmpty($Service))
            {
                Log-Info -Message ($lpTxt.ByService -f ($Service -join ','))
                foreach ($svc in $Service)
                {
                    $executionTargets += $Script:AzStackHciPortTargets | Where-Object { $svc -in $_.Service }
                }
            }
            if (-not [string]::IsNullOrEmpty($OperationType))
            {
                Log-Info -Message ($lpTxt.ByOp -f ($OperationType -join ','))
                foreach ($Op in $OperationType)
                {
                    $executionTargets += $Script:AzStackHciPortTargets | Where-Object { $Op -in $_.OperationType }
                }
            }
            if ([string]::IsNullOrEmpty($OperationType) -and [string]::IsNullOrEmpty($Service))
            {
                $executionTargets += $Script:AzStackHciPortTargets
            }
        }
        else
        {
            if ([string]::IsNullOrEmpty($OperationType) -and [string]::IsNullOrEmpty($Service))
            {
                $executionTargets += $Script:AzStackHciPortTargets
            }
            elseif (-not [string]::IsNullOrEmpty($Service) -and [string]::IsNullOrEmpty($OperationType))
            {
                Log-Info -Message ($lpTxt.ByService -f ($Service -join ','))
                foreach ($svc in $Service)
                {
                    $executionTargets += $Script:AzStackHciPortTargets | Where-Object { $svc -in $_.Service }
                }
            }
            elseif (-not [string]::IsNullOrEmpty($OperationType) -and [string]::IsNullOrEmpty($Service))
            {
                Log-Info -Message ($lpTxt.ByOp -f ($OperationType -join ','))
                foreach ($Op in $OperationType)
                {
                    $executionTargets += $Script:AzStackHciPortTargets | Where-Object { $Op -in $_.OperationType }
                }
            }
            else
            {
                Log-Info -Message ($lpTxt.ByOpAndService -f ($OperationType -join ','), ($Service -join ','))
                $executionTargetsByOp = @()
                foreach ($Op in $OperationType)
                {
                    $executionTargetsByOp += $Script:AzStackHciPortTargets | Where-Object { $Op -in $_.OperationType }
                }
                foreach ($svc in $Service)
                {
                    $executionTargets += $executionTargetsByOp | Where-Object { $svc -in $_.Service }
                }
            }
        }
        if ($IncludeSystem)
        {
            return $executionTargets
        }
        else
        {
            return ($executionTargets | Where-Object Service -NotContains 'System')
        }
    }
    catch
    {
        throw "Get failed: $($_.exception)"
    }
}

function Import-AzStackHciPortTarget
{
    <#
    .SYNOPSIS
        Retrieve Ports from built target packs
    .DESCRIPTION
        Retrieve Ports from built target packs
    .EXAMPLE
        PS C:\> Import-AzStackHciPortTarget
        Explanation of what the example does
    .INPUTS
        URI
    .OUTPUTS
        PSObject
    .NOTES
    #>

    [CmdletBinding()]
    param (
        [string[]]
        $FilePath
    )
    try
    {
        $Script:AzStackHciPortTargets = @()
        if ([string]::IsNullOrEmpty($FilePath))
        {
            $FilePath = "$PSScriptRoot\Targets\*.json"
        }
        $targetFiles = Get-ChildItem -Path $FilePath | Select-Object -ExpandProperty FullName
        if (-not $targetFiles)
        {
            throw $lpTxt.NoTargets
        }
        Log-Info ("Importing {0}" -f ($targetFiles -join ','))
        ForEach ($targetFile in $targetFiles)
        {
            try
            {
                # TO DO - Add validations:
                # - protocol should not contain ://
                $targetPackContent = Get-Content -Path $targetFile | ConvertFrom-Json -WarningAction SilentlyContinue
                foreach ($target in $targetPackContent)
                {
                    #Set Name of the individual test/rule/alert that was executed. Unique, not exposed to the customer.
                    $target | Add-Member -MemberType NoteProperty -Name Name -Value ("AzStackHci_Port_{0}" -f $Target.TargetResourceName) -Force
                    $target | Add-Member -MemberType NoteProperty -Name HealthCheckSource -Value $ENV:EnvChkrId -Force
                    $target | Add-Member -MemberType NoteProperty -Name Service -Value $Target.Tags.Service -Force
                    $target | Add-Member -MemberType NoteProperty -Name OperationType -Value $Target.Tags.OperationType -Force
                    $target | Add-Member -MemberType NoteProperty -Name Group -Value $Target.Tags.Group -Force

                    # TO DO: Determine the proper use of TargetResourceID
                    $target.TargetResourceID = (New-Guid).Guid.ToString()
                    $Script:AzStackHciPortTargets += [AzStackHciPortTarget]$target
                }
            }
            catch
            {
                Log-Info -Type Warning -Message ($lpTxt.CannotReadTargetFile -f (Split-Path -Path $targetFile -Leaf), $_.Exception.Message)
            }
        }
    }
    catch
    {
        throw "Import failed: $($_.exception)"
    }
}

function Get-AzStackHciPortServiceName
{
    <#
    .SYNOPSIS
        Retrieve Services from built target packs
    .DESCRIPTION
        Retrieve Services from built target packs
    .EXAMPLE
        PS C:\> Get-AzStackHciPortServiceName
        Explanation of what the example does
    .INPUTS
        Service
    .OUTPUTS
        PSObject
    .NOTES
    #>

    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)]
        [string[]]
        $Service,

        [Parameter(Mandatory = $false)]
        [switch]
        $IncludeSystem
    )
    try
    {
        Get-AzStackHciPortTarget -IncludeSystem:$IncludeSystem | Select-Object -ExpandProperty Service | Sort-Object | Get-Unique
    }
    catch
    {
        throw "Failed to get services names. Error: $($_.Exception.Message)"
    }
}

function Get-AzStackHciPortOperationName
{
    <#
    .SYNOPSIS
        Retrieve Operation Types from built target packs
    .DESCRIPTION
        Retrieve Operation Types from built target packs e.g. Deployment, Update, Secret Rotation.
    .EXAMPLE
        PS C:\> Get-AzStackHciPortOperationName
        Explanation of what the example does
    .INPUTS
        Service
    .OUTPUTS
        PSObject
    .NOTES
    #>

    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)]
        [string]
        $OperationType
    )
    try
    {
        Get-AzStackHciPortTarget | Select-Object -ExpandProperty OperationType | Sort-Object | Get-Unique
    }
    catch
    {
        throw "Failed to get services names. Error: $($_.Exception.Message)"
    }
}

function Invoke-PortConnection
{
    <#
    .SYNOPSIS
        Get port via Get-NetTCPConnection & Get-NetUDPEndpoint
    .DESCRIPTION
        Get port via Get-NetTCPConnection & Get-NetUDPEndpoint
    .EXAMPLE
        PS C:\> Invoke-NetTCPConnectionEx -Target $Target
        Explanation of what the example does
    .INPUTS
        URI
    .OUTPUTS
        Output (if any)
    .NOTES
    #>

    [CmdletBinding()]
    param (
        [Parameter()]
        [psobject]
        $Target,

        [Parameter()]
        [System.Management.Automation.Runspaces.PSSession[]]
        $PsSession
    )
    try
    {
        $ProgressPreference = 'SilentlyContinue'
        $target.TimeStamp = [datetime]::UtcNow
        $Target.HealthCheckSource = $ENV:EnvChkrId

        # Create ScriptBlock
        $scriptBlock = {
            $Target = $args[0]
            $AdditionalData = @()
            if ( -not (Get-Command Get-NetTCPConnection, Get-NetUDPEndpoint -ea SilentlyContinue))
            {
                throw "Get-NetTCPConnection and Get-NetUDPEndpoint commands not available. Ensure NetTCPIP module is installed."
            }

            foreach ($rule in $target.Port)
            {
                foreach ($port in $rule.PortNumber)
                {
                    # Placeholder AdditionalData
                    $AddData = New-Object -TypeName PSObject -Property @{
                        Source    = $ENV:COMPUTERNAME
                        Resource  = $port
                        Status    = "In Progress"
                        TimeStamp = [datetime]::UtcNow
                        Detail    = $null
                    }
                    # Test the port
                    if ('UDP' -in $rule.protocol)
                    {
                        $udpResult = Get-NetUDPEndpoint -LocalPort $Port -ErrorAction SilentlyContinue
                    }
                    if ('TCP' -in $rule.protocol)
                    {
                        $tcpResult = Get-NetTCPConnection -LocalPort $Port -ErrorAction SilentlyContinue
                    }

                    # Make uniform output
                    if ($tcpResult)
                    {
                        $AddData.Detail += $tcpResult | Select-Object LocalAddress, RemoteAddress, RemotePort, State, OwningProcess, `
                        @{ 'Label' = 'LocalPort'; Expression = { "TCP:$($_.LocalPort)" } }, `
                        @{ 'Label' = 'Protocol'; Expression = { 'tcp' } }, `
                        @{ 'Label' = 'ProcessName'; Expression = { (Get-Process -Id $_.OwningProcess).ProcessName } },
                        @{ 'Label' = 'Status'; Expression = { if ((Get-Process -Id $_.OwningProcess).ProcessName -eq $rule.ProcessName) { 'Succeeded' } else { 'Failed' } } }
                        $tcpResult | Where-Object Status -EQ 'Failed' | ForEach-Object { Write-Verbose -Verbose "$($_.LocalPort) owned by $($_.ProcessName). Expected $($rule.ProcessName)" }
                    }
                    if ($udpResult)
                    {
                        $AddData.Detail += $udpResult | Select-Object LocalAddress, OwningProcess, `
                        @{ 'Label' = 'LocalPort'; Expression = { "UDP:$($_.LocalPort)" } }, `
                        @{ 'Label' = 'Protocol'; Expression = { 'udp' } }, `
                        @{ 'Label' = 'ProcessName'; Expression = { (Get-Process -Id $_.OwningProcess).ProcessName } },
                        @{ 'Label' = 'Status'; Expression = { if ((Get-Process -Id $_.OwningProcess).ProcessName -eq $rule.ProcessName) { 'Succeeded' } else { 'Failed' } } }
                        $udpResult | Where-Object Status -EQ 'Failed' | ForEach-Object { Write-Verbose -Verbose "$($_.LocalPort) owned by $($_.ProcessName). Expected $($rule.ProcessName)" }
                    }
                    # Determine success/failure
                    $addData.Status = if ($AddData.Detail.Status -Contains 'Failed')
                    {
                        "Failed"
                    }
                    else
                    {
                        "Succeeded"
                    }
                    $AdditionalData += $AddData
                }
            }
            if ($AdditionalData.Status -contains 'Failed')
            {
                $target.Status = 'Failed'
                Log-Info "$($target.Title) failed:"
            }
            else
            {
                $target.Status = 'Succeeded'
                Log-Info "$($target.Title) succeeded:"
            }
            $AdditionalData | ForEach-Object { Log-Info ("Port detail {0}: {1}, {2}" -f $_.Status, $_.Resource, (($_.Detail | ConvertTo-Json -Depth 5) -replace "`r`n", " " -replace " ", "")) }
            $target.AdditionalData = $AdditionalData
            $Target.HealthCheckSource = $ENV:EnvChkrId
            return $target
        }
        # Run Invoke-Command
        $icmParam = @{
            ScriptBlock  = $scriptBlock
            ArgumentList = $Target
        }
        if ($PsSession)
        {
            $icmParam += @{
                Session = $PsSession
            }
        }
        Invoke-Command @icmParam
    }
    catch
    {
        throw $_
    }
    finally
    {
        $ProgressPreference = 'Continue'
    }
}
# SIG # Begin signature block
# MIInkwYJKoZIhvcNAQcCoIInhDCCJ4ACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBFTdHg68nJ4YWA
# RpbQ/rGRG0bGqTtpJ9oc+wcQHRqXsKCCDXYwggX0MIID3KADAgECAhMzAAADTrU8
# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDdCKiNI6IBFWuvJUmf6WdOJqZmIwYs5G7AJD5UbcL6tsC+EBPDbr36pFGo1bsU
# p53nRyFYnncoMg8FK0d8jLlw0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