コード例 #1
0
ファイル: manager.py プロジェクト: rmahmood/cobalt
    def __init__(self, *args, **kwargs):
        self.vms_conn = kwargs.pop('vmsconn', None)

        self._init_vms()
        self.network_api = network.API()
        self.gridcentric_api = API()
        self.compute_manager = compute_manager.ComputeManager()

        # Use an eventlet green thread condition lock instead of the regular threading module. This
        # is required for eventlet threads because they essentially run on a single system thread.
        # All of the green threads will share the same base lock, defeating the point of using the
        # it. Since the main threading module is not monkey patched we cannot use it directly.
        self.cond = gthreading.Condition()
        self.locked_instances = {}
        super(GridCentricManager, self).__init__(service_name="gridcentric",
                                                 *args,
                                                 **kwargs)
コード例 #2
0
 def __init__(self):
     super(GridcentricServerControllerExtension, self).__init__()
     self.gridcentric_api = API()
     # Add the gridcentric-specific states to the state map
     common._STATE_MAP['blessed'] = {'default': 'BLESSED'}
コード例 #3
0
 def __init__(self):
     self.nova_servers = servers.Controller()
     self.nova_servers.compute_api = API()