Bug 820059: bin/nova-manage.py VpnCommands.spawn calls non-existant method VpnCommands._vpn_for - fixed
Change-Id: I86c509d98fac685a5d658f397d0672f71b4bc175
This commit is contained in:
1
Authors
1
Authors
@@ -57,6 +57,7 @@ Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp>
|
||||
Hisaki Ohara <hisaki.ohara@intel.com>
|
||||
Ilya Alekseyev <ilyaalekseyev@acm.org>
|
||||
Isaku Yamahata <yamahata@valinux.co.jp>
|
||||
Ivan Kolodyazhny <e0ne@e0ne.info>
|
||||
Jake Dahn <jake@ansolabs.com>
|
||||
James E. Blair <jeblair@hp.com>
|
||||
Jason Cannavale <jason.cannavale@rackspace.com>
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user