From ab5e47e6af84836e3d5b59c34b91b6c10af58fc6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 18 Sep 2026 16:59:39 -0400 Subject: [PATCH] Fix query to support mac or id as key --- confluent_server/confluent/discovery/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 3e53af41..0b4c2bbe 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -662,9 +662,9 @@ async def handle_api_request(configmanager, inputdata, operation, pathcomponents def _get_mac_from_query(pathcomponents): _, queryparms, _, _ = _parameterize_path(pathcomponents[1:]) - if 'by-mac' not in queryparms: - raise exc.InvalidArgumentException('Must target using "by-mac"') - mac = queryparms['by-mac'].replace('-', ':') + if 'by-id' not in queryparms and 'by-mac' not in queryparms: + raise exc.InvalidArgumentException('Must target using "by-mac" or "by-id"') + mac = queryparms.get('by-mac', queryparms.get('by-id', '')).replace('-', ':') if mac not in known_info: raise exc.NotFoundException('{0} not found'.format(mac)) return mac