Merge "Removes fixed_ip_get_network"
This commit is contained in:
commit
6375ca7eb5
@ -488,11 +488,6 @@ def fixed_ips_by_virtual_interface(context, vif_id):
|
||||
return IMPL.fixed_ips_by_virtual_interface(context, vif_id)
|
||||
|
||||
|
||||
def fixed_ip_get_network(context, address):
|
||||
"""Get a network for a fixed ip by address."""
|
||||
return IMPL.fixed_ip_get_network(context, address)
|
||||
|
||||
|
||||
def fixed_ip_update(context, address, values):
|
||||
"""Create a fixed ip from the values dictionary."""
|
||||
return IMPL.fixed_ip_update(context, address, values)
|
||||
|
@ -1188,12 +1188,6 @@ def fixed_ips_by_virtual_interface(context, vif_id):
|
||||
return result
|
||||
|
||||
|
||||
@require_admin_context
|
||||
def fixed_ip_get_network(context, address):
|
||||
fixed_ip_ref = fixed_ip_get_by_address(context, address)
|
||||
return fixed_ip_ref.network
|
||||
|
||||
|
||||
@require_context
|
||||
def fixed_ip_update(context, address, values):
|
||||
session = get_session()
|
||||
|
@ -68,7 +68,6 @@ def stub_out_db_network_api(stubs):
|
||||
|
||||
fixed_ip_fields = {'id': 0,
|
||||
'network_id': 0,
|
||||
'network': FakeModel(network_fields),
|
||||
'address': '192.168.0.100',
|
||||
'instance': False,
|
||||
'instance_id': 0,
|
||||
@ -208,15 +207,6 @@ def stub_out_db_network_api(stubs):
|
||||
if ips:
|
||||
return FakeModel(ips[0])
|
||||
|
||||
def fake_fixed_ip_get_network(context, address):
|
||||
ips = filter(lambda i: i['address'] == address,
|
||||
fixed_ips)
|
||||
if ips:
|
||||
nets = filter(lambda n: n['id'] == ips[0]['network_id'],
|
||||
networks)
|
||||
if nets:
|
||||
return FakeModel(nets[0])
|
||||
|
||||
def fake_fixed_ip_update(context, address, values):
|
||||
ips = filter(lambda i: i['address'] == address,
|
||||
fixed_ips)
|
||||
@ -318,7 +308,6 @@ def stub_out_db_network_api(stubs):
|
||||
fake_fixed_ip_disassociate_all_by_timeout,
|
||||
fake_fixed_ip_get_by_instance,
|
||||
fake_fixed_ip_get_by_address,
|
||||
fake_fixed_ip_get_network,
|
||||
fake_fixed_ip_update,
|
||||
fake_instance_type_get,
|
||||
fake_virtual_interface_create,
|
||||
|
Loading…
Reference in New Issue
Block a user