diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-01 19:08:03 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-01 19:08:03 +0000 |
| commit | fced0f58bcbaef6fff76c6719e27e7d100aa721b (patch) | |
| tree | 38914db032abbb1df4d3fc696b0a223c247f40be /bin | |
| parent | b3b3194d76e22cb9617750c7b13c3a1d4429a636 (diff) | |
| parent | 62d5fae8d11b6403f9a63a709270ffafebb7ef09 (diff) | |
| download | nova-fced0f58bcbaef6fff76c6719e27e7d100aa721b.tar.gz nova-fced0f58bcbaef6fff76c6719e27e7d100aa721b.tar.xz nova-fced0f58bcbaef6fff76c6719e27e7d100aa721b.zip | |
Merge "remove unsupported ec2 extensions"
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-manage | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index cd1cb6971..6e17aded5 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -89,11 +89,11 @@ from nova import rpc from nova import utils from nova import version from nova import vsa -from nova.api.ec2 import admin from nova.api.ec2 import ec2utils from nova.auth import manager from nova.cloudpipe import pipelib from nova.compute import instance_types +from nova.compute import vm_states from nova.db import migration from nova.volume import volume_types @@ -214,7 +214,11 @@ class VpnCommands(object): 'vpn_public_port': int(port)}) def _vpn_for(self, context, project_id): - return admin.AdminController()._vpn_for(context, project_id) + """Get the VPN instance for a project ID.""" + for instance in db.instance_get_all_by_project(context, project_id): + if (instance['image_id'] == str(FLAGS.vpn_image_id) + and not instance['vm_state'] in [vm_states.DELETED]): + return instance class ShellCommands(object): |
