summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-09-02 23:13:12 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-09-02 23:13:12 -0700
commit66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a (patch)
treed445e93e45bc0f4cc7799bc496a56c28c3535a28
parentb080169f94e9b3785a73da38a81a0ce302fcff37 (diff)
downloadnova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.tar.gz
nova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.tar.xz
nova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.zip
removed model from nova-manage
-rwxr-xr-xbin/nova-manage8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/nova-manage b/bin/nova-manage
index 7f20531dc..055f2c3a9 100755
--- a/bin/nova-manage
+++ b/bin/nova-manage
@@ -25,10 +25,10 @@
import sys
import time
+from nova import db
from nova import flags
from nova import utils
from nova.auth import manager
-from nova.compute import model
from nova.cloudpipe import pipelib
from nova.endpoint import cloud
@@ -41,7 +41,6 @@ class VpnCommands(object):
def __init__(self):
self.manager = manager.AuthManager()
- self.instdir = model.InstanceDirectory()
self.pipe = pipelib.CloudPipe(cloud.CloudController())
def list(self):
@@ -73,9 +72,8 @@ class VpnCommands(object):
def _vpn_for(self, project_id):
"""Get the VPN instance for a project ID."""
- for instance in self.instdir.all:
- if ('image_id' in instance.state
- and instance['image_id'] == FLAGS.vpn_image_id
+ for instance in db.instance_get_all():
+ if (instance['image_id'] == FLAGS.vpn_image_id
and not instance['state_description'] in
['shutting_down', 'shutdown']
and instance['project_id'] == project_id):