Remove VIF<->Network FK dependancy
Related to blueprint untie-nova-network-models. Depends-On: I665f402fe0ab1b301ab6761e80b11b101656065e Change-Id: I9bfb957effe0a2420c312add1cca5d7af509579d
This commit is contained in:
parent
5144596219
commit
98a33c9db7
@ -984,7 +984,6 @@ def virtual_interface_get(context, vif_id, session=None):
|
||||
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
filter_by(id=vif_id).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
first()
|
||||
return vif_ref
|
||||
@ -999,7 +998,6 @@ def virtual_interface_get_by_address(context, address):
|
||||
session = get_session()
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
filter_by(address=address).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
first()
|
||||
return vif_ref
|
||||
@ -1014,7 +1012,6 @@ def virtual_interface_get_by_uuid(context, vif_uuid):
|
||||
session = get_session()
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
filter_by(uuid=vif_uuid).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
first()
|
||||
return vif_ref
|
||||
@ -1029,7 +1026,6 @@ def virtual_interface_get_by_fixed_ip(context, fixed_ip_id):
|
||||
session = get_session()
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
filter_by(fixed_ip_id=fixed_ip_id).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
first()
|
||||
return vif_ref
|
||||
@ -1045,7 +1041,6 @@ def virtual_interface_get_by_instance(context, instance_id):
|
||||
session = get_session()
|
||||
vif_refs = session.query(models.VirtualInterface).\
|
||||
filter_by(instance_id=instance_id).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
all()
|
||||
return vif_refs
|
||||
@ -1059,7 +1054,6 @@ def virtual_interface_get_by_instance_and_network(context, instance_id,
|
||||
vif_ref = session.query(models.VirtualInterface).\
|
||||
filter_by(instance_id=instance_id).\
|
||||
filter_by(network_id=network_id).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
first()
|
||||
return vif_ref
|
||||
@ -1074,7 +1068,6 @@ def virtual_interface_get_by_network(context, network_id):
|
||||
session = get_session()
|
||||
vif_refs = session.query(models.VirtualInterface).\
|
||||
filter_by(network_id=network_id).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
all()
|
||||
return vif_refs
|
||||
@ -1109,7 +1102,6 @@ def virtual_interface_get_all(context):
|
||||
"""Get all vifs"""
|
||||
session = get_session()
|
||||
vif_refs = session.query(models.VirtualInterface).\
|
||||
options(joinedload('network')).\
|
||||
options(joinedload('fixed_ips')).\
|
||||
all()
|
||||
return vif_refs
|
||||
|
Loading…
x
Reference in New Issue
Block a user