Project

General

Profile

Actions

User story #3613

closed

Add possibility to create a group with a combinaison of matching a regex and not matching another regex

Added by Fabrice FLORE-THÉBAULT over 11 years ago. Updated over 11 years ago.

Status:
Released
Priority:
1 (highest)
Assignee:
-
Category:
Web - Nodes & inventories
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

Let's have a network with one LAN, one DMZ, some hosts with one IP in LAN, some hosts with one IP in DMZ, and some multihomed hosts with one IP in DMZ and one IP in LAN.

I would like to create 3 groups :

  • LAN only: hosts with at least one IP in LAN, and no IP in DMZ.
  • DMZ only: hosts with at least one IP in DMZ, and no IP in LAN.
  • LAN and DMZ: hosts with at least one IP in LAN and one IP in DMZ.

I guess these groups will be quite meaningfull to configure some items depending on the network topology.

For now, it it not possible to create these groups with regexes.


Subtasks 1 (0 open1 closed)

User story #3622: Add a "not matching rexex" filter comparator for node searchReleasedFrançois ARMAND2013-06-03Actions
Actions #1

Updated by Nicolas CHARLES over 11 years ago

  • Project changed from 30 to Rudder
  • Category set to Web - Nodes & inventories
  • Target version set to 2.7.0~beta1

Hi Fabrice,

Thank you for this use case. Indeed, we can't do (for the moment) such query, and we probably need to improve the search engine to allow for more complex queries.
Do you think an "advanced" mode with combinaision of and, or and not would make sense ?

Actions #2

Updated by François ARMAND over 11 years ago

I was also going to propose to use an inverse match regex (see http://stackoverflow.com/questions/406230/regular-expression-to-match-string-not-containing-a-word for example), but that does not work in that exact use case.
For non multivalued attribute, you can express the condition "not matching WORD with the rexep: ((?!WORD).)* and everything is fine.

But for multivalued attributes (your use case if IP Addresses), it won't work because the semantic is:
"the node is OK if the attribute is present and any of the attribute values matches the regex". So when we have several value for the attribute, and they don't all matches the regex, the entry is OK. We want to be able to express: "the node is OK if the attribute is missing or if none of the attribute value matches the regex".

And for a similar reason, we can't use a filter on "network > IP Address > regex", because in that case, we have one interface not matching but the other matches, and so in fine, the node is OK.

A first very simple workaround is to add a "non matching regex" comparator, so that we can say: "matching ip XXX and not matchin ip YYY".

Actions #3

Updated by Dennis Cabooter over 11 years ago

A combination of "and", "or" and "not" would be awesome! :)

Actions #4

Updated by Nicolas CHARLES over 11 years ago

  • Status changed from New to 13
  • Target version changed from 2.7.0~beta1 to 2.6.3
Actions #5

Updated by Nicolas CHARLES over 11 years ago

  • Status changed from 13 to Pending release
Actions #6

Updated by Nicolas PERRON over 11 years ago

  • Subject changed from impossible usecase: create a group with all hosts with IP from LAN and no IP in DMZ to Add possibility to create a group with a combinaison of matching a regex and not matching another regex
Actions #7

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.6.3 to 2.7.0~rc1
Actions #8

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.7.0~rc1 to 2.7.0~beta1
Actions #9

Updated by Nicolas PERRON over 11 years ago

  • Status changed from Pending release to Released
Actions

Also available in: Atom PDF