Obs/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.data.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 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
# MIIoQgYJKoZIhvcNAQcCoIIoMzCCKC8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCGq22pkoWgiSzi
# 4WJemQ5Eh1dksRdtnzdUvuhDWaTEM6CCDXYwggX0MIID3KADAgECAhMzAAADrzBA
# DkyjTQVBAAAAAAOvMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
# bmcgUENBIDIwMTEwHhcNMjMxMTE2MTkwOTAwWhcNMjQxMTE0MTkwOTAwWjB0MQsw
# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u
# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQDOS8s1ra6f0YGtg0OhEaQa/t3Q+q1MEHhWJhqQVuO5amYXQpy8MDPNoJYk+FWA
# hePP5LxwcSge5aen+f5Q6WNPd6EDxGzotvVpNi5ve0H97S3F7C/axDfKxyNh21MG
# 0W8Sb0vxi/vorcLHOL9i+t2D6yvvDzLlEefUCbQV/zGCBjXGlYJcUj6RAzXyeNAN
# xSpKXAGd7Fh+ocGHPPphc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