summaryrefslogtreecommitdiffstats
path: root/nova/db
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2013-02-19 00:19:52 +0000
committerJoe Gordon <jogo@cloudscaling.com>2013-02-19 00:19:52 +0000
commita8dc27b54ee991f0370ba587918db2317618c6ec (patch)
treebb58a442f82b6ce239846d82adac00b34a1b78ea /nova/db
parentb23c557cc8d03028caba95777f98adfe9b1031d9 (diff)
Remove unused nova.db.api:network_get_by_instance
Change-Id: I908aaafa149c6548271fd9a3cc91225f2cbdb841
Diffstat (limited to 'nova/db')
-rw-r--r--nova/db/api.py5
-rw-r--r--nova/db/sqlalchemy/api.py14
2 files changed, 0 insertions, 19 deletions
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
@@ -2288,20 +2288,6 @@ def network_get_by_cidr(context, cidr):
@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).\
filter_by(instance_id=instance_id).\