Project

General

Profile

Actions

Bug #5659

closed

Make list_compatible_inputs script equivalent for Windows

Bug #5659: Make list_compatible_inputs script equivalent for Windows

Added by Nicolas CHARLES over 11 years ago. Updated over 3 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

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


Related issues 3 (0 open3 closed)

Related to Rudder - Bug #5616: list-comptabile-inputs doesn't work on windowsReleasedBenoît PECCATTEActions
Related to Rudder - Bug #8553: Use the list-compatible-input equivalent on Windows systemReleasedBenoît PECCATTEActions
Has duplicate Rudder - Bug #5416: list-compatible-inputs broke ncf for windowsRejectedActions

Updated by Nicolas CHARLES over 9 years ago Actions #1

  • 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.Groups1.Value $_.Matches.Groups2.Value $_.Matches.Groups3.Value )

so we can filter result then on >= or <, and match with current version of agent to define exclusion

Updated by Nicolas CHARLES over 9 years ago Actions #2

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
   }                                                                                                                                     
  }                                                                                                                                       
}                                                     

Updated by Nicolas CHARLES over 9 years ago Actions #3

  • Project changed from Rudder to 41
  • Category deleted (System integration)
  • Target version deleted (3.1.12)

Updated by Nicolas CHARLES over 9 years ago Actions #4

  • Target version set to 0.x

Updated by Nicolas CHARLES over 9 years ago Actions #5

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES

Updated by Nicolas CHARLES over 9 years ago Actions #6

  • 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

Updated by Nicolas CHARLES over 9 years ago Actions #7

  • Related to Bug #8553: Use the list-compatible-input equivalent on Windows system added

Updated by Nicolas CHARLES over 9 years ago Actions #8

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Updated by Vincent MEMBRÉ over 9 years ago Actions #9

  • Status changed from Pending release to Released

Updated by Alexis Mousset over 3 years ago Actions #10

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0

Updated by Alexis Mousset over 3 years ago Actions #11

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: PDF Atom