From 368087fb512b9f02b974d3716d9a382c0fefb460 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 Aug 2018 10:14:03 -0400 Subject: [PATCH] Have nodeattrib and nodeconfig accept wildcard to select values --- confluent_client/confluent/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/confluent_client/confluent/client.py b/confluent_client/confluent/client.py index d18cc152..40f2e2b7 100644 --- a/confluent_client/confluent/client.py +++ b/confluent_client/confluent/client.py @@ -17,6 +17,7 @@ import anydbm as dbm import errno +import fnmatch import hashlib import os import shlex @@ -311,7 +312,7 @@ def attrrequested(attr, attrlist, seenattributes): candidate = candidate.replace('hm', 'hardwaremanagement', 1) if candidate in _attraliases: candidate = _attraliases[candidate] - if candidate.lower() == attr.lower(): + if fnmatch.fnmatch(attr.lower(), candidate.lower()): seenattributes.add(truename) return True elif attr.lower().startswith(candidate.lower() + '.'):