mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-11-04 05:12:32 +00:00 
			
		
		
		
	Fix core to return invalidargument exception on bad input data
This commit is contained in:
		
							
								
								
									
										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):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user