diff options
| author | Jenkins <jenkins@review.openstack.org> | 2011-12-29 18:44:19 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2011-12-29 18:44:19 +0000 |
| commit | b9500ff068d699ad6c846e0be05bf604900d723e (patch) | |
| tree | 9b25dac6b195bb084ad01f7ba0182b0185653627 | |
| parent | fee0b1e53dee6da5ceaee7d920e5bd538715371e (diff) | |
| parent | c9393f76a3da9cb4a564dab45ddde4f206953dca (diff) | |
Merge "Bug 820059: bin/nova-manage.py VpnCommands.spawn calls non-existant method VpnCommands._vpn_for - fixed"
| -rwxr-xr-x | bin/nova-manage | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/nova-manage b/bin/nova-manage index 5fcb555b8..372d69ea6 100755 --- a/bin/nova-manage +++ b/bin/nova-manage @@ -88,6 +88,7 @@ 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 @@ -174,8 +175,9 @@ class VpnCommands(object): def spawn(self): """Run all VPNs.""" print "WARNING: This method only works with deprecated auth" + ctxt = context.get_admin_context() for p in reversed(self.manager.get_projects()): - if not self._vpn_for(p.id): + if self._vpn_for(ctxt, p.id): print 'spawning %s' % p.id self.pipe.launch_vpn_instance(p.id, p.project_manager_id) time.sleep(10) @@ -211,6 +213,9 @@ class VpnCommands(object): {'vpn_public_address': ip, 'vpn_public_port': int(port)}) + def _vpn_for(self, context, project_id): + return admin.AdminController()._vpn_for(context, project_id) + class ShellCommands(object): def bpython(self): |
