diff options
| author | Ricardo Carrillo Cruz <emaildericky@gmail.com> | 2011-03-07 22:37:26 +0100 |
|---|---|---|
| committer | Ricardo Carrillo Cruz <emaildericky@gmail.com> | 2011-03-07 22:37:26 +0100 |
| commit | 56ee811efd52d0971d7fea4c232a904b3ee78ac6 (patch) | |
| tree | 208bee00cb31b879300e608c8be607212fcbe8cb | |
| parent | 0abd5bfecd279272e5fe1b0de04478909cd77010 (diff) | |
| download | nova-56ee811efd52d0971d7fea4c232a904b3ee78ac6.tar.gz nova-56ee811efd52d0971d7fea4c232a904b3ee78ac6.tar.xz nova-56ee811efd52d0971d7fea4c232a904b3ee78ac6.zip | |
deleted network_is_associated from nova.db api
| -rwxr-xr-x | bin/nova-manage | 4 | ||||
| -rw-r--r-- | nova/db/api.py | 5 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 9 |
3 files changed, 3 insertions, 15 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index b274c5bd1..94b0d5946 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -547,8 +547,8 @@ class NetworkCommands(object): def delete(self, fixed_range): """Deletes a network""" - print db.network_get_by_cidr(context.get_admin_context(), fixed_range) - + network = db.network_get_by_cidr(context.get_admin_context(), fixed_range) + class ServiceCommands(object): """Enable and disable running services""" diff --git a/nova/db/api.py b/nova/db/api.py index c73796487..04f5fd72f 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -459,11 +459,6 @@ def network_associate(context, project_id): """Associate a free network to a project.""" return IMPL.network_associate(context, project_id) -def network_is_associated(context, project_id): - """Returns true the the network is associated to a project""" - return IMPL.network_is_associated(context, project_id) - - def network_count(context): """Return the number of networks.""" return IMPL.network_count(context) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index bd2de70c7..c8f42425d 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -994,13 +994,6 @@ def network_associate(context, project_id): @require_admin_context -def network_is_associated(context, project_id): - session = get_session() - network = session.query(models.Network.project_id).filter(project_id=1).first() - print network - - -@require_admin_context def network_count(context): session = get_session() return session.query(models.Network).\ @@ -1132,7 +1125,7 @@ def network_get_by_cidr(context, cidr): if not result: raise exception.NotFound(_('Network with cidr %s does not exist') % cidr) - return result.id + return result @require_admin_context def network_get_by_instance(_context, instance_id): |
