From a8dc27b54ee991f0370ba587918db2317618c6ec Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 19 Feb 2013 00:19:52 +0000 Subject: Remove unused nova.db.api:network_get_by_instance Change-Id: I908aaafa149c6548271fd9a3cc91225f2cbdb841 --- nova/db/api.py | 5 ----- nova/db/sqlalchemy/api.py | 14 -------------- 2 files changed, 19 deletions(-) (limited to 'nova/db') diff --git a/nova/db/api.py b/nova/db/api.py index 6ec0b3a95..57f0b2787 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -863,11 +863,6 @@ def network_get_by_cidr(context, cidr): return IMPL.network_get_by_cidr(context, cidr) -def network_get_by_instance(context, instance_id): - """Get a network by instance id or raise if it does not exist.""" - return IMPL.network_get_by_instance(context, instance_id) - - def network_get_all_by_instance(context, instance_id): """Get all networks by instance id or raise if none exist.""" return IMPL.network_get_all_by_instance(context, instance_id) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 375a3884b..0f6f5a12b 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -2287,20 +2287,6 @@ def network_get_by_cidr(context, cidr): return result -@require_admin_context -def network_get_by_instance(context, instance_id): - # note this uses fixed IP to get to instance - # only works for networks the instance has an IP from - result = _network_get_query(context).\ - filter_by(instance_id=instance_id).\ - first() - - if not result: - raise exception.NetworkNotFoundForInstance(instance_id=instance_id) - - return result - - @require_admin_context def network_get_all_by_instance(context, instance_id): result = _network_get_query(context).\ -- cgit