Implement BP untie-nova-network-models

Fixes LP853979
Remove the FK references for network data.
Remove unused db functions that used the FK's
Update db functions to not joinload
Update notification to optionally take network_info if compute has it
Update EC2 Api to use the network cache, falling back to rpc.call
Remove test_instance_get_project_vpn_joins which tests calls not used

Change-Id: I1a01ccc5ebcf7efeafe014af62be893325bb0825
This commit is contained in:
Jason Kölker
2012-01-04 11:10:10 -06:00
parent 70f300ef40
commit 1afb6549e9
7 changed files with 123 additions and 78 deletions

View File

@@ -96,10 +96,6 @@ def stub_out_db_instance_api(stubs):
"""Stubs out the db.instance_action_create method."""
pass
def fake_instance_get_fixed_addresses(context, instance_id):
"""Stubs out the db.instance_get_fixed_address method."""
return '10.10.10.10'
def fake_instance_type_get_all(context, inactive=0, filters=None):
return INSTANCE_TYPES.values()
@@ -109,7 +105,5 @@ def stub_out_db_instance_api(stubs):
stubs.Set(db, 'instance_create', fake_instance_create)
stubs.Set(db, 'network_get_by_instance', fake_network_get_by_instance)
stubs.Set(db, 'instance_action_create', fake_instance_action_create)
stubs.Set(db, 'instance_get_fixed_addresses',
fake_instance_get_fixed_addresses)
stubs.Set(db, 'instance_type_get_all', fake_instance_type_get_all)
stubs.Set(db, 'instance_type_get_by_name', fake_instance_type_get_by_name)