Actions
User story #3615
closedIP search field with slash notation (subnet, mask, ip range)
Status:
Released
Priority:
2
Assignee:
Category:
Web - Nodes & inventories
Target version:
Effort required:
Name check:
Fix check:
Regression:
No
Description
Let's say you want to filter IP and match 192.168.0.0/24.
For this field, it would be nice to have a standard notation, like 192.168.0.0/24
, wich makes more sense than a regex.
Resolution note: it ONLY works on the IP from node summary, not the ones in the network parts.
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
Yeah, agreed !
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.7.0~beta1 to 2.7.0~rc1
Updated by Nicolas PERRON over 11 years ago
- Status changed from New to 8
- Target version changed from 2.7.0~rc1 to Ideas (not version specific)
Updated by François ARMAND about 2 months ago
- Target version changed from Ideas (not version specific) to 8.1.8
- Regression set to No
It would be easy now that we have node fact to accept both IP and CIDR in the "equal" field of IP match.
Something like:
final case class NodeCriterionMatcherIpaddress(extractor: CoreNodeFact => Chunk[Cidr[IpAddress]]) extends NodeCriterionOrderedValueMatcher[Cidr[IpAddress]] { override def parseNum(value: String): Option[Cidr[IpAddress]] = Cidr.fromString(value).orElse(IpAddress.fromString(value).map(ip => Cidr(ip, 32))) override def serialise(a: Cidr[IpAddress]): String = a.toString() val order: Ordering[Cidr[IpAddress]] = Ordering.String.on(_.toString()) implicit val ser: Cidr[IpAddress] => String = serialise _ override def matches(n: CoreNodeFact, comparator: CriterionComparator, value: String): IOResult[Boolean] = { comparator match { case Equals => tryMatches( value, a => MatchHolder[Cidr[IpAddress]](DebugInfo(Equals.id, Some(value)), extractor(n), _.exists(ip => a.contains(ip.address))) ) case _ => super.matches(n, comparator, value) } } } // and in Node comparator, and other relevant places: ObjectCriterion( OC_NODE, Chunk( ... Criterion(A_LIST_OF_IP, NodeIpListComparator, NodeCriterionMatcherIpaddress(_.ipAddresses.flatMap(ip => Cidr.fromString(ip.inet +"/32")))), ... ) ),
(needs to be done for ipV4 and ipV6)
Updated by François ARMAND about 2 months ago
- Priority changed from N/A to To review
Updated by François ARMAND about 1 month ago
- Status changed from New to Pending technical review
- Assignee set to Clark ANDRIANASOLO
- Pull Request set to https://github.com/Normation/rudder/pull/5929
Updated by François ARMAND about 1 month ago
- Pull Request changed from https://github.com/Normation/rudder/pull/5929 to https://github.com/Normation/rudder/pull/5930
Updated by Anonymous about 1 month ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|53b273651114c573878c034e3f103717bc8e0d41.
Updated by François ARMAND about 1 month ago
- Target version changed from 8.1.8 to 8.2.0~rc1
Updated by François ARMAND about 1 month ago
- Related to Enhancement #1200: Search for IP addresses included in a subnet added
Updated by François ARMAND about 1 month ago
- Related to deleted (Enhancement #1200: Search for IP addresses included in a subnet)
Updated by François ARMAND about 1 month ago
- Has duplicate Enhancement #1200: Search for IP addresses included in a subnet added
Updated by Nicolas CHARLES about 1 month ago
- Priority changed from To review to 2
Updated by Vincent MEMBRÉ about 1 month ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.2.0~rc1 which was released today.
Updated by François ARMAND 16 days ago
- Subject changed from IP search field with slash notation to IP search field with slash notation (subnet, mask, ip range)
- Description updated (diff)
Actions