nested dict doesn't play well with configparser
This commit is contained in:
		
					parent
					
						
							
								5a646aeac9
							
						
					
				
			
			
				commit
				
					
						f8f790e7fc
					
				
			
		
					 2 changed files with 4 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -59,7 +59,7 @@ class CreateVM(Resource):
 | 
			
		|||
            macs = [generate_mac() for _ in range(len(data['network']))]
 | 
			
		||||
            tap_ids = [
 | 
			
		||||
                counters.increment_etcd_counter(
 | 
			
		||||
                    shared.etcd_client, settings['etcd']['counter']['tap']
 | 
			
		||||
                    shared.etcd_client, settings['etcd']['tap_counter']
 | 
			
		||||
                )
 | 
			
		||||
                for _ in range(len(data['network']))
 | 
			
		||||
            ]
 | 
			
		||||
| 
						 | 
				
			
			@ -470,7 +470,7 @@ class CreateNetwork(Resource):
 | 
			
		|||
 | 
			
		||||
            network_entry = {
 | 
			
		||||
                'id': counters.increment_etcd_counter(
 | 
			
		||||
                    shared.etcd_client, settings['etcd']['counter']['vxlan']
 | 
			
		||||
                    shared.etcd_client, settings['etcd']['vxlan_counter']
 | 
			
		||||
                ),
 | 
			
		||||
                'type': data['type'],
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -90,10 +90,8 @@ class Settings(object):
 | 
			
		|||
                    'request_prefix': join_path(base_prefix, 'requests/'),
 | 
			
		||||
                    'user_prefix': join_path(base_prefix, 'users/'),
 | 
			
		||||
                    'vm_prefix': join_path(base_prefix, 'vms/'),
 | 
			
		||||
                    'counter': {
 | 
			
		||||
                        'vxlan': join_path(base_prefix, 'counters/vxlan'),
 | 
			
		||||
                        'tap': join_path(base_prefix, 'counters/tap')
 | 
			
		||||
                    }
 | 
			
		||||
                    'vxlan_counter': join_path(base_prefix, 'counters/vxlan'),
 | 
			
		||||
                    'tap_counter': join_path(base_prefix, 'counters/tap')
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        )
 | 
			
		||||
| 
						 | 
				
			
			@ -129,7 +127,6 @@ class Settings(object):
 | 
			
		|||
                self.read_values_from_etcd()
 | 
			
		||||
            except KeyError:
 | 
			
		||||
                pass
 | 
			
		||||
 | 
			
		||||
        return self.config_parser[key]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue