Example #1
0
 def start_vpn(self, context, project):
     instance = self._vpn_for(context, project)
     if not instance:
         # NOTE(vish) import delayed because of __init__.py
         from nova.cloudpipe import pipelib
         pipe = pipelib.CloudPipe()
         try:
             pipe.launch_vpn_instance(project)
         except db.NoMoreNetworks:
             raise exception.ApiError("Unable to claim IP for VPN instance"
                                      ", ensure it isn't running, and try "
                                      "again in a few minutes")
         instance = self._vpn_for(context, project)
     return {'instance_id': ec2utils.id_to_ec2_id(instance['id'])}
Example #2
0
 def __init__(self):
     self.compute_api = compute.API()
     self.network_api = network.API()
     self.auth_manager = manager.AuthManager()
     self.cloudpipe = pipelib.CloudPipe()
     self.setup()
Example #3
0
 def __init__(self):
     self.compute_api = compute.API()
     self.network_api = network.API()
     self.cloudpipe = pipelib.CloudPipe()
     self.setup()
Example #4
0
 def setUp(self):
     super(PipelibTest, self).setUp()
     self.cloudpipe = pipelib.CloudPipe()
     self.project = "222"
     self.user = "******"
     self.context = context.RequestContext(self.user, self.project)
Example #5
0
 def __init__(self):
     self.compute_api = compute.API(skip_policy_check=True)
     self.network_api = network.API(skip_policy_check=True)
     self.cloudpipe = pipelib.CloudPipe(skip_policy_check=True)
     self.setup()