2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-15 12:17:47 +00:00

Correctly detect invalid requests for a particular node

This commit is contained in:
Jarrod Johnson 2014-02-09 19:30:46 -05:00
parent 5aa6e6a26c
commit b2d54bf2f5

View File

@ -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)