AzStackHciStandaloneObservability/package/bin/ObsAgent/lib/Scripts/GenericHelper.psm1

<##############################################################
 # #
 # Copyright (C) Microsoft Corporation. All rights reserved. #
 # #
 ##############################################################>

function New-ASPath
{
    [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Low')]
    Param
    (
        [Parameter(Mandatory=$true)]
        [string]
        $Path,

        [Parameter(Mandatory=$true)]
        [string]
        $Type
    )

    $functionName = $($MyInvocation.MyCommand.Name)

    if (-not (Test-Path $Path))
    {
        Trace-Progress "$functionName : Creating directory $Path on $($env:COMPUTERNAME)"
        $null = New-Item -ItemType $Type -Path $Path
    }
}

#
# Removes the specified path and all child items
#
function Remove-ASPath
{
    [CmdletBinding()]
    Param
    (
        [Parameter(Mandatory=$true)]
        [string]
        $Path
    )

    $functionName = $($MyInvocation.MyCommand.Name)

    if (Test-Path $Path -ErrorAction Continue)
    {
        Trace-Progress -Message "$functionName : Removing $Path on $($env:COMPUTERNAME)"
        $null = Remove-Item $Path -Force -Recurse -ErrorAction SilentlyContinue
    }
}

#
# Writes the progress along with current date and time
#
Function Trace-Progress
{
    [CmdletBinding()]
    param(
        [Parameter(Mandatory=$true)]
        [string]
        $Message,

        [Parameter(Mandatory=$false)]
        [Switch]
        $Error,

        [Parameter(Mandatory=$false)]
        [Switch]
        $Warning
     )

    $progressColor = "Cyan"
    $errorColor = "Red"
    $warningColor = "DarkYellow"

    $fullMessage = ((Get-Date).ToUniversalTime().ToString("G") + " " + $Message)

    if ($Error)
    {
        $color = $errorColor
        $Global:errorList += $fullMessage + "`n"
    }
    elseif ($Warning)
    {
        $color = $warningColor
    }
    else
    {
        $color = $progressColor
    }

    Write-Host $fullMessage -ForegroundColor $color
}


#
# Writes the progress along with current date and time
#
Function Trace-EnteringMethod
{
    $callingStack = (Get-PSCallStack)[1]
    $callingFunctionParams = $callingStack.InvocationInfo.BoundParameters
    $callingFunction = $callingStack.FunctionName

    if(($null -ne $callingFunctionParams) -and ($callingFunctionParams.Keys.Count -ne 0)) 
    {
        Trace-Progress -Message "$callingFunction : Parameters:`r`n $($callingFunctionParams | ConvertTo-Json -Depth 2)"
    }
}

#
# Test whether the current principal is an Administrator
#
Function Test-IsElevated
{
    $identity = [Security.Principal.WindowsIdentity]::GetCurrent()
    $principal = New-Object Security.Principal.WindowsPrincipal $identity
    $principal.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}

#
# Get role to file copy mappping from the configuration file .
#
function Get-RolePublicInfo
{
    [CmdletBinding()]
    param(
        [string]
        [ValidateNotNull()]
        $CustomerConfigurationFilePath
    )

    # TODO - Read the json config file and return the has table
    return $roles
}

#
# Run a script block with optional argument list with timeout.
#
function Start-MonitoringJob
{
  [CmdletBinding()]
    param
    (
        [Parameter(Mandatory=$true)]
        $ScriptBlock,

        [Parameter(Mandatory=$false)]
        [hashtable]
        $ArgumentList,

        [Parameter(Mandatory=$false)]
        [Int]
        $TimeOutInMinutes = 30,

        [Parameter(Mandatory=$false)]
        [string]
        $FunctionName
    )

    $monitorToDate = (Get-Date).AddMinutes($TimeOutInMinutes)
    $monitoringJob = Start-Job -ScriptBlock $ScriptBlock -ArgumentList $ArgumentList

    while ($monitoringJob.State -like 'Running' -and (Get-Date) -lt $monitorToDate)
    {
        Start-Sleep 1
        $monitoringJob | Receive-Job -ErrorAction Continue
    }

    if ($monitoringJob.State -like 'Failed')
    {
        $null = $newErrorMessage
        try
        {
            $newErrorMessage = $monitoringJob.ChildJobs[0].JobStateInfo.Reason.Message
        }
        catch
        {
        }
        Trace-Progress -Message "$functionName : Failed with error: $newErrorMessage." -Error
        $exceptionMessage = "$functionName : Failed with error: $newErrorMessage."
        Trace-Progress -Message $exceptionMessage -Error
        throw $exceptionMessage
    }
    elseif ($monitoringJob.State -like 'Completed')
    {
        Trace-Progress -Message "$functionName : Completed successfully."
    }
    else
    {
        Trace-Progress -Message "$functionName : Timed out after running for $TimeOutInMinutes minutes. Job state: $($monitoringJob.State)." -Error
    }

    $monitoringJob | Stop-Job
    $monitoringJob | Remove-Job
}

#
# Get role names from customer config roles based on input filter.
#
function Get-FilteredRoleName
{
  [CmdletBinding()]
    param
    (
        [Parameter(Mandatory=$true)]
        $Roles,

        [Parameter(Mandatory=$false)]
        $FilterByRole,

        [Parameter(Mandatory=$true)]
        $LogCollectionJobType
    )

    $functionName = $($MyInvocation.MyCommand.Name)

    if ($FilterByRole)
    {
        Trace-Progress "$functionName : Filtering by role(s): $($FilterByRole -join ', ')"
        $filteredRoles = $()
        foreach ($f in $filterByRole)
        {
            $filteredRoles += @($roles.Keys | Where-Object {$_ -like  $f})
        }
        if ($filteredRoles.count -gt 0)
        {
            $FilterByRole = $filteredRoles | Microsoft.PowerShell.Utility\Select-Object -Unique
        }
    }
    else
    {
        Trace-Progress "$functionName : No role filters specified, getting all roles."
        $FilterByRole = $roles.keys
    }

    # If LogCollectionJobType is scheduled, remove AutonomousLogs role
    if ($LogCollectionJobType -eq "Scheduled")
    {
        $FilterByRole = $FilterByRole | Where-Object { $_ -ne "AutonomousLogs" }
    }
    Trace-Progress "$functionName : Processing logs for role(s): $($FilterByRole -join ', ')"
    Trace-Progress "$functionName : retuning total of role count : $($FilterByRole.Count)"

    return $FilterByRole
}

# TODO - Current role table will not have the node names.
#
# Get node names from customer config roles based on input filter.
#
function Get-FilteredNodeName
{
  [CmdletBinding()]
    param
    (
        [Parameter(Mandatory=$true)]
        $Roles,

        [Parameter(Mandatory=$false)]
        $RoleNames,

        [Parameter(Mandatory=$false)]
        $FilterByNode
    )

    $functionName = $($MyInvocation.MyCommand.Name)

    $allNodes = $Roles[$Roles.Keys].PublicConfiguration.Nodes.Node.Name | Microsoft.PowerShell.Utility\Select-Object -Unique
    $filteredRoleNodes = $Roles[$RoleNames].PublicConfiguration.Nodes.Node.Name | Microsoft.PowerShell.Utility\Select-Object -Unique

    if ($filteredRoleNodes -eq $null)
    {
        $message = "Invalid role / node filters, please check the input and try again."
        Trace-Progress "$functionName : $message" -Error
        throw $message
    }

    Trace-Progress "$functionName : All nodes of selected roles: $($filteredRoleNodes -join ', ')"

    if($FilterByNode)
    {
        Trace-Progress "$functionName : Filtering by nodes(s): $($FilterByNode -join ', ')"

        $filteredNodes = $()
        foreach ($f in $filterByNode)
        {
            $filteredNodes += @($allNodes | Where-Object {$_ -like  $f})
        }

        if ($filteredNodes.count -gt 0)
        {
            $filteredNodes = $filteredNodes | Microsoft.PowerShell.Utility\Select-Object -Unique
        }

        $filteredRoleNodes = $filteredRoleNodes | Where-Object { $_ -in $filteredNodes }

        if (($filteredRoleNodes -eq $null) -or ($filteredNodes | Where-Object { $_ -notin $filteredRoleNodes}).Count -ne 0)
        {
            $message = "Invalid role / node filters, please check the input and try again."
            Trace-Progress "$functionName : $message" -Error
            throw $message
        }

        Trace-Progress "$functionName : Processing logs for node(s): $($filteredNodes -join ', ')"
    }
    else
    {
        Trace-Progress "$functionName : No node filters specified, getting all nodes for selected roles."
        $filteredNodes = $filteredRoleNodes
    }

    return $filteredNodes
}

function Get-RoleInfoFromJsonConfig
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory=$true)]
        $RoleJsonFile
    )
    $functionName = $($MyInvocation.MyCommand.Name)
    try {
        $configFileData = Get-Content -Raw -Path $RoleJsonFile -ErrorAction Stop 
        $jsonConfig = $configFileData | ConvertFrom-Json -ErrorAction Stop
        $roles = @{}
        ($jsonConfig).psobject.properties | ForEach-Object { $roles[$_.Name] = $_.Value }
        return $roles
    } catch
    {
        Trace-Progress -Message "$functionName : Failed Parsing json file : $RoleJsonFile. Exception: $_" -Error
        throw $_
    }
}

function Get-NodeNamesFromClusterOrDefaultLocalHostName
{
    $clusterName = $null
    $nodeNames = $env:COMPUTERNAME
    try 
    {
        $clusterName = get-cluster -verbose -ErrorAction Stop
        Trace-Progress -Message "Obtained cluster name [$clustername]"
        $nodeNames = (Get-ClusterNode -Cluster $clusterName -ErrorAction Stop).Name 
        Trace-Progress -Message "Fetched from cluster, Nodes = $($nodeNames -join ', ')"
    }
    catch
    {
        Trace-Progress -Error -Message "Failed to get Cluster Nodes - ClusterName [$clusterName]. Returning localhost name as the only clusternode, to facilitate collection of logs from local machine" 
    }

    return $nodeNames
}

function Get-InfraVMNames
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory=$true)]
        $InfraHostNames
    )

    Trace-EnteringMethod
    [HashTable]$vmRoleToName = @{}

    try 
    {
        # TODO TODO
        # Change the algorithm below to also filter on vm.notes -eq "AzureStackInfraVM" to ensure these are our own VM's

        #Get NC VM's with vm name suffix eq -NC01, -NC02, -NC03 only.
        $ncVms = Get-VM -Name "*-NC01", "*-NC02", "*-NC03"  -ComputerName $InfraHostNames -ErrorAction SilentlyContinue
        Trace-Progress -Message "Obtained NC VM's [$($ncVms.count)] VM's with names $($ncVms.name -join ', ')"
        if ($ncVms.count) {
            $vmRoleToName["NC"] = $ncVms.name
            $vmRoleToName["AllVms"] += $ncVms.name
        }

        #Get SLB VM's with vm name suffix eq -sLB01, -SLB02 only.
        $slbVms = Get-VM -Name "*-SLB01", "*-SLB02" -ComputerName $InfraHostNames -ErrorAction SilentlyContinue
        Trace-Progress -Message "Obtained SLB VM's [$($slbVms.count)] VM's with names $($slbVms.name -join ', ')"
        if ($slbVms.count) {
            $vmRoleToName["SLB"] = $slbVms.name
            $vmRoleToName["AllVms"] += $slbVms.name
        }

        #Get gateway VM's with vm name suffix eq -gwy01, -gwy02, -gwy03 only.
        $gatewayVms = Get-VM -Name "*-GWY01", "*-GWY02", "*-GWY03"  -ComputerName $InfraHostNames -ErrorAction SilentlyContinue
        Trace-Progress -Message "Obtained Gateway VM's [$($gatewayVms.count)] VM's with names $($gatewayVms.name -join ', ')"
        if ($gatewayVms.count) {
            $vmRoleToName["GWY"] = $gatewayVms.name
            $vmRoleToName["AllVms"] += $gatewayVms.name
        }
    }
    catch
    {
        Trace-Progress -Error -Message "Unable to fetch VM information" 
    }

    return $vmRoleToName
}

Export-ModuleMember -Function Get-InfraVMNames -Verbose:$false
Export-ModuleMember -Function Get-NodeNamesFromClusterOrDefaultLocalHostName -Verbose:$false
Export-ModuleMember -Function Trace-EnteringMethod -Verbose:$false
Export-ModuleMember -Function Get-RoleInfoFromJsonConfig -Verbose:$false
Export-ModuleMember -Function Get-FilteredRoleName -Verbose:$false
Export-ModuleMember -Function Get-FilteredNodeName -Verbose:$false
Export-ModuleMember -Function Get-RolePublicInfo -Verbose:$false
Export-ModuleMember -Function New-ASPath -Verbose:$false
Export-ModuleMember -Function Remove-ASPath -Verbose:$false
Export-ModuleMember -Function Test-IsElevated -Verbose:$false
Export-ModuleMember -Function Trace-Progress -Verbose:$false
Export-ModuleMember -Function Start-MonitoringJob -Verbose:$false
# SIG # Begin signature block
# MIInlgYJKoZIhvcNAQcCoIInhzCCJ4MCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAP64mLVPXe1Xtu
# V05xmur9JlkYiL8CaIqxd9ivhai5SKCCDXYwggX0MIID3KADAgECAhMzAAADTrU8
# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwA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