Make QuantumManager no longer depend on the projects table
Vish said that creating projects in a test is a no-no and that the QuantumManager shouldn't be relying on the projects table anyways (since they're now in keystone).. Change-Id: I4d5c28746d0d2b4a9aaf7feb0a38792473d16847
This commit is contained in:
		| @@ -193,12 +193,6 @@ class QuantumNovaTestCase(test.TestCase): | ||||
|     def setUp(self): | ||||
|         super(QuantumNovaTestCase, self).setUp() | ||||
|  | ||||
|         # Create an actual project -- with this we will touch more of | ||||
|         # the code in QuantumManager (related to fetching networks, etc) | ||||
|         for x in ['fake_project1', 'fake_project2']: | ||||
|             values = {'id': x, 'name': x} | ||||
|             project = db.project_create(context.get_admin_context(), values) | ||||
|  | ||||
|         self.net_man = quantum_manager.QuantumManager( | ||||
|                 ipam_lib="nova.network.quantum.nova_ipam_lib", | ||||
|                 q_conn=FakeQuantumClientConnection()) | ||||
| @@ -220,11 +214,6 @@ class QuantumNovaTestCase(test.TestCase): | ||||
|             for fip_ref in result: | ||||
|                 session.delete(fip_ref) | ||||
|  | ||||
|     def tearDown(self): | ||||
|         # Clean up our projects | ||||
|         db.project_delete(context.get_admin_context(), 'fake_project1') | ||||
|         db.project_delete(context.get_admin_context(), 'fake_project2') | ||||
|  | ||||
|     def _create_network(self, n): | ||||
|         ctx = context.RequestContext('user1', n['project_id']) | ||||
|         nwks = self.net_man.create_networks( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Brad Hall
					Brad Hall