From 7704523410cf93c1798dbfab1e18e212a4d838bd Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 27 Apr 2017 14:48:59 -0400 Subject: [PATCH] Provide discovery detail in deep levels --- confluent_server/confluent/discovery/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 8dd4b689..2b0eedf3 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -231,6 +231,13 @@ def handle_api_request(configmanager, inputdata, operation, pathcomponents): return disco_info[pathcomponents[3]](model=pathcomponents[2]) elif pathcomponents[1] == 'by-type': return disco_info[pathcomponents[3]](infotype=pathcomponents[2]) + elif len(pathcomponents) == 5: + ident = pathcomponents[-1] + identtype = pathcomponents[-2] + if identtype not in disco_info: + raise exc.NotFoundException( + identtype + ' not a valid selector') + return disco_info[identtype](ident=ident) raise exc.NotFoundException()