Skip to content

Commit cd8d45d

Browse files
committed
Adds support for IfW 1.9.0
1 parent 5b3ef8f commit cd8d45d

5 files changed

+46
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<#
2+
Icinga for Windows Component compilation file.
3+
Will be overwritten to defaults with every update and contains
4+
all code pre-compiled for faster execution and for providing
5+
private/public commands.
6+
7+
Fetches the current module and file location, reads all .psm1 files and compiles them into one large environment
8+
#>
9+
if ($null -eq (Get-Command -Name 'Write-IcingaForWindowsComponentCompilationFile' -ErrorAction SilentlyContinue)) {
10+
Write-Host '[' -NoNewline;
11+
Write-Host 'Error' -ForegroundColor Red -NoNewline;
12+
Write-Host ([string]::Format(']: Failed to compile Icinga for Windows component at location "{0}", because the required function "Write-IcingaForWindowsComponentCompilationFile" is not installed. Please ensure Icinga PowerShell Framework v1.9.0 or later is installed and try again.', $MyInvocation.MyCommand.Path));
13+
14+
return;
15+
}
16+
17+
Write-IcingaForWindowsComponentCompilationFile `
18+
-ScriptRootPath $PSScriptRoot `
19+
-CompiledFilePath ($MyInvocation.MyCommand.Path);

doc/31-Changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ documentation before upgrading to a new release.
77

88
Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-inventory/milestones?state=closed).
99

10+
## 1.2.0 (2022-05-03)
11+
12+
[Issue and PRs](https://github.com/Icinga/icinga-powershell-inventory/milestone/3?closed=1)
13+
14+
### Enhancements
15+
16+
* [#3](https://github.com/Icinga/icinga-powershell-inventory/pull/3) Adds support for Icinga for Windows v1.9.0 module isolation
17+
1018
## 1.1.1 (2022-02-08)
1119

1220
[Issue and PRs](https://github.com/Icinga/icinga-powershell-inventory/milestone/2?closed=1)

icinga-powershell-inventory.psd1

+13-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
Copyright = '(c) 2020 Icinga GmbH | GPLv2'
88
Description = 'A module to extend the REST-Api of the Icinga PowerShell Framework to provide inventory data'
99
PowerShellVersion = '4.0'
10-
RequiredModules = @( @{ModuleName = 'icinga-powershell-framework'; ModuleVersion = '1.8.0' }, 'icinga-powershell-plugins' )
10+
RequiredModules = @( @{ModuleName = 'icinga-powershell-framework'; ModuleVersion = '1.9.0' }, 'icinga-powershell-plugins' )
1111
NestedModules = @(
12-
'.\lib\Invoke-IcingaInventoryRESTCall.psm1'
12+
'.\compiled\icinga-powershell-inventory.ifw_compilation.psm1'
13+
)
14+
FunctionsToExport = @(
15+
'Register-IcingaRESTAPIEndpointInventory',
16+
'Register-IcingaRESTApiCommandAliasesInventory',
17+
'Import-IcingaPowerShellComponentInventory',
18+
'Invoke-IcingaInventoryRESTCall'
19+
)
20+
CmdletsToExport = @(
21+
)
22+
VariablesToExport = @(
1323
)
14-
FunctionsToExport = @('*')
15-
CmdletsToExport = @('*')
16-
VariablesToExport = '*'
17-
AliasesToExport = @()
1824
PrivateData = @{
1925
PSData = @{
2026
Tags = @( 'icinga','icinga2','inventory','icingainventory','windowsrest','icingawindows')
@@ -28,3 +34,4 @@
2834
}
2935
HelpInfoURI = 'https://github.com/Icinga/icinga-powershell-inventory'
3036
}
37+

icinga-powershell-inventory.psm1

+5
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ function Register-IcingaRESTApiCommandAliasesInventory()
7070
}
7171
}
7272
}
73+
74+
function Import-IcingaPowerShellComponentInventory()
75+
{
76+
# Allows other components to load this component
77+
}

lib/Invoke-IcingaInventoryRESTCall.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function Invoke-IcingaInventoryRESTCall()
1+
function Global:Invoke-IcingaInventoryRESTCall()
22
{
33
param (
44
[Hashtable]$Request = @{ },

0 commit comments

Comments
 (0)