Project

General

Profile

Actions

Bug #5659

closed

Make list_compatible_inputs script equivalent for Windows

Added by Nicolas CHARLES over 9 years ago. Updated almost 2 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 PECCATTE2014-10-07Actions
Related to Rudder - Bug #8553: Use the list-compatible-input equivalent on Windows systemReleasedBenoît PECCATTE2016-06-16Actions
Has duplicate Rudder - Bug #5416: list-compatible-inputs broke ncf for windowsRejectedActions
Actions #1

Updated by Nicolas CHARLES almost 8 years ago

  • 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

Actions #2

Updated by Nicolas CHARLES almost 8 years ago

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

Actions #3

Updated by Nicolas CHARLES almost 8 years ago

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

Updated by Nicolas CHARLES almost 8 years ago

  • Target version set to 0.x
Actions #5

Updated by Nicolas CHARLES almost 8 years ago

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

Updated by Nicolas CHARLES almost 8 years ago

  • 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
Actions #7

Updated by Nicolas CHARLES almost 8 years ago

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

Updated by Nicolas CHARLES almost 8 years ago

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

Applied in changeset commit:ddf6ef4af3db222334b23873d83f2234b0c42f04.

Actions #9

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #10

Updated by Alexis Mousset almost 2 years ago

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

Updated by Alexis Mousset almost 2 years ago

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

Also available in: Atom PDF