Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4.6 public release #30

Merged
merged 7 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/PSScriptAnalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Run PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish-to-gallery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set PSRepository to Trusted for PowerShell Gallery
shell: pwsh
run: |
Expand All @@ -25,7 +25,7 @@ jobs:
needs: publish-to-gallery
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v1
- uses: Eomm/why-don-t-you-tweet@v2
# We don't want to tweet if the repository is not a public one
if: ${{ !github.event.repository.private }}
with:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# https://github.com/microsoft/action-psscriptanalyzer
# For more information on PSScriptAnalyzer in general, see
# https://github.com/PowerShell/PSScriptAnalyzer

name: CodeQL

on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]

permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: PSScriptAnalyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run PSScriptAnalyzer
uses: microsoft/[email protected]
with:
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
path: .\
recurse: true
# Include your own basic security rules. Removing this option will run all the rules
excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"'
output: results.sarif

# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions AsBuiltReport.VMware.SRM.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AsBuiltReport.VMware.SRM.psm1'

# Version number of this module.
ModuleVersion = '0.4.5'
ModuleVersion = '0.4.6'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -54,7 +54,7 @@ PowerShellVersion = '5.1'
RequiredModules = @(
@{
ModuleName = 'AsBuiltReport.Core';
ModuleVersion = '1.3.0'
ModuleVersion = '1.4.0'
}
)

Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# :arrows_clockwise: VMware SRM As Built Report Changelog

## [0.4.6] - 2024-11-04

### Changed

- Changed Required Modules to AsBuiltReport.Core v1.4.0

### Fixed

- Fix [#28](https://github.com/AsBuiltReport/AsBuiltReport.VMware.SRM/issues/28)

## [0.4.5] - 2023-11-09

### Fixed
Expand Down
68 changes: 34 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Tested On:
This report is compatible with the following PowerShell versions;

<!-- ********** Update supported PowerShell versions ********** -->
| Windows PowerShell 5.1 | PowerShell 7 |
|:----------------------:|:--------------------:|
| Windows PowerShell 5.1 | PowerShell 7 |
| :--------------------: | :----------------: |
| :white_check_mark: | :white_check_mark: |

## :wrench: System Requirements
Expand Down Expand Up @@ -125,23 +125,23 @@ The following provides information of how to configure each schema within the re

The **Report** schema provides configuration of the VMware SRM report information.

| Sub-Schema | Setting | Default | Description |
|---------------------|--------------|--------------------------------|--------------------------------------------------------------|
| Sub-Schema | Setting | Default | Description |
| ------------------- | ------------ | -------------------------- | ------------------------------------------------------------ |
| Name | User defined | VMware SRM As Built Report | The name of the As Built Report |
| Version | User defined | 1.0 | The report version |
| Status | User defined | Released | The report release status |
| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents |
| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers |
| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering |
| Version | User defined | 1.0 | The report version |
| Status | User defined | Released | The report release status |
| ShowCoverPageImage | true / false | true | Toggle to enable/disable the display of the cover page image |
| ShowTableOfContents | true / false | true | Toggle to enable/disable table of contents |
| ShowHeaderFooter | true / false | true | Toggle to enable/disable document headers & footers |
| ShowTableCaptions | true / false | true | Toggle to enable/disable table captions/numbering |

### Options

The **Options** schema allows certain options within the report to be toggled on or off.

| Sub-Schema | Setting | Default | Description |
|-----------------|--------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ShowDefinitionInfo | true / false | false | Toggle to enable/disable VMware SRM Section Documentation
| Sub-Schema | Setting | Default | Description |
| ------------------ | ------------ | ------- | --------------------------------------------------------- |
| ShowDefinitionInfo | true / false | false | Toggle to enable/disable VMware SRM Section Documentation |

<!-- ********** Add/Remove the number of InfoLevels as required ********** -->
### InfoLevel
Expand All @@ -150,30 +150,30 @@ The **InfoLevel** schema allows configuration of each section of the report at a

There are 4 levels (0-3) of detail granularity for each section as follows;

| Setting | InfoLevel | Description |
|:-------:|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| 0 | Disabled | Does not collect or display any information |
| 1 | Enabled / Summary | Provides summarised information for a collection of objects |
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
| 3 | Detailed | Provides detailed information for individual objects |
| Setting | InfoLevel | Description |
| :-----: | ----------------- | -------------------------------------------------------------------- |
| 0 | Disabled | Does not collect or display any information |
| 1 | Enabled / Summary | Provides summarised information for a collection of objects |
| 2 | Adv Summary | Provides condensed, detailed information for a collection of objects |
| 3 | Detailed | Provides detailed information for individual objects |

The table below outlines the default and maximum **InfoLevel** settings for each section.

| Sub-Schema | Default Setting | Maximum Setting |
|--------------|:---------------:|:---------------:|
| ArrayPairs | 1 | 1 |
| SRA | 1 | 1 |
| Sites | 1 | 1 |
| License | 1 | 1 |
| Summary | 1 | 1 |
| FolderMapping | 1 | 1 |
| NetworkMapping | 1 | 1 |
| ResourceMapping | 1 | 1 |
| PlaceholderDatastores | 1 | 1 |
| Permission | 1 | 1 |
| ProtectionGroup | 1 | 3 |
| RecoveryPlan | 1 | 3 |
| Permission | 1 | 1 |
| Sub-Schema | Default Setting | Maximum Setting |
| --------------------- | :-------------: | :-------------: |
| ArrayPairs | 1 | 1 |
| SRA | 1 | 1 |
| Sites | 1 | 1 |
| License | 1 | 1 |
| Summary | 1 | 1 |
| FolderMapping | 1 | 1 |
| NetworkMapping | 1 | 1 |
| ResourceMapping | 1 | 1 |
| PlaceholderDatastores | 1 | 1 |
| Permission | 1 | 1 |
| ProtectionGroup | 1 | 3 |
| RecoveryPlan | 1 | 3 |
| Permission | 1 | 1 |

### Healthcheck

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
function Get-AbrSRMArrayPairs {
function Get-AbrSRMArrayPair {
<#
.SYNOPSIS
Used by As Built Report to retrieve VMware SRM Array Pairs information.
.DESCRIPTION
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.4.3
Version: 0.4.6
Author: Tim Carman
Twitter: @tpcarman
Github: @tpcarman
Expand All @@ -21,10 +21,10 @@ function Get-AbrSRMArrayPairs {
try {
try {
$LocalArrayPair = $LocalSRM.ExtensionData.Storage.QueryArrayManagers().GetArrayInfo()
} catch { Write-PScriboMessage -IsWarning "Unable to get Protected Site array information"}
} catch { Write-PScriboMessage -IsWarning "Unable to get Protected Site array information" }
try {
$RemoteArrayPair = $RemoteSRM.ExtensionData.Storage.QueryArrayManagers().GetArrayInfo()
} catch { Write-PScriboMessage -IsWarning "Unable to get Recovery Site array information"}
} catch { Write-PScriboMessage -IsWarning "Unable to get Recovery Site array information" }

if (($LocalArrayPair) -and ($RemoteArrayPair)) {
Section -Style Heading2 'Array Pairs' {
Expand All @@ -42,13 +42,13 @@ function Get-AbrSRMArrayPairs {
"$($ProtectedSiteName)" = "$($HashObj.Keys) <--> $($HashObj.Values)"
"$($RecoverySiteName)" = "$($HashObj.Values) <--> $($HashObj.Keys)"
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)


$TableParams = @{
Name = "Array Pairs"
List = $false
ColumnWidths = 50,50
ColumnWidths = 50, 50
}
if ($Report.ShowTableCaptions) {
$TableParams['Caption'] = "- $($TableParams.Name)"
Expand All @@ -63,4 +63,4 @@ function Get-AbrSRMArrayPairs {

end {}

}
}
6 changes: 3 additions & 3 deletions Src/Private/Get-AbrSRMFolderMapping.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrSRMFolderMapping {
.DESCRIPTION
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.4.0
Version: 0.4.6
Author: Jonathan Colon & Tim Carman
Twitter: @jcolonfzenpr / @tpcarman
Github: @rebelinux / @tpcarman
Expand All @@ -28,7 +28,7 @@ function Get-AbrSRMFolderMapping {
Section -Style Heading2 'Folder Mappings' {
if ($Options.ShowDefinitionInfo) {
Paragraph "Folder mappings allow you to specify how Site Recovery Manager maps virtual machine folders on the protected site to virtual machine folders on the recovery site."
Blankline
BlankLine
}
$OutObj = @()
foreach ($ObjMap in $FolderMappings) {
Expand All @@ -43,7 +43,7 @@ function Get-AbrSRMFolderMapping {
"$($ProtectedSiteName)" = $HashObj.Keys
"$($RecoverySiteName)" = $HashObj.Values
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
} catch {
Write-PScriboMessage -IsWarning $_.Exception.Message
}
Expand Down
16 changes: 8 additions & 8 deletions Src/Private/Get-AbrSRMNetworkMapping.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function Get-AbrSRMNetworkMapping {
.DESCRIPTION
Documents the configuration of VMware SRM in Word/HTML/Text formats using PScribo.
.NOTES
Version: 0.4.0
Version: 0.4.6
Author: Jonathan Colon & Tim Carman
Twitter: @jcolonfzenpr / @tpcarman
Github: @rebelinux / @tpcarman
Expand All @@ -31,7 +31,7 @@ function Get-AbrSRMNetworkMapping {
Section -Style Heading2 'Network Mappings' {
if ($Options.ShowDefinitionInfo) {
Paragraph "Network mappings allow you to specify how Site Recovery Manager maps virtual machine networks on the protected site to virtual machine networks on the recovery site."
Blankline
BlankLine
}

if ($LocalNetworkMappings) {
Expand All @@ -42,14 +42,14 @@ function Get-AbrSRMNetworkMapping {
'Protected Network' = Get-View $ObjMap.PrimaryObject -Server $LocalvCenter | Select-Object -ExpandProperty Name -Unique
'Recovery Network' = Get-View $ObjMap.SecondaryObject -Server $RemotevCenter | Select-Object -ExpandProperty Name -Unique
'Test Network' = & {
if ($LocalTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}) {
Get-View (($LocalTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}).TestNetwork) -Server $LocalvCenter
if ($LocalTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }) {
Get-View (($LocalTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }).TestNetwork) -Server $LocalvCenter
} else {
'Isolated network (auto created)'
}
}
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
}

$TableParams = @{
Expand All @@ -74,14 +74,14 @@ function Get-AbrSRMNetworkMapping {
'Protected Network' = Get-View $ObjMap.PrimaryObject -Server $RemotevCenter | Select-Object -ExpandProperty Name -Unique
'Recovery Network' = Get-View $ObjMap.SecondaryObject -Server $LocalvCenter | Select-Object -ExpandProperty Name -Unique
'Test Network' = & {
if ($RemoteTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}) {
Get-View (($RemoteTestNetworkMappings | Where-Object {$_.Key -eq $ObjMap.SecondaryObject}).TestNetwork) -Server $RemotevCenter
if ($RemoteTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }) {
Get-View (($RemoteTestNetworkMappings | Where-Object { $_.Key -eq $ObjMap.SecondaryObject }).TestNetwork) -Server $RemotevCenter
} else {
'Isolated network (auto created)'
}
}
}
$OutObj += [pscustomobject]$inobj
$OutObj += [pscustomobject](ConvertTo-HashToYN $inObj)
}

$TableParams = @{
Expand Down
Loading
Loading