Exemplo n.º 1
0
 def _get_cloudpipe_for_project(self, context, project_id):
     """Get the cloudpipe instance for a project ID."""
     # NOTE(todd): this should probably change to compute_api.get_all
     #             or db.instance_get_project_vpn
     for instance in db.instance_get_all_by_project(context, project_id):
         if (instance['image_id'] == str(FLAGS.vpn_image_id)
                 and instance['vm_state'] != vm_states.DELETED):
             return instance
Exemplo n.º 2
0
 def _get_cloudpipe_for_project(self, context, project_id):
     """Get the cloudpipe instance for a project ID."""
     # NOTE(todd): this should probably change to compute_api.get_all
     #             or db.instance_get_project_vpn
     for instance in db.instance_get_all_by_project(context, project_id):
         if (instance['image_id'] == str(FLAGS.vpn_image_id)
             and instance['vm_state'] != vm_states.DELETED):
             return instance
Exemplo n.º 3
0
 def _vpn_for(self, 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
Exemplo n.º 4
0
 def _vpn_for(self, 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