mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 20:39:40 +00:00
Fix core to return invalidargument exception on bad input data
This commit is contained in:
parent
6c7aaf8bc3
commit
2863c58264
1
TODO
1
TODO
@ -31,3 +31,4 @@ KeyError: ''
|
||||
a titlebar
|
||||
-audit log did not show confetty activity for starting console
|
||||
-read exclusive and full exclusive console access modes
|
||||
-invalid attributes at create time come out as 500
|
@ -233,7 +233,10 @@ def create_group(inputdata, configmanager):
|
||||
attribmap = {groupname: inputdata}
|
||||
except KeyError:
|
||||
raise exc.InvalidArgumentException()
|
||||
configmanager.add_group_attributes(attribmap)
|
||||
try:
|
||||
configmanager.add_group_attributes(attribmap)
|
||||
except ValueError as e:
|
||||
raise exc.InvalidArgumentException(str(e))
|
||||
|
||||
|
||||
def create_node(inputdata, configmanager):
|
||||
@ -242,8 +245,11 @@ def create_node(inputdata, configmanager):
|
||||
del inputdata['name']
|
||||
attribmap = {nodename: inputdata}
|
||||
except KeyError:
|
||||
raise exc.InvalidArgumentException()
|
||||
configmanager.add_node_attributes(attribmap)
|
||||
raise exc.InvalidArgumentException('name not specified')
|
||||
try:
|
||||
configmanager.add_node_attributes(attribmap)
|
||||
except ValueError as e:
|
||||
raise exc.InvalidArgumentException(str(e))
|
||||
|
||||
|
||||
def enumerate_collections(collections):
|
||||
|
Loading…
Reference in New Issue
Block a user