mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-15 04:07:51 +00:00
Correctly detect invalid requests for a particular node
This commit is contained in:
parent
5aa6e6a26c
commit
b2d54bf2f5
@ -126,6 +126,9 @@ def delete_node_collection(collectionpath, configmanager):
|
||||
def enumerate_node_collection(collectionpath, configmanager):
|
||||
if collectionpath == ['node']: # it is just '/node/', need a list of nodes
|
||||
return iterate_collections(configmanager.get_nodes())
|
||||
node = collectionpath[1]
|
||||
if not configmanager.is_node(node):
|
||||
raise exc.NotFoundException("Invalid element requested")
|
||||
del collectionpath[0:2]
|
||||
collection = nested_lookup(noderesources, collectionpath)
|
||||
return iterate_resources(collection)
|
||||
|
Loading…
x
Reference in New Issue
Block a user