Bug #5659
closed
Make list_compatible_inputs script equivalent for Windows
Added by Nicolas CHARLES about 10 years ago.
Updated over 2 years ago.
Description
In #5616, we removed the use of list_compatible_inputs, as the Enteprise agent only exists in 3.6, so is compatible with all inputs.
This ticket is for having a similar script to list_compatible_inputs, to effectively have the equivalent on Windows
- Target version changed from Ideas (not version specific) to 3.1.12
First temporary result:
Select-String -Pattern '^#[ \t]*@agent_version[ \t](>=|<)*([0-9]+)\.([0-9]+)*' -AllMatches
will get all the files with a agent_version defined, and extract >= or <, minor and major version ( with $_.Matches.Groups
1.Value $_.Matches.Groups
2.Value $_.Matches.Groups
3.Value )
so we can filter result then on >= or <, and match with current version of agent to define exclusion
if $result is the result of the search:
$result | ForEach {
$major=$_.Matches.Groups[2].Value
$minor=$_.Matches.Groups[3].Value
if ($_.Matches.Groups[1].Value -eq ">=") {
if ( $cfengine_major -lt $major -Or ( $cfengine_major -eq $major -And $cfengine_minor -lt $minor ) ) {
# exclude this path
}
}
}
- Project changed from Rudder to 41
- Category deleted (
System integration)
- Target version deleted (
3.1.12)
- Target version set to 0.x
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/ncf/pull/380
- Related to Bug #8553: Use the list-compatible-input equivalent on Windows system added
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset commit:ddf6ef4af3db222334b23873d83f2234b0c42f04.
- Status changed from Pending release to Released
- Target version changed from 0.x to ncf-0.x
- Priority set to 0
- Project changed from 41 to Rudder
- Category set to Generic methods
Also available in: Atom
PDF