Merge "Prevent Duplicate VLAN IDs"
This commit is contained in:
		
							
								
								
									
										1
									
								
								Authors
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								Authors
									
									
									
									
									
								
							@@ -7,6 +7,7 @@ Alex Meade <alex.meade@rackspace.com>
 | 
			
		||||
Alexander Sakhnov <asakhnov@mirantis.com>
 | 
			
		||||
Alvaro Lopez Garcia <aloga@ifca.unican.es>
 | 
			
		||||
Andrew Bogott <abogott@wikimedia.org>
 | 
			
		||||
Andrew Clay Shafer <acs@parvuscaptus.com>
 | 
			
		||||
Andrey Brindeyev <abrindeyev@griddynamics.com>
 | 
			
		||||
Andy Smith <code@term.ie>
 | 
			
		||||
Andy Southgate <andy.southgate@citrix.com>
 | 
			
		||||
 
 | 
			
		||||
@@ -146,6 +146,14 @@ class DbApiTestCase(test.TestCase):
 | 
			
		||||
        db_network = db.network_get(ctxt, network.id)
 | 
			
		||||
        self.assertEqual(network.uuid, db_network.uuid)
 | 
			
		||||
 | 
			
		||||
    def test_network_create_with_duplicate_vlan(self):
 | 
			
		||||
        ctxt = context.get_admin_context()
 | 
			
		||||
        values1 = {'host': 'localhost', 'project_id': 'project1', 'vlan': 1}
 | 
			
		||||
        values2 = {'host': 'something', 'project_id': 'project1', 'vlan': 1}
 | 
			
		||||
        db.network_create_safe(ctxt, values1)
 | 
			
		||||
        self.assertRaises(exception.DuplicateVlan,
 | 
			
		||||
                          db.network_create_safe, ctxt, values2)
 | 
			
		||||
 | 
			
		||||
    def test_instance_update_with_instance_id(self):
 | 
			
		||||
        """ test instance_update() works when an instance id is passed """
 | 
			
		||||
        ctxt = context.get_admin_context()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user