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
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBFTdHg68nJ4YWA
# RpbQ/rGRG0bGqTtpJ9oc+wcQHRqXsKCCDXYwggX0MIID3KADAgECAhMzAAADrzBA
# DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA
# hePP5LxwcSge5aen+f5Q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