2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Provide discovery detail in deep levels

This commit is contained in:
Jarrod Johnson
2017-04-27 14:48:59 -04:00
parent 4cc57acea9
commit 7704523410
@@ -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()