diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-02 23:13:12 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-02 23:13:12 -0700 |
| commit | 66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a (patch) | |
| tree | d445e93e45bc0f4cc7799bc496a56c28c3535a28 | |
| parent | b080169f94e9b3785a73da38a81a0ce302fcff37 (diff) | |
| download | nova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.tar.gz nova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.tar.xz nova-66ed706a2f7ee8a6b4703de988b4d7ef0826fc2a.zip | |
removed model from nova-manage
| -rwxr-xr-x | bin/nova-manage | 8 |
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): |
